cct.dialogs
Class JEditorFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by cct.dialogs.JEditorFrame
All Implemented Interfaces:
ParentInterface, AtomProperties, OperationsOnAtoms, PDBBankFetcherInterface, ShadowClientInterface, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class JEditorFrame
extends javax.swing.JFrame
implements OperationsOnAtoms, AtomProperties, java.awt.event.ActionListener, ParentInterface, PDBBankFetcherInterface, ShadowClientInterface

Title: Computational Chemistry Tookit

Description:

This is the main interface for the Jamberoo (JMolEditor) By default, is redirected to the internal window. To disable this feature set cct.dialogs.JEditorFrame@redirectStderr = false in the cct.properties file

Copyright: Copyright (c) 2005-2009 Dr. Vladislav Vassiliev

Company: ANU

See Also:
Serialized Form

Nested Class Summary
(package private)  class JEditorFrame.AtomColorScheme_actionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_deleteMoleculeButton_actionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jButton3_actionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jMenuAnalyze_ActionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jMenuDB_ActionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jMenuFileEdit_ActionAdapter
          Title: Picking
(package private)  class JEditorFrame.JEditorFrame_jMenuFileExit_ActionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jMenuFileOpenAs_ActionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jMenuFileSaveAs_ActionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jMenuHelpAbout_ActionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_jMenuView_ActionAdapter
           
(package private)  class JEditorFrame.JEditorFrame_openFileButton_actionAdapter
           
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  J3DTabbedWorld j3dTabbedWorld
           
(package private) static MemoryMonitor memorymonitor
           
protected  javax.swing.JMenuItem trajectoryAnalysis
           
protected  TrajectoryAnalysisDialog trajectoryAnalysisDialog
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface cct.modelling.OperationsOnAtoms
FIXED_ATOM, ROTATE_ATOM, ROTATE_GROUP, RULE_DIFFERENCE, RULE_INTERSECTION, RULE_UNION, SELECT_ATOMS, SELECT_MOLECULES, SELECT_MONOMERS, SELECTED_ADD_ATOMS, SELECTED_ADD_FRAGMENT, SELECTED_ADD_MOLECULE, SELECTED_CHANGE_ATOM_LABELS_COLOR, SELECTED_CHANGE_ATOM_LABELS_SIZE, SELECTED_CREATE_CENTROID, SELECTED_DELETE_ATOMS, SELECTED_DISPLAY_ATOMS, SELECTED_FILL_VALENCES_WITH_HYDROGENS, SELECTED_LABEL_ATOMS, SELECTED_MODIFY_ANGLES, SELECTED_MODIFY_ATOMS, SELECTED_MODIFY_BONDS, SELECTED_MODIFY_DIHEDRALS, SELECTED_NOTHING, SELECTED_SOLVATE_CAP, SELECTED_SOLVATE_SHELL, SELECTED_UNDISPLAY_ATOMS, SELECTED_UNLABEL_ATOMS, SELECTION_FOUR_ATOMS_ONLY, SELECTION_ONE_ATOM_ONLY, SELECTION_SPOT_ONLY, SELECTION_THREE_ATOMS_ONLY, SELECTION_TWO_ATOMS_ONLY, SELECTION_UNLIMITED, TRANSLATE_ATOM, TRANSLATE_GROUP
 
Fields inherited from interface cct.modelling.AtomProperties
GEOMETRY_LINEAR, GEOMETRY_TETRAHEDRAL, GEOMETRY_TRIGONAL
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JEditorFrame(java.lang.String title)
           
JEditorFrame(java.lang.String[] args)
           
JEditorFrame(java.lang.String title, java.lang.String[] args)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvent)
           
 java.lang.String addMenuItem(java.lang.String menuName, javax.swing.JMenuItem menuItem)
           
(package private)  void buildAnalyzeMenu()
           
(package private)  void buildEditMenu()
           
 void changeAtomColorScheme(java.awt.event.ActionEvent e)
           
 void changeLookAndFeel(java.awt.event.ActionEvent e)
           
 void childFinished(java.lang.Object child)
          To inform parent that its child process finished its execution
(package private)  java.lang.String chooseFileDialog(java.lang.String fileType, java.lang.String formatDescr, int dialogType)
           
 void deleteMoleculeButton_actionPerformed(java.awt.event.ActionEvent e)
           
 void fetchStructure(java.lang.String host, java.lang.String entry_directory, java.lang.String code)
           
 java.awt.Component getComponent()
          Gets parent component (if any)
 Java3dUniverse getJ3DUniverse()
           
 javax.swing.JToolBar getJToolBar()
           
 javax.swing.JMenuItem getMenuItem(java.lang.String menuName, java.lang.String menuItemName)
          Gets menu item with ActionCommand name "menuItemName" from the menu with ActionCommand name "menuName"
 MoleculeInterface getMolecule()
           
 java.awt.Frame getParentFrame()
           
 float[][] getVirtualWorldCoordinates(MoleculeInterface molec)
          Transforms coordinates of atoms of the arbitrary molecule into current virtual world space
