Class PamTextDisplay

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants, ColorManaged

public class PamTextDisplay extends JTextField implements ColorManaged
See Also:
  • Constructor Details

    • PamTextDisplay

      public PamTextDisplay()
    • PamTextDisplay

      public PamTextDisplay(Document doc, String text, int columns)
    • PamTextDisplay

      public PamTextDisplay(int columns)
    • PamTextDisplay

      public PamTextDisplay(String text, int columns)
    • PamTextDisplay

      public PamTextDisplay(String text)
  • Method Details

    • getDefaultColor

      public PamColors.PamColor getDefaultColor()
    • setDefaultColor

      public void setDefaultColor(PamColors.PamColor defaultColor)
    • getColorId

      public PamColors.PamColor getColorId()
      Description copied from interface: ColorManaged
      The components colour scheme.
      Specified by:
      getColorId in interface ColorManaged
      Returns:
      PamColor
    • setBackground

      public void setBackground(Color bg)
      Overrides:
      setBackground in class JComponent
    • setForeground

      public void setForeground(Color fg)
      Overrides:
      setForeground in class JComponent
    • getTextColour

      public Color getTextColour(Color foregroundColor)
      Gets a colour for the text. This function can be overridden quite easily to generate bespoke behaviours for text colours.
      Parameters:
      foregroundColor -
      Returns:
      text colour, which will use the foreground colour if the fixed text colour is null.
    • getFixedTextColour

      public Color getFixedTextColour()
      Returns:
      the fixedTextColour
    • setFixedTextColour

      public void setFixedTextColour(Color fixedTextColour)
      Set a fixed text colour. If this is null, then text will be set to the default colour scheme axis colour.
      Parameters:
      fixedTextColour - the fixedTextColour to set