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:
  • Constructor Details

    • JMatrixPanel

      public JMatrixPanel()
  • Method Details

    • getSelectedAlignmentPos

      public int getSelectedAlignmentPos()
    • setSelectedAlignmentPos

      public void setSelectedAlignmentPos(int selectedAlignmentPos)
    • getAlternativeAligs

      public AlternativeAlignment[] getAlternativeAligs()
    • setAlternativeAligs

      public void setAlternativeAligs(AlternativeAlignment[] aligs)
    • getFragmentPairs

      public FragmentPair[] getFragmentPairs()
    • setFragmentPairs

      public void setFragmentPairs(FragmentPair[] fragmentPairs)
    • getScale

      public float getScale()
    • setPreferredSize

      public void setPreferredSize()
    • setScale

      public void setScale(float scale)
    • getMatrix

      public Matrix getMatrix()
    • setMatrix

      public void setMatrix(Matrix matrix)
      sets the distance matrix to be displayed
      Parameters:
      matrix -
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • 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 -
    • getSaturation

      @Deprecated public float getSaturation()
      Deprecated.
    • setSaturation

      @Deprecated public void setSaturation(float saturation)
      Deprecated.
    • getScalevalue

      @Deprecated public float getScalevalue()
      Deprecated.
    • setScalevalue

      @Deprecated public void setScalevalue(float scalevalue)
      Deprecated.
    • 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