Class JMatrixPanel

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public class JMatrixPanel
    extends JPanel
    a JPanel that can display a difference of distance matrix and paths that have been taken for the alignment

    Note: This panel displays the transpose of its underlying matrix. Thus its width will be the same as Matrix.getRowDimension() and its height the same as Matrix.getColumnDimension(). This stems from the unfortunate ordering of Matrix.get(int, int) parameters as (row, col), which is opposite from the normal (x,y) order used when displaying graphics.

    Author:
    Andreas Prlic
    See Also:
    Serialized Form
    • Constructor Detail

      • JMatrixPanel

        public JMatrixPanel()
    • Method Detail

      • getSelectedAlignmentPos

        public int getSelectedAlignmentPos()
      • setSelectedAlignmentPos

        public void setSelectedAlignmentPos​(int selectedAlignmentPos)
      • getAlternativeAligs

        public org.biojava.nbio.structure.align.pairwise.AlternativeAlignment[] getAlternativeAligs()
      • setAlternativeAligs

        public void setAlternativeAligs​(org.biojava.nbio.structure.align.pairwise.AlternativeAlignment[] aligs)
      • getFragmentPairs

        public org.biojava.nbio.structure.align.pairwise.FragmentPair[] getFragmentPairs()
      • setFragmentPairs

        public void setFragmentPairs​(org.biojava.nbio.structure.align.pairwise.FragmentPair[] fragmentPairs)
      • getScale

        public float getScale()
      • setPreferredSize

        public void setPreferredSize()
      • setScale

        public void setScale​(float scale)
      • getMatrix

        public org.biojava.nbio.structure.jama.Matrix getMatrix()
      • setMatrix

        public void setMatrix​(org.biojava.nbio.structure.jama.Matrix matrix)
        sets the distance matrix to be displayed
        Parameters:
        matrix -
      • drawPairs

        public void drawPairs​(Graphics g)
        draw alternative alignments
        Parameters:
        g -
      • drawBoxes

        public void drawBoxes​(Graphics g)
        draw high scoring fragments that are used for the initial alignment seed selection
        Parameters:
        g -
      • drawDistances

        public void drawDistances​(Graphics g1)
        For each element in matrix, draw it as a colored square or pixel. The color of a matrix element with value x is specified as - H: 1-x/scalevalue - S: saturation - B: 1-x/scalevalue
        Parameters:
        g1 -
      • getCellColor

        public ContinuousColorMapper getCellColor()
        Returns:
        the color mapping of the JMatrixPanel
      • setCellColor

        public void setCellColor​(ContinuousColorMapper cellColor)
        Parameters:
        cellColor - the color mapping of the JMatrixPanel to set