Package PamView
Class ColourScheme
java.lang.Object
PamView.ColourScheme
- All Implemented Interfaces:
Serializable,Cloneable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColourSchemecreateDefaultDayScheme(int colourBlindPalet2) static ColourSchemecreateDefaultNightScheme(int colourBlind) static ColourSchemecreateDefaultPrintScheme(int colourBlind) get(PamColors.PamColor key) Get a particular colourprotected Color[]getChannelColour(int iCol) Get a channel colour, cycling through a fixed number of colours if the colour index is greater than then number of colours.intprotected Color[]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()intGet the number of whale coloursprotected Color[]getWhaleColour(int iCol) Get a whale colour, recycling through colours, but missing out 0 if the whale colour gets greater than the number of available coloursintgetWhaleColourIndex(int iCol) Get a whale colour index.voidput(PamColors.PamColor key, Color value) Set a whale colourprotected voidsetChannelColors(Color[] channelColors) voidsetDefaults(int colourBlind) Set a load of default colours.protected voidsetLineColors(Color[] lineColors) voidsetWhaleColor(int whaleId, Color color) protected voidsetWhaleColors(Color[] whaleColors)
-
Field Details
-
DAYSCHEME
- See Also:
-
NIGHTSCHEME
- See Also:
-
PRINTSCHEME
- See Also:
-
channelColors
-
lineColors
-
whaleColors
-
-
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
-
getChannelColors
- Returns:
- the channelColors
-
setChannelColors
- Parameters:
channelColors- the channelColors to set
-
getLineColors
- Returns:
- the lineColors
-
setLineColors
- Parameters:
lineColors- the lineColors to set
-
getWhaleColors
- Returns:
- the whaleColors
-
setWhaleColors
- Parameters:
whaleColors- the whaleColors to set
-
setWhaleColor
-
setDefaults
public void setDefaults(int colourBlind) Set a load of default colours. -
createDefaultDayScheme
-
createDefaultPrintScheme
-
createDefaultNightScheme
-
getColourBlind
public int getColourBlind()- Returns:
- the colourBlind
-