Package PamView
Class PamColors
java.lang.Object
PamView.PamColors
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider
- 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.
 
- 
Nested Class Summary
Nested Classes - 
Method Summary
Modifier and TypeMethodDescriptionGet the standard border colourgetChannelColor(int iChan) static PamColorsstatic StringGet a colour string in the format (RRR,GGG,BBB)intlonggetWhaleColor(int col) intgetWhaleColourIndex(int iCol) static ColorinterpretColourString(String colString) Interpret a colour string of the type used in Logger forms.voidnotifyContianer(Container container) Tells a container to set it's colour and the colour of all it's components if they implement the ColorManaged interface.voidnotifyModelChanged(int changeType) booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) protected voidsetBlindPalet(int selected) voidsetColor(Component component, PamColors.PamColor col) Color a component immediately.void 
- 
Method Details
- 
getMenu
 - 
setBlindPalet
protected void setBlindPalet(int selected)  - 
getInstance
 - 
notifyModelChanged
public void notifyModelChanged(int changeType)  - 
setColors
public void setColors() - 
notifyContianer
Tells a container to set it's colour and the colour of all it's components if they implement the ColorManaged interface.Generally this should be called initially for each frame to start the iteration through all the swing components.
- Parameters:
 container- container / or frame to start searching from
 - 
setColor
Color a component immediately.- Parameters:
 component-col-
 - 
getColor
 - 
getForegroudColor
 - 
getWhaleColor
 - 
getChannelColor
 - 
getBoldFont
 - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
getUnitName
- Specified by:
 getUnitNamein interfaceSettingsNameProvider- Returns:
 - A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
 
 - 
getUnitType
- Specified by:
 getUnitTypein interfacePamSettings- Returns:
 - A Name specific to the type, e.g. Click detector
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- 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
 - 
interpretColourString
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
Get a colour string in the format (RRR,GGG,BBB)- Parameters:
 col- Colour- Returns:
 - null if col is null or formatted string.
 
 - 
getBorderColour
Get the standard border colour- Returns:
 - border colour.
 
 - 
getGPSColor
 - 
getNWhaleColours
public int getNWhaleColours() - 
getWhaleColourIndex
public int getWhaleColourIndex(int iCol)  - 
getColourScheme
- Returns:
 - the colourScheme
 
 
 -