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.ColorBrewer
colorPalette
protected static String
COMMAND_LINE_HELP
protected static int
DEFAULT_HEIGHT
protected static String
DEFAULT_SCRIPT
protected static int
DEFAULT_WIDTH
protected JFrame
frame
protected JmolPanel
jmolPanel
protected static int
nrOpenWindows
protected JTextField
status
protected Structure
structure
protected 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(ActionEvent e)
void
destroy()
Set all the member variables to null.void
evalString(String rasmolScript)
Execute a command String in the current Jmol panel.org.jcolorbrewer.ColorBrewer
getColorPalette()
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.JmolPanel
getJmolPanel()
Return the jmolPanel instance of the AlignmentJmol.Structure
getStructure()
Return the current Structure in the AlignmentJmol instance.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(MouseEvent e)
void
mouseDragged(MouseEvent e)
void
mouseEntered(MouseEvent e)
void
mouseExited(MouseEvent e)
void
mouseMoved(MouseEvent e)
void
mousePressed(MouseEvent e)
void
mouseReleased(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(String title)
Set the title of the AlignmentJmol window.void
windowActivated(WindowEvent e)
void
windowClosed(WindowEvent e)
void
windowClosing(WindowEvent e)
void
windowDeactivated(WindowEvent e)
void
windowDeiconified(WindowEvent e)
void
windowIconified(WindowEvent e)
void
windowOpened(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:
mouseDragged
in interfaceMouseMotionListener
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interfaceMouseListener
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interfaceMouseListener
-
windowActivated
public void windowActivated(WindowEvent e)
- Specified by:
windowActivated
in interfaceWindowListener
-
windowClosed
public void windowClosed(WindowEvent e)
- Specified by:
windowClosed
in interfaceWindowListener
-
windowClosing
public void windowClosing(WindowEvent e)
- Specified by:
windowClosing
in interfaceWindowListener
-
windowDeactivated
public void windowDeactivated(WindowEvent e)
- Specified by:
windowDeactivated
in interfaceWindowListener
-
windowDeiconified
public void windowDeiconified(WindowEvent e)
- Specified by:
windowDeiconified
in interfaceWindowListener
-
windowIconified
public void windowIconified(WindowEvent e)
- Specified by:
windowIconified
in interfaceWindowListener
-
windowOpened
public void windowOpened(WindowEvent e)
- Specified by:
windowOpened
in interfaceWindowListener
-
actionPerformed
public abstract void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interfaceActionListener
-
-