(package private)  boolean guessAndOpenFile(Java3dUniverse j3d)
           
 boolean hasMenuItem(java.lang.String menuName, java.lang.String menuItemName)
          Check whether menu with ActionCommand "menuName" has menu item with ActionCommand "menuItemName"
 void interceptStderr(boolean enable)
          Enables/disables redirection of stderr.
 boolean isMoleculeLoaded()
          Checks whether molecule loaded or not
 void jButton3_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void jMenuAnalyze_actionPerformed(java.awt.event.ActionEvent actionEvent)
           
(package private)  void jMenuDB_actionPerformed(java.awt.event.ActionEvent actionEvent)
           
(package private)  void jMenuFileEdit_actionPerformed(java.awt.event.ActionEvent actionEvent)
           
(package private)  void jMenuFileExit_actionPerformed(java.awt.event.ActionEvent actionEvent)
          File | Exit action performed.
(package private)  void jMenuFileOpenAs_actionPerformed(java.awt.event.ActionEvent actionEvent)
          File | Exit action performed.
(package private)  void jMenuFileSaveAs_actionPerformed(java.awt.event.ActionEvent actionEvent)
           
(package private)  void jMenuHelpAbout_actionPerformed(java.awt.event.ActionEvent actionEvent)
          Help | About action performed.
(package private)  void jMenuView_actionPerformed(java.awt.event.ActionEvent actionEvent)
           
 void loadFromSFTP(java.awt.event.ActionEvent e)
           
(package private)  void openFile(Java3dUniverse j3d, CHEMISTRY_FILE_FORMAT fileType, java.lang.String fileName)
           
(package private)  void openFile(Java3dUniverse j3d, java.lang.String fileType)
           
 void openFileButton_actionPerformed(java.awt.event.ActionEvent e)
          Program tries to guess and open all supported molecular file formats
 void openMoleculeFile(java.lang.String title, Java3dUniverse j3d)
           
(package private)  void processArguments(java.lang.String[] args)
           
 javax.swing.JMenuItem removeMenuItem(java.lang.String menuName, java.lang.String menuItemName)
           
 void saveImageAs(java.awt.event.ActionEvent e)
           
 void setDefaultHelper()
           
 void setFileBrowser(java.lang.String host, java.lang.String username, FileBrowserInterface file_browser)
           
 void setHelper(HelperInterface h)
           
 void setKnownHosts(java.lang.String[] hosts)
           
 void setMolecule(Molecule m)
           
 void setMolecule(MoleculeInterface m)
           
 void submitGaussianJob(java.awt.event.ActionEvent e)
           
 void submitMolecule(java.awt.event.ActionEvent e)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

j3dTabbedWorld

J3DTabbedWorld j3dTabbedWorld

trajectoryAnalysis

protected javax.swing.JMenuItem trajectoryAnalysis

trajectoryAnalysisDialog

protected TrajectoryAnalysisDialog trajectoryAnalysisDialog

memorymonitor

static MemoryMonitor memorymonitor
Constructor Detail

JEditorFrame

public JEditorFrame(java.lang.String title,
                    java.lang.String[] args)

JEditorFrame

public JEditorFrame(java.lang.String[] args)

JEditorFrame

public JEditorFrame(java.lang.String title)
Method Detail

processArguments

void processArguments(java.lang.String[] args)

setDefaultHelper

public void setDefaultHelper()

setHelper

public void setHelper(HelperInterface h)

jMenuFileOpenAs_actionPerformed

void jMenuFileOpenAs_actionPerformed(java.awt.event.ActionEvent actionEvent)
File | Exit action performed.

Parameters:
actionEvent - ActionEvent

openFile

void openFile(Java3dUniverse j3d,
              CHEMISTRY_FILE_FORMAT fileType,
              java.lang.String fileName)

openFile

void openFile(Java3dUniverse j3d,
              java.lang.String fileType)

jMenuFileSaveAs_actionPerformed

void jMenuFileSaveAs_actionPerformed(java.awt.event.ActionEvent actionEvent)

isMoleculeLoaded

public boolean isMoleculeLoaded()
Checks whether molecule loaded or not

Returns:
boolean "true" if loaded and "false" otherwise

jMenuFileEdit_actionPerformed

void jMenuFileEdit_actionPerformed(java.awt.event.ActionEvent actionEvent)
Parameters:
actionEvent - ActionEvent

jMenuAnalyze_actionPerformed

void jMenuAnalyze_actionPerformed(java.awt.event.ActionEvent actionEvent)

jMenuView_actionPerformed

void jMenuView_actionPerformed(java.awt.event.ActionEvent actionEvent)

jMenuDB_actionPerformed

void jMenuDB_actionPerformed(java.awt.event.ActionEvent actionEvent)

buildEditMenu

void buildEditMenu()

buildAnalyzeMenu

void buildAnalyzeMenu()

chooseFileDialog

