Class PamColorsFX

java.lang.Object
pamViewFX.fxNodes.PamColorsFX
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class PamColorsFX extends Object implements PamSettings
Author:
Doug Gillespie Some standard colours to use for various bits of a view.

Ultimately, it should be possible to set these dynamically during operation or have night / day settings, etc.

Any bit of the display can register with a single instance of PamColors and it will then receive notifications whenever any of the colours change.

  • Method Details Link icon

    • getInstance Link icon

      public static PamColorsFX getInstance()
    • notifyModelChanged Link icon

      public void notifyModelChanged(int changeType)
    • setColors Link icon

      public void setColors()
    • getColor Link icon

      public javafx.scene.paint.Color getColor(PamColorsFX.PamColor col)
    • getForegroudColor Link icon

      public javafx.scene.paint.Color getForegroudColor(PamColorsFX.PamColor col)
    • getWhaleColor Link icon

      public javafx.scene.paint.Color getWhaleColor(int col)
    • getChannelColor Link icon

      public javafx.scene.paint.Color getChannelColor(int iChan)
    • getBoldFont Link icon

      public javafx.scene.text.Font getBoldFont()
    • getSettingsReference Link icon

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion Link icon

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • getUnitName Link icon

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType Link icon

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • restoreSettings Link icon

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getColorSettings Link icon

      public ColorSettingsFX getColorSettings()
    • interpretColourString Link icon

      public static javafx.scene.paint.Color interpretColourString(String colString)
      Interpret a colour string of the type used in Logger forms.

      These can take two basic formats, first a colour name (e.g. blue) or a RGB code in the format RGB(RRR,GGG,BBB) where RRR, GGG and BBB are integer colour codes for red, green and blue each of which must lie between 0 and 255.

      Parameters:
      colString - Colour string
      Returns:
      colour or null if the colour cannot be interpreted.
    • getLoggerColourString Link icon

      public static String getLoggerColourString(javafx.scene.paint.Color col)
      Get a colour string in the format (RRR,GGG,BBB)
      Parameters:
      col - Colour
      Returns:
      null if col is null or formatted string.
    • getBorderColour Link icon

      public javafx.scene.paint.Color getBorderColour()
      Get the standard border colour
      Returns:
      border colour.
    • getGPSColor Link icon

      public javafx.scene.paint.Color getGPSColor()
    • getNWhaleColours Link icon

      public int getNWhaleColours()
    • getWhaleColourIndex Link icon

      public int getWhaleColourIndex(int iCol)
    • getColourScheme Link icon

      public ColorSchemeFX getColourScheme()
      Returns:
      the colourScheme
    • awtColorToFx Link icon

      public static javafx.scene.paint.Color awtColorToFx(Color color)