Class AtomSetChooser

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, Runnable, EventListener, Accessible, ChangeListener, TreeSelectionListener, RootPaneContainer, WindowConstants

A JFrame that allows for choosing an Atomset to view.
Author:
René Kanters, University of Richmond
See Also:
  • Field Details

    • animThread

      private Thread animThread
    • propertiesTextArea

      private JTextArea propertiesTextArea
    • tree

      private JTree tree
    • treeModel

      private DefaultTreeModel treeModel
    • vwr

      private Viewer vwr
    • repeatCheckBox

      private JCheckBox repeatCheckBox
    • selectSlider

      private JSlider selectSlider
    • infoLabel

      private JLabel infoLabel
    • fpsSlider

      private JSlider fpsSlider
    • amplitudeSlider

      private JSlider amplitudeSlider
    • periodSlider

      private JSlider periodSlider
    • scaleSlider

      private JSlider scaleSlider
    • radiusSlider

      private JSlider radiusSlider
    • saveChooser

      private JFileChooser saveChooser
    • REWIND

      static final String REWIND
      See Also:
    • PREVIOUS

      static final String PREVIOUS
      See Also:
    • PLAY

      static final String PLAY
      See Also:
    • PAUSE

      static final String PAUSE
      See Also:
    • NEXT

      static final String NEXT
      See Also:
    • FF

      static final String FF
      See Also:
    • SAVE

      static final String SAVE
      See Also:
    • COLLECTION

      static final String COLLECTION
      String for prefix/resource identifier for the collection area. This value is used in the Jmol properties files.
      See Also:
    • VECTOR

      static final String VECTOR
      String for prefix/resource identifier for the vector area. This value is used in the Jmol properties files.
      See Also:
    • indexes

      private int[] indexes
      Sequence of atom set indexes in current tree selection for a branch, or siblings for a leaf.
    • currentIndex

      private int currentIndex
    • FPS_MAX

      private static final int FPS_MAX
      Maximum value for the fps slider.
      See Also:
    • AMPLITUDE_PRECISION

      private static final float AMPLITUDE_PRECISION
      Precision of the vibration scale slider
      See Also:
    • AMPLITUDE_MAX

      private static final float AMPLITUDE_MAX
      Maximum value for vibration scale. Should be in preferences?
      See Also:
    • AMPLITUDE_VALUE

      private static final float AMPLITUDE_VALUE
      Initial value of vibration scale. Should be in preferences?
      See Also:
    • PERIOD_PRECISION

      private static final float PERIOD_PRECISION
      Precision of the vibration period slider in seconds.
      See Also:
    • PERIOD_MAX

      private static final float PERIOD_MAX
      Maximum value for the vibration period in seconds. Should be in preferences?
      See Also:
    • PERIOD_VALUE

      private static final float PERIOD_VALUE
      Initial value for the vibration period in seconds. Should be in preferences?
      See Also:
    • RADIUS_MAX

      private static final int RADIUS_MAX
      Maximum value for vector radius.
      See Also:
    • RADIUS_VALUE

      private static final int RADIUS_VALUE
      Initial value of vector radius. Should be in preferences?
      See Also:
    • SCALE_PRECISION

      private static final float SCALE_PRECISION
      Precision of the vector scale slider
      See Also:
    • SCALE_MAX

      private static final float SCALE_MAX
      Maximum value for vector scale. Should be in preferences?
      See Also:
    • SCALE_VALUE

      private static final float SCALE_VALUE
      Initial value of vector scale. Should be in preferences?
      See Also:
    • radiusValue

      private int radiusValue
  • Constructor Details

    • AtomSetChooser

      public AtomSetChooser(Viewer vwr, JFrame frame)
  • Method Details

    • layoutWindow

      private void layoutWindow(Container container)
    • createVCRController

      private JPanel createVCRController(String section)
      Creates a VCR type set of controller inside a JPanel.

      Uses the JmolResourceHandler to get the label for the panel, the images for the buttons, and the tooltips. The button names are rewind, prev, play, pause, next , and ff.

      The handler for the buttons should determine from the getActionCommand which button in which section triggered the actionEvent, which is identified by {section}.{name}.

      Parameters:
      section - String of the section that the controller belongs to.
      Returns:
      The JPanel
    • valueChanged

      public void valueChanged(TreeSelectionEvent e)
      Specified by:
      valueChanged in interface TreeSelectionListener
    • showAtomSetIndex

      protected void showAtomSetIndex(int index, boolean bSetSelectSlider)
      Show an atom set from the indexes array
      Parameters:
      index - The index in the index array
      bSetSelectSlider - If true, updates the selectSlider
    • setIndexes

      protected void setIndexes(DefaultMutableTreeNode node)
      Sets the indexes to the atomSetIndex values of each leaf of the node.
      Parameters:
      node - The node whose leaf's atomSetIndex values should be used
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • saveXYZCollection

      public void saveXYZCollection()
      Saves the currently active collection as a multistep XYZ file.
    • findFrequency

      public void findFrequency(int index, int increment)
      Have the vwr show a particular frame with frequencies if it can be found.
      Parameters:
      index - Starting index where to start looking for frequencies
      increment - Increment value for how to go through the list
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Specified by:
      stateChanged in interface ChangeListener
    • script

      private void script(String cmd)
    • showProperties

      protected void showProperties(Properties properties)
      Shows the properties in the propertiesPane of the AtomSetChooser window
      Parameters:
      properties - Properties to be shown.
    • showAuxiliaryInfo

      protected void showAuxiliaryInfo(Map<String,Object> auxiliaryInfo)
      Shows the auxiliary information in the propertiesPane of the AtomSetChooser window
      Parameters:
      auxiliaryInfo - Hashtable to be shown.
    • createTreeModel

      private void createTreeModel()
      Creates the treeModel of the AtomSets available in the JmolViewer
    • propertyChange

      public void propertyChange(PropertyChangeEvent propertyChangeEvent)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • run

      public void run()
      Specified by:
      run in interface Runnable