PamView
Class PamColors
java.lang.Object
PamView.PamColors
- All Implemented Interfaces:
- PamSettings
public class PamColors
- extends java.lang.Object
- implements PamSettings
- Author:
- Doug Gillespie
Some standard colours to use for various bits of a view.
Ultimately, it should bepossible 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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
singleInstance
private static PamColors singleInstance
pamBorder
private java.awt.Color pamBorder
pamWarningBorder
private java.awt.Color pamWarningBorder
pamPlotWindow
private java.awt.Color pamPlotWindow
plain
private java.awt.Color plain
axis
private java.awt.Color axis
grid
private java.awt.Color grid
channelColors
private java.awt.Color[] channelColors
lineColors
private java.awt.Color[] lineColors
mapColor
private java.awt.Color mapColor
NWHALECOLORS
public final int NWHALECOLORS
- See Also:
- Constant Field Values
whaleColors
private java.awt.Color[] whaleColors
nightMenuEnabler
private MenuItemEnabler nightMenuEnabler
dayMenuEnabler
private MenuItemEnabler dayMenuEnabler
colorSettings
private ColorSettings colorSettings
boldFont
private static java.awt.Font boldFont
PamColors
private PamColors()
getMenu
public javax.swing.JMenuItem getMenu()
setNightTime
public void setNightTime()
setDayTime
public void setDayTime()
getInstance
public static PamColors getInstance()
notifyModelChanged
public void notifyModelChanged(int changeType)
setColors
public void setColors()
notifyAllComponents
private void notifyAllComponents()
notifyContianer
public void notifyContianer(java.awt.Container container)
- 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
setColorManagedColor
private void setColorManagedColor(java.awt.Component c)
setColor
public void setColor(java.awt.Component component,
PamColors.PamColor col)
- Color a component immediately.
- Parameters:
component - col -
getColor
public java.awt.Color getColor(PamColors.PamColor col)
getForegroudColor
public java.awt.Color getForegroudColor(PamColors.PamColor col)
getWhaleColor
public java.awt.Color getWhaleColor(int col)
getChannelColor
public java.awt.Color getChannelColor(int iChan)
getBoldFont
public java.awt.Font getBoldFont()
getSettingsReference
public java.io.Serializable getSettingsReference()
- Specified by:
getSettingsReference in interface PamSettings
- Returns:
- The serialisable object that will be stored
getSettingsVersion
public long getSettingsVersion()
- Specified by:
getSettingsVersion in interface PamSettings
- Returns:
- An integer version number for the settings
getUnitName
public java.lang.String getUnitName()
- Specified by:
getUnitName in interface PamSettings
- Returns:
- A Name specific to this instance of the particular class, e.g.
Sperm whale detector, Beaked whale detector, etc.
getUnitType
public java.lang.String getUnitType()
- Specified by:
getUnitType in interface PamSettings
- Returns:
- A Name specific to the type, e.g. Glick detector
restoreSettings
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
public ColorSettings getColorSettings()