Class AbstractAlignmentJmol
- java.lang.Object
-
- org.biojava.nbio.structure.align.gui.jmol.AbstractAlignmentJmol
-
- All Implemented Interfaces:
ActionListener,MouseListener,MouseMotionListener,WindowListener,EventListener
- Direct Known Subclasses:
MultipleAlignmentJmol,StructureAlignmentJmol
public abstract class AbstractAlignmentJmol extends Object implements MouseMotionListener, MouseListener, WindowListener, ActionListener
An Abstract Class to generalize the visualization of AFP and MultipleAlignment structure alignments in Jmol.- Author:
- Aleix Lafita
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jcolorbrewer.ColorBrewercolorPaletteprotected static StringCOMMAND_LINE_HELPprotected static intDEFAULT_HEIGHTprotected static StringDEFAULT_SCRIPTprotected static intDEFAULT_WIDTHprotected JFrameframeprotected JmolPaneljmolPanelprotected static intnrOpenWindowsprotected JTextFieldstatusprotected Structurestructureprotected JTextFieldtext
-
Constructor Summary
Constructors Constructor Description AbstractAlignmentJmol()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidactionPerformed(ActionEvent e)voiddestroy()Set all the member variables to null.voidevalString(String rasmolScript)Execute a command String in the current Jmol panel.org.jcolorbrewer.ColorBrewergetColorPalette()Return the color pattelete of the AlignmentJmol instance.abstract List<Matrix>getDistanceMatrices()Returns a List of internal Distance Matrices, one for each structure in the alignment.JmolPanelgetJmolPanel()Return the jmolPanel instance of the AlignmentJmol.StructuregetStructure()Return the current Structure in the AlignmentJmol instance.StringgetTitle()Return the title of the AlignmentJmol window.protected abstract voidinitCoords()Display the structures after the variable initialization in the constructor.voidmouseClicked(MouseEvent e)voidmouseDragged(MouseEvent e)voidmouseEntered(MouseEvent e)voidmouseExited(MouseEvent e)voidmouseMoved(MouseEvent e)voidmousePressed(MouseEvent e)voidmouseReleased(MouseEvent e)abstract voidresetDisplay()Return to the initial state of the alignment visualization.voidsetAtoms(Atom[] atoms)Create and set a new structure from a given atom array.voidsetJmolPanel(JmolPanel jmolPanel)Set the jmolPanel of the AlignmentJmol instance.voidsetStructure(Structure s)Set a new Structure to visualize in the AlignmentJmol window.voidsetTitle(String title)Set the title of the AlignmentJmol window.voidwindowActivated(WindowEvent e)voidwindowClosed(WindowEvent e)voidwindowClosing(WindowEvent e)voidwindowDeactivated(WindowEvent e)voidwindowDeiconified(WindowEvent e)voidwindowIconified(WindowEvent e)voidwindowOpened(WindowEvent e)
-
-
-
Field Detail
-
colorPalette
protected org.jcolorbrewer.ColorBrewer colorPalette
-
text
protected JTextField text
-
status
protected JTextField status
-
COMMAND_LINE_HELP
protected static final String COMMAND_LINE_HELP
- See Also:
- Constant Field Values
-
DEFAULT_HEIGHT
protected static final int DEFAULT_HEIGHT
- See Also:
- Constant Field Values
-
DEFAULT_WIDTH
protected static final int DEFAULT_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_SCRIPT
protected static final String DEFAULT_SCRIPT
-
nrOpenWindows
protected static int nrOpenWindows
-
-
Constructor Detail
-
AbstractAlignmentJmol
public AbstractAlignmentJmol()
-
-
Method Detail
-
initCoords
protected abstract void initCoords()
Display the structures after the variable initialization in the constructor.
-
destroy
public void destroy()
Set all the member variables to null.
-
resetDisplay
public abstract void resetDisplay()
Return to the initial state of the alignment visualization.
-
setAtoms
public void setAtoms(Atom[] atoms)
Create and set a new structure from a given atom array.- Parameters:
atoms-
-
getColorPalette
public org.jcolorbrewer.ColorBrewer getColorPalette()
Return the color pattelete of the AlignmentJmol instance.
-
getJmolPanel
public JmolPanel getJmolPanel()
Return the jmolPanel instance of the AlignmentJmol.
-
setJmolPanel
public void setJmolPanel(JmolPanel jmolPanel)
Set the jmolPanel of the AlignmentJmol instance.- Parameters:
jmolPanel-
-
evalString
public void evalString(String rasmolScript)
Execute a command String in the current Jmol panel.- Parameters:
rasmolScript-
-
setStructure
public void setStructure(Structure s)
Set a new Structure to visualize in the AlignmentJmol window.- Parameters:
s-
-
getStructure
public Structure getStructure()
Return the current Structure in the AlignmentJmol instance.
-
getDistanceMatrices
public abstract List<Matrix> getDistanceMatrices()
Returns a List of internal Distance Matrices, one for each structure in the alignment. Returns null if no alignment is being displayed.
-
setTitle
public void setTitle(String title)
Set the title of the AlignmentJmol window.- Parameters:
label-
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExitedin interfaceMouseListener
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleasedin interfaceMouseListener
-
windowActivated
public void windowActivated(WindowEvent e)
- Specified by:
windowActivatedin interfaceWindowListener
-
windowClosed
public void windowClosed(WindowEvent e)
- Specified by:
windowClosedin interfaceWindowListener
-
windowClosing
public void windowClosing(WindowEvent e)
- Specified by:
windowClosingin interfaceWindowListener
-
windowDeactivated
public void windowDeactivated(WindowEvent e)
- Specified by:
windowDeactivatedin interfaceWindowListener
-
windowDeiconified
public void windowDeiconified(WindowEvent e)
- Specified by:
windowDeiconifiedin interfaceWindowListener
-
windowIconified
public void windowIconified(WindowEvent e)
- Specified by:
windowIconifiedin interfaceWindowListener
-
windowOpened
public void windowOpened(WindowEvent e)
- Specified by:
windowOpenedin interfaceWindowListener
-
actionPerformed
public abstract void actionPerformed(ActionEvent e)
- Specified by:
actionPerformedin interfaceActionListener
-
-