java.lang.String chooseFileDialog(java.lang.String fileType,
                                  java.lang.String formatDescr,
                                  int dialogType)
Parameters:
fileType - String
formatDescr - String
Returns:
String

jMenuFileExit_actionPerformed

void jMenuFileExit_actionPerformed(java.awt.event.ActionEvent actionEvent)
File | Exit action performed.

Parameters:
actionEvent - ActionEvent

jMenuHelpAbout_actionPerformed

void jMenuHelpAbout_actionPerformed(java.awt.event.ActionEvent actionEvent)
Help | About action performed.

Parameters:
actionEvent - ActionEvent

deleteMoleculeButton_actionPerformed

public void deleteMoleculeButton_actionPerformed(java.awt.event.ActionEvent e)

changeAtomColorScheme

public void changeAtomColorScheme(java.awt.event.ActionEvent e)

saveImageAs

public void saveImageAs(java.awt.event.ActionEvent e)

submitMolecule

public void submitMolecule(java.awt.event.ActionEvent e)

submitGaussianJob

public void submitGaussianJob(java.awt.event.ActionEvent e)

changeLookAndFeel

public void changeLookAndFeel(java.awt.event.ActionEvent e)

openFileButton_actionPerformed

public void openFileButton_actionPerformed(java.awt.event.ActionEvent e)
Program tries to guess and open all supported molecular file formats

Parameters:
e - ActionEvent

guessAndOpenFile

boolean guessAndOpenFile(Java3dUniverse j3d)

getVirtualWorldCoordinates

public float[][] getVirtualWorldCoordinates(MoleculeInterface molec)
Transforms coordinates of atoms of the arbitrary molecule into current virtual world space

Parameters:
molec - MoleculeInterface - Molecule
Returns:
float[][] - cartesian coordinates float[number_of_atoms][3]

addMenuItem

public java.lang.String addMenuItem(java.lang.String menuName,
                                    javax.swing.JMenuItem menuItem)

getJToolBar

public javax.swing.JToolBar getJToolBar()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvent)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

fetchStructure

public void fetchStructure(java.lang.String host,
                           java.lang.String entry_directory,
                           java.lang.String code)
Specified by:
fetchStructure in interface PDBBankFetcherInterface

openMoleculeFile

public void openMoleculeFile(java.lang.String title,
                             Java3dUniverse j3d)

hasMenuItem

public boolean hasMenuItem(java.lang.String menuName,
                           java.lang.String menuItemName)
                    throws java.lang.Exception
Check whether menu with ActionCommand "menuName" has menu item with ActionCommand "menuItemName"

Parameters:
menuName - String - menu ActionCommand name
menuItemName - String menu item ActionCommand name
Returns:
boolean true - a menu has a given menu item, false otherwise
Throws:
java.lang.Exception - if there is no such menu in menubar

getMenuItem

public javax.swing.JMenuItem getMenuItem(java.lang.String menuName,
                                         java.lang.String menuItemName)
                                  throws java.lang.Exception
Gets menu item with ActionCommand name "menuItemName" from the menu with ActionCommand name "menuName"

Parameters:
menuName - String
menuItemName - String
Returns:
JMenuItem
Throws:
java.lang.Exception

removeMenuItem

public javax.swing.JMenuItem removeMenuItem(java.lang.String menuName,
                                            java.lang.String menuItemName)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getMolecule

public MoleculeInterface getMolecule()

getJ3DUniverse

public Java3dUniverse getJ3DUniverse()

setMolecule

public void setMolecule(Molecule m)

setMolecule

public void setMolecule(MoleculeInterface m)

jButton3_actionPerformed

public void jButton3_actionPerformed(java.awt.event.ActionEvent e)

childFinished

public void childFinished(java.lang.Object child)
Description copied from interface: ParentInterface
To inform parent that its child process finished its execution

Specified by:
childFinished in interface ParentInterface
Parameters:
child - Object - Some ID of a child given by parent

interceptStderr

public void interceptStderr(boolean enable)
Enables/disables redirection of stderr.

Parameters:
enable - boolean - if true, redirects sdterr to the errors log panel and adds "Errors Log" menu item to the File menu. if false, remove menu item from the File menu and directs sdterr to the standard stream

getComponent

public java.awt.Component getComponent()
Description copied from interface: ParentInterface
Gets parent component (if any)

Specified by:
getComponent in interface ParentInterface
Specified by:
getComponent in interface ShadowClientInterface
Returns:
Component

getParentFrame

public java.awt.Frame getParentFrame()
Specified by:
getParentFrame in interface ParentInterface

setKnownHosts

public void setKnownHosts(java.lang.String[] hosts)
Specified by:
setKnownHosts in interface ShadowClientInterface

setFileBrowser

public void setFileBrowser(java.lang.String host,
                           java.lang.String username,
                           FileBrowserInterface file_browser)
Specified by:
setFileBrowser in interface ShadowClientInterface

loadFromSFTP

public void loadFromSFTP(java.awt.event.ActionEvent e)