Class ColorParameters

java.lang.Object
jspecview.common.Parameters
jspecview.common.ColorParameters
Direct Known Subclasses:
AwtParameters, JsParameters

public abstract class ColorParameters extends Parameters
This a representation of the Display Scheme for the spectral display.
Author:
Debbie-Ann Facey, Khari A. Bryan, Prof Robert J. Lancashire
  • Field Details

  • Constructor Details

    • ColorParameters

      public ColorParameters()
  • Method Details

    • getColor3

      protected abstract GenericColor getColor3(int r, int g, int b)
    • getColor1

      protected abstract GenericColor getColor1(int rgb)
    • isValidFontName

      protected abstract boolean isValidFontName(String value)
    • setFor

      public void setFor(JSVPanel jsvp, ColorParameters ds, boolean includeMeasures)
    • set

      public void set(PanelData pd, ScriptToken st, String value)
    • getElementColor

      public GenericColor getElementColor(ScriptToken st)
      Gets the color of an element in the scheme
      Parameters:
      st -
      Returns:
      the Color of the element
    • setColor

      public GenericColor setColor(ScriptToken st, GenericColor color)
      Sets the color of an element
      Parameters:
      st -
      color - the color the element should have
      Returns:
      color object
    • copy

      public abstract ColorParameters copy(String newName)
      Returns a copy of this DisplayScheme with a new name
      Parameters:
      newName - the new name
      Returns:
      a copy of this DisplayScheme with a new name
    • copy

      public ColorParameters copy()
      Returns a copy of this DisplayScheme
      Returns:
      a copy of this DisplayScheme
    • setElementColors

      public ColorParameters setElementColors(ColorParameters p)
    • getColorFromString

      public GenericColor getColorFromString(String name)
    • getPlotColors

      protected GenericColor[] getPlotColors(String plotColorsStr)
      Parameters:
      plotColorsStr -
      Returns:
      Color[]
    • setColorFromString

      protected GenericColor setColorFromString(ScriptToken st, String value)
      Parameters:
      st -
      value -
      Returns:
      color object
    • getFontName

      public String getFontName(ScriptToken st, String value)
      Parameters:
      st -
      value -
      Returns:
      font object