public class PamColors extends java.lang.Object implements PamSettings
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.
Modifier and Type | Class and Description |
---|---|
static class |
PamColors.PamColor |
Modifier and Type | Field and Description |
---|---|
int |
NWHALECOLORS |
Modifier and Type | Method and Description |
---|---|
java.awt.Font |
getBoldFont() |
static java.awt.Color |
getBorderColour()
Get the standard border colour
|
java.awt.Color |
getChannelColor(int iChan) |
java.awt.Color |
getColor(PamColors.PamColor col) |
ColorSettings |
getColorSettings() |
java.awt.Color |
getForegroudColor(PamColors.PamColor col) |
static PamColors |
getInstance() |
static java.lang.String |
getLoggerColourString(java.awt.Color col)
Get a colour string in the format (RRR,GGG,BBB)
|
javax.swing.JMenuItem |
getMenu() |
java.io.Serializable |
getSettingsReference() |
long |
getSettingsVersion() |
java.lang.String |
getUnitName() |
java.lang.String |
getUnitType() |
java.awt.Color |
getWhaleColor(int col) |
static java.awt.Color |
interpretColourString(java.lang.String colString)
Interpret a colour string of the type used in Logger forms.
|
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.
|
void |
notifyModelChanged(int changeType) |
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) |
void |
setColor(java.awt.Component component,
PamColors.PamColor col)
Color a component immediately.
|
void |
setColors() |
void |
setDayTime() |
void |
setNightTime() |
public final int NWHALECOLORS
public javax.swing.JMenuItem getMenu()
public void setNightTime()
public void setDayTime()
public static PamColors getInstance()
public void notifyModelChanged(int changeType)
public void setColors()
public void notifyContianer(java.awt.Container container)
Generally this should be called initially for each frame to start the iteration through all the swing components.
container
- container / or frame to start searching frompublic void setColor(java.awt.Component component, PamColors.PamColor col)
component
- col
- public java.awt.Color getColor(PamColors.PamColor col)
public java.awt.Color getForegroudColor(PamColors.PamColor col)
public java.awt.Color getWhaleColor(int col)
public java.awt.Color getChannelColor(int iChan)
public java.awt.Font getBoldFont()
public java.io.Serializable getSettingsReference()
getSettingsReference
in interface PamSettings
public long getSettingsVersion()
getSettingsVersion
in interface PamSettings
public java.lang.String getUnitName()
getUnitName
in interface PamSettings
public java.lang.String getUnitType()
getUnitType
in interface PamSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings
in interface PamSettings
public ColorSettings getColorSettings()
public static java.awt.Color interpretColourString(java.lang.String colString)
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.
colString
- Colour stringpublic static java.lang.String getLoggerColourString(java.awt.Color col)
col
- Colourpublic static java.awt.Color getBorderColour()