Class 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 Detail

      • 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_SCRIPT

        protected static final java.lang.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 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 interface java.awt.event.MouseMotionListener
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent e)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent e)
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
      • mouseEntered

        public void mouseEntered​(java.awt.event.MouseEvent e)
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent e)
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
      • windowActivated

        public void windowActivated​(java.awt.event.WindowEvent e)
        Specified by:
        windowActivated in interface java.awt.event.WindowListener
      • windowClosed

        public void windowClosed​(java.awt.event.WindowEvent e)
        Specified by:
        windowClosed in interface java.awt.event.WindowListener
      • windowClosing

        public void windowClosing​(java.awt.event.WindowEvent e)
        Specified by:
        windowClosing in interface java.awt.event.WindowListener
      • windowDeactivated

        public void windowDeactivated​(java.awt.event.WindowEvent e)
        Specified by:
        windowDeactivated in interface java.awt.event.WindowListener
      • windowDeiconified

        public void windowDeiconified​(java.awt.event.WindowEvent e)
        Specified by:
        windowDeiconified in interface java.awt.event.WindowListener
      • windowIconified

        public void windowIconified​(java.awt.event.WindowEvent e)
        Specified by:
        windowIconified in interface java.awt.event.WindowListener
      • windowOpened

        public void windowOpened​(java.awt.event.WindowEvent e)
        Specified by:
        windowOpened in interface java.awt.event.WindowListener
      • actionPerformed

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