Class SequenceScalePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SequenceScalePanel extends JPanel
A class that draws a Sequence as a rectangle, a scale display over it.
Since:
1.7
Author:
Andreas Prlic
See Also:
  • Field Details

    • DEFAULT_X_START

      public static final int DEFAULT_X_START
      See Also:
    • DEFAULT_X_RIGHT_BORDER

      public static final int DEFAULT_X_RIGHT_BORDER
      See Also:
    • DEFAULT_Y_START

      public static final int DEFAULT_Y_START
      See Also:
    • DEFAULT_Y_STEP

      public static final int DEFAULT_Y_STEP
      See Also:
    • DEFAULT_Y_HEIGHT

      public static final int DEFAULT_Y_HEIGHT
      See Also:
    • DEFAULT_Y_BOTTOM

      public static final int DEFAULT_Y_BOTTOM
      See Also:
    • LINE_HEIGHT

      public static final int LINE_HEIGHT
      See Also:
    • MINIMUM_HEIGHT

      public static final int MINIMUM_HEIGHT
      See Also:
    • SEQUENCE_COLOR

      public static final Color SEQUENCE_COLOR
    • SCALE_COLOR

      public static final Color SCALE_COLOR
    • TEXT_SCALE_COLOR

      public static final Color TEXT_SCALE_COLOR
    • IDX_COLOR

      public static final Color IDX_COLOR
    • GAP_COLOR

      public static final Color GAP_COLOR
    • BACKGROUND_COLOR

      public static final Color BACKGROUND_COLOR
    • seqFont

      public static final Font seqFont
    • SIZE

      public static final int SIZE
      See Also:
  • Constructor Details

    • SequenceScalePanel

      public SequenceScalePanel(int position)
  • Method Details

    • setAligMap

      public void setAligMap(List<AlignedPosition> apos)
    • setChain

      public void setChain(Chain c)
    • getChain

      public Chain getChain()
    • getScale

      public float getScale()
    • setScale

      public void setScale(float scale)
    • setPaintDefaults

      protected void setPaintDefaults(Graphics2D g2D)
      set some default rendering hints, like text antialiasing on
      Parameters:
      g2D - the graphics object to set the defaults on
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • drawScale

      protected int drawScale(Graphics2D g2D, int y)
      draw the Scale
      Parameters:
      g2D -
      y - the height on which to draw the scale
      Returns:
      the new y position
    • drawIdx

      protected void drawIdx(Graphics2D g2D, int y)
    • drawSequence

      protected int drawSequence(Graphics2D g2D, int y)
      draw the Amino acid sequence
      Parameters:
      g2D -
      y - .. height of line to draw the sequence onto
      Returns:
      the new y value