Package PamView

Class ColourScheme

java.lang.Object
PamView.ColourScheme
All Implemented Interfaces:
Serializable, Cloneable

public class ColourScheme extends Object implements Serializable, Cloneable
See Also:
  • Field Details

  • Constructor Details

    • ColourScheme

      public ColourScheme(String name, int colourBlind)
  • Method Details

    • put

      public void put(PamColors.PamColor key, Color value)
      Set a whale colour
      Parameters:
      key - colour key
      value - colour value
    • get

      public Color get(PamColors.PamColor key)
      Get a particular colour
      Parameters:
      key - Colour key
      Returns:
      a colour or null if not in table.
    • getName

      public String getName()
      Returns:
      The colour scheme name
    • getWhaleColour

      public Color getWhaleColour(int iCol)
      Get a whale colour, recycling through colours, but missing out 0 if the whale colour gets greater than the number of available colours
      Parameters:
      iCol - colour index
      Returns:
      colour
    • getWhaleColourIndex

      public int getWhaleColourIndex(int iCol)
      Get a whale colour index. this is the mod of the number of colours, but skipping zero.
      Parameters:
      iCol - any number.
      Returns:
      colour index (1 - 12)
    • getNumWhaleColours

      public int getNumWhaleColours()
      Get the number of whale colours
      Returns:
      the number of whale colours
    • getChannelColour

      public Color getChannelColour(int iCol)
      Get a channel colour, cycling through a fixed number of colours if the colour index is greater than then number of colours.
      Parameters:
      iCol - colour index
      Returns:
      Colour
    • getLineColour

      public Color getLineColour(int iCol)
      Get a line colour, cycling through a fixed number of colours if the colour index is greater than then number of colours.
      Parameters:
      iCol - colour index
      Returns:
      Colour
    • setWhaleColor

      public void setWhaleColor(int whaleId, Color color)
    • setDefaults

      public void setDefaults(int colourBlind)
      Set a load of default colours.
    • createDefaultDayScheme

      public static ColourScheme createDefaultDayScheme(int colourBlindPalet2)
    • createDefaultPrintScheme

      public static ColourScheme createDefaultPrintScheme(int colourBlind)
    • createDefaultNightScheme

      public static ColourScheme createDefaultNightScheme(int colourBlind)
    • getColourBlind

      public int getColourBlind()
      Returns:
      the colourBlind