Package PamView
Class ColourScheme
java.lang.Object
PamView.ColourScheme
- All Implemented Interfaces:
Serializable
,Cloneable
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ColourScheme
createDefaultDayScheme
(int colourBlindPalet2) static ColourScheme
createDefaultNightScheme
(int colourBlind) static ColourScheme
createDefaultPrintScheme
(int colourBlind) get
(PamColors.PamColor key) Get a particular colourgetChannelColour
(int iCol) Get a channel colour, cycling through a fixed number of colours if the colour index is greater than then number of colours.int
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.getName()
int
Get the number of whale coloursgetWhaleColour
(int iCol) Get a whale colour, recycling through colours, but missing out 0 if the whale colour gets greater than the number of available coloursint
getWhaleColourIndex
(int iCol) Get a whale colour index.void
put
(PamColors.PamColor key, Color value) Set a whale colourvoid
setDefaults
(int colourBlind) Set a load of default colours.void
setWhaleColor
(int whaleId, Color color)
-
Field Details
-
DAYSCHEME
- See Also:
-
NIGHTSCHEME
- See Also:
-
PRINTSCHEME
- See Also:
-
-
Constructor Details
-
ColourScheme
-
-
Method Details
-
put
Set a whale colour- Parameters:
key
- colour keyvalue
- colour value
-
get
Get a particular colour- Parameters:
key
- Colour key- Returns:
- a colour or null if not in table.
-
getName
- Returns:
- The colour scheme name
-
getWhaleColour
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
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
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
-
setDefaults
public void setDefaults(int colourBlind) Set a load of default colours. -
createDefaultDayScheme
-
createDefaultPrintScheme
-
createDefaultNightScheme
-
getColourBlind
public int getColourBlind()- Returns:
- the colourBlind
-