Class AbstractAlignmentJmol
- java.lang.Object
-
- org.biojava.nbio.structure.align.gui.jmol.AbstractAlignmentJmol
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.awt.event.WindowListener,java.util.EventListener
- Direct Known Subclasses:
MultipleAlignmentJmol,StructureAlignmentJmol
public abstract class AbstractAlignmentJmol extends java.lang.Object implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.awt.event.WindowListener, java.awt.event.ActionListenerAn 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 ColorBrewercolorPaletteprotected static java.lang.StringCOMMAND_LINE_HELPprotected static intDEFAULT_HEIGHTprotected static java.lang.StringDEFAULT_SCRIPTprotected static intDEFAULT_WIDTHprotected javax.swing.JFrameframeprotected JmolPaneljmolPanelprotected static intnrOpenWindowsprotected javax.swing.JTextFieldstatusprotected Structurestructureprotected javax.swing.JTextFieldtext
-
Constructor Summary
Constructors Constructor Description AbstractAlignmentJmol()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidactionPerformed(java.awt.event.ActionEvent e)voiddestroy()Set all the member variables to null.voidevalString(java.lang.String rasmolScript)Execute a command String in the current Jmol panel.ColorBrewergetColorPalette()Return the color pattelete of the AlignmentJmol instance.abstract java.util.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.java.lang.StringgetTitle()Return the title of the AlignmentJmol window.protected abstract voidinitCoords()Display the structures after the variable initialization in the constructor.voidmouseClicked(java.awt.event.MouseEvent e)voidmouseDragged(java.awt.event.MouseEvent e)voidmouseEntered(java.awt.event.MouseEvent e)voidmouseExited(java.awt.event.MouseEvent e)voidmouseMoved(java.awt.event.MouseEvent e)voidmousePressed(java.awt.event.MouseEvent e)voidmouseReleased(java.awt.event.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(java.lang.String title)Set the title of the AlignmentJmol window.voidwindowActivated(java.awt.event.WindowEvent e)voidwindowClosed(java.awt.event.WindowEvent e)voidwindowClosing(java.awt.event.WindowEvent e)voidwindowDeactivated(java.awt.event.WindowEvent e)voidwindowDeiconified(java.awt.event.WindowEvent e)voidwindowIconified(java.awt.event.WindowEvent e)voidwindowOpened(java.awt.event.WindowEvent e)
-
-
-
Field Detail
-
structure
protected Structure structure
-
colorPalette
protected ColorBrewer colorPalette
-
jmolPanel
protected JmolPanel jmolPanel
-
frame
protected javax.swing.JFrame frame
-
text
protected javax.swing.JTextField text
-
status
protected javax.swing.JTextField status
-
COMMAND_LINE_HELP
protected static final java.lang.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 java.lang.String DEFAULT_SCRIPT
-
nrOpenWindows
protected static int nrOpenWindows
-
-
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 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(java.lang.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 java.util.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(java.lang.String title)
Set the title of the AlignmentJmol window.- Parameters:
label-
-
getTitle
public java.lang.String getTitle()
Return the title of the AlignmentJmol window.
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
-
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivatedin interfacejava.awt.event.WindowListener
-
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosedin interfacejava.awt.event.WindowListener
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Specified by:
windowClosingin interfacejava.awt.event.WindowListener
-
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivatedin interfacejava.awt.event.WindowListener
-
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconifiedin interfacejava.awt.event.WindowListener
-
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconifiedin interfacejava.awt.event.WindowListener
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpenedin interfacejava.awt.event.WindowListener
-
actionPerformed
public abstract void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
-