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.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 ColorBrewer
colorPalette
protected static java.lang.String
COMMAND_LINE_HELP
protected static int
DEFAULT_HEIGHT
protected static java.lang.String
DEFAULT_SCRIPT
protected static int
DEFAULT_WIDTH
protected javax.swing.JFrame
frame
protected JmolPanel
jmolPanel
protected static int
nrOpenWindows
protected javax.swing.JTextField
status
protected Structure
structure
protected javax.swing.JTextField
text
-
Constructor Summary
Constructors Constructor Description AbstractAlignmentJmol()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
actionPerformed(java.awt.event.ActionEvent e)
void
destroy()
Set all the member variables to null.void
evalString(java.lang.String rasmolScript)
Execute a command String in the current Jmol panel.ColorBrewer
getColorPalette()
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.JmolPanel
getJmolPanel()
Return the jmolPanel instance of the AlignmentJmol.Structure
getStructure()
Return the current Structure in the AlignmentJmol instance.java.lang.String
getTitle()
Return the title of the AlignmentJmol window.protected abstract void
initCoords()
Display the structures after the variable initialization in the constructor.void
mouseClicked(java.awt.event.MouseEvent e)
void
mouseDragged(java.awt.event.MouseEvent e)
void
mouseEntered(java.awt.event.MouseEvent e)
void
mouseExited(java.awt.event.MouseEvent e)
void
mouseMoved(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseReleased(java.awt.event.MouseEvent e)
abstract void
resetDisplay()
Return to the initial state of the alignment visualization.void
setAtoms(Atom[] atoms)
Create and set a new structure from a given atom array.void
setJmolPanel(JmolPanel jmolPanel)
Set the jmolPanel of the AlignmentJmol instance.void
setStructure(Structure s)
Set a new Structure to visualize in the AlignmentJmol window.void
setTitle(java.lang.String title)
Set the title of the AlignmentJmol window.void
windowActivated(java.awt.event.WindowEvent e)
void
windowClosed(java.awt.event.WindowEvent e)
void
windowClosing(java.awt.event.WindowEvent e)
void
windowDeactivated(java.awt.event.WindowEvent e)
void
windowDeiconified(java.awt.event.WindowEvent e)
void
windowIconified(java.awt.event.WindowEvent e)
void
windowOpened(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:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved
in interfacejava.awt.event.MouseMotionListener
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
-
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivated
in interfacejava.awt.event.WindowListener
-
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosed
in interfacejava.awt.event.WindowListener
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
-
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivated
in interfacejava.awt.event.WindowListener
-
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconified
in interfacejava.awt.event.WindowListener
-
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconified
in interfacejava.awt.event.WindowListener
-
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpened
in interfacejava.awt.event.WindowListener
-
actionPerformed
public abstract void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
-