ffe.panels
Class MainPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byffe.panels.MainPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public final class MainPanel
extends javax.swing.JPanel
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener

The MainPanel class is the main container for holding Force Field Explorer components.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static ARCFileFilter arcFileFilter
           
static DYNFileFilter dynFileFilter
           
 FullScreenWindow fullScreenWindow
           
 Graphics3D graphics
          Java3D Canvas
static int GRAPHICS
           
static java.awt.GraphicsDevice graphicsDevice
          Currently used for testing full screen graphics
static InducedFileFilter indFileFilter
           
static INTFileFilter intFileFilter
           
static KeyFileFilter keyfilefilter
          KeyFileFilter for reuse
 KeywordPanel keyPanel
          Reference to the Keyword Editor
static int KEYWORDS
           
static int LOGS
           
static int MODELING
           
static PDBFileFilter pdbFileFilter
           
static PRMFileFilter prmFileFilter
           
static XYZFileFilter xyzFileFilter
          XYZFileFilter for reuse
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MainPanel(javax.swing.JFrame f)
          MainPanel Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Handle most File, Edit, View and Help Menu Commands This should probably be partioned between a few different handlers
 void closeActive()
          Detach the active FSystem's BranchGroup from the Scene and clear that FSystem's data
 void closeAll()
          Close all open systems
 void connectToTINKER(FSystem m, java.lang.Thread t)
           
 boolean createKeyFile(FSystem system)
           
 bsh.Interpreter getBeanShell()
           
static javax.swing.JColorChooser getColorChooser()
           
static java.io.File getCWD()
           
static javax.swing.JFileChooser getFileChooser()
           
 Graphics3D getGraphics3D()
           
 JobPanel getJobPanel()
           
 KeywordPanel getKeywordPanel()
           
 LogPanel getLogPanel()
           
 FMenuBar getMenu()
          Get the Menu Bar
 Root getRoot()
          Returns the molecular root node
 javax.swing.JLabel getStatusBar()
           
 Trajectory getTrajectory()
          Get the Trajectory wrapper for the active system
 Tree getTree()
           
 void initialize()
           
 void loadPrefs()
          Load preferences from the user node
 void merge()
          Merge two or more selected FSystem Nodes into one FSystem node.
 void open()
          Trys to open a file picked from a JFileChooser A successful read is followed by attachment of the FSystem to the root node and the update of the various displays
 void open(java.io.File f)
          Opens the supplied File
 void open(java.lang.String name)
           
 void openFromPDB()
          Opens the supplied File
 void openInduced()
           
 boolean openKey(FSystem newSystem, boolean createKey)
          Attempt to open a TINKER *.key file
 void openOn(java.io.File f, FSystem oldSystem)
           
 void openRestart()
           
 void release()
          Close the connection to a running simulation
 void resizePanes(int move)
          Set the split panes to their default proportions
 void save(java.io.File file)
          Save the currently selected System to disk
 void savePrefs()
          Save preferences to the user node
 void setCWD(java.io.File f)
           
 void setPanel(int panel)
           
 void stateChanged(javax.swing.event.ChangeEvent evt)
           
 void update(boolean updateRender)
          Refresh various Panels based on the active System
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GRAPHICS

public static final int GRAPHICS
See Also:
Constant Field Values

KEYWORDS

public static final int KEYWORDS
See Also:
Constant Field Values

MODELING

public static final int MODELING
See Also:
Constant Field Values

LOGS

public static final int LOGS
See Also:
Constant Field Values

graphicsDevice

public static java.awt.GraphicsDevice graphicsDevice
Currently used for testing full screen graphics


keyfilefilter

public static KeyFileFilter keyfilefilter
KeyFileFilter for reuse


keyPanel

public KeywordPanel keyPanel
Reference to the Keyword Editor


xyzFileFilter

public static XYZFileFilter xyzFileFilter
XYZFileFilter for reuse


arcFileFilter

public static ARCFileFilter arcFileFilter

intFileFilter

public static INTFileFilter intFileFilter

dynFileFilter

public static DYNFileFilter dynFileFilter

indFileFilter

public static InducedFileFilter indFileFilter

prmFileFilter

public static PRMFileFilter prmFileFilter

pdbFileFilter

public static PDBFileFilter pdbFileFilter

graphics

public Graphics3D graphics
Java3D Canvas


fullScreenWindow

public FullScreenWindow fullScreenWindow
Constructor Detail

MainPanel

public MainPanel(javax.swing.JFrame f)
MainPanel Constructor

Parameters:
f - Application Frame
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Handle most File, Edit, View and Help Menu Commands This should probably be partioned between a few different handlers

Specified by:
actionPerformed in interface java.awt.event.ActionListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent evt)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

closeActive

public void closeActive()
Detach the active FSystem's BranchGroup from the Scene and clear that FSystem's data


closeAll

public void closeAll()
Close all open systems


openRestart

public void openRestart()

connectToTINKER

public void connectToTINKER(FSystem m,
                            java.lang.Thread t)

getMenu

public FMenuBar getMenu()
Get the Menu Bar

Returns:
menu

getTree

public Tree getTree()

getRoot

public Root getRoot()
Returns the molecular root node


getStatusBar

public javax.swing.JLabel getStatusBar()

getBeanShell

public bsh.Interpreter getBeanShell()

getGraphics3D

public Graphics3D getGraphics3D()

getKeywordPanel

public KeywordPanel getKeywordPanel()

getJobPanel

public JobPanel getJobPanel()

getLogPanel

public LogPanel getLogPanel()

getCWD

public static java.io.File getCWD()

setCWD

public void setCWD(java.io.File f)

getTrajectory

public Trajectory getTrajectory()
Get the Trajectory wrapper for the active system

Returns:
trajectory

openInduced

public void openInduced()

initialize

public void initialize()

openKey

public boolean openKey(FSystem newSystem,
                       boolean createKey)
Attempt to open a TINKER *.key file

Returns:
Key file that was found, or null if nothing could be found

createKeyFile

public boolean createKeyFile(FSystem system)

loadPrefs

public void loadPrefs()
Load preferences from the user node


merge

public void merge()
Merge two or more selected FSystem Nodes into one FSystem node. There are a few gotchas that need to be fixed


open

public void open()
Trys to open a file picked from a JFileChooser A successful read is followed by attachment of the FSystem to the root node and the update of the various displays


openOn

public void openOn(java.io.File f,
                   FSystem oldSystem)

open

public void open(java.io.File f)
Opens the supplied File

Parameters:
f - File to open

open

public void open(java.lang.String name)

openFromPDB

public void openFromPDB()
Opens the supplied File


release

public void release()
Close the connection to a running simulation


resizePanes

public void resizePanes(int move)
Set the split panes to their default proportions


save

public void save(java.io.File file)
Save the currently selected System to disk

Parameters:
file - File to save the system to

savePrefs

public void savePrefs()
Save preferences to the user node


setPanel

public void setPanel(int panel)

update

public void update(boolean updateRender)
Refresh various Panels based on the active System

Parameters:
updateRender - If true, the default rendering is attempted

getColorChooser

public static javax.swing.JColorChooser getColorChooser()

getFileChooser

public static javax.swing.JFileChooser getFileChooser()