public class ColourArray
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Can be used for spectrogram colouring, contour colouring, etc.
Modifier and Type | Class and Description |
---|---|
static class |
ColourArray.ColourArrayType |
Modifier and Type | Method and Description |
---|---|
static ColourArray |
createBlackToWhiteArray(int nPoints) |
static ColourArray |
createHotArray(int nPoints) |
static ColourArray |
createMergedArray(int nPoints,
java.awt.Color c1,
java.awt.Color c2) |
static ColourArray |
createMultiColouredArray(int nPoints,
java.awt.Color... colourList)
Create a multicoloured array of colours that merges in turn between each of
the colours given in the list.
|
static ColourArray |
createPatrioticArray(int nPoints) |
static ColourArray |
createRainbowArray(int nPoints) |
static ColourArray |
createStandardColourArray(int nPoints,
ColourArray.ColourArrayType type) |
static ColourArray |
createWhiteToBlackArray(int nPoints) |
java.awt.Color |
getColour(int iCol) |
java.awt.Color[] |
getColours() |
java.awt.Color |
getContrastingColour()
Return a contrasting colour which is different to ALL of the
colours in the array.
|
int[] |
getIntColourArray(int iCol) |
static java.lang.String |
getName(ColourArray.ColourArrayType type) |
int |
getNumbColours() |
void |
reverseArray() |
void |
setContrastingColour(java.awt.Color contrastingColor)
Set a contrasting colour which is different to ALL of the
colours in the array.
|
public static java.lang.String getName(ColourArray.ColourArrayType type)
public static ColourArray createStandardColourArray(int nPoints, ColourArray.ColourArrayType type)
public static ColourArray createWhiteToBlackArray(int nPoints)
public static ColourArray createBlackToWhiteArray(int nPoints)
public static ColourArray createRainbowArray(int nPoints)
public static ColourArray createHotArray(int nPoints)
public static ColourArray createPatrioticArray(int nPoints)
public static ColourArray createMultiColouredArray(int nPoints, java.awt.Color... colourList)
nPoints
- total number of colour pointscolourList
- variable number of colours.public static ColourArray createMergedArray(int nPoints, java.awt.Color c1, java.awt.Color c2)
public java.awt.Color[] getColours()
public java.awt.Color getColour(int iCol)
public int[] getIntColourArray(int iCol)
public int getNumbColours()
public void reverseArray()
public java.awt.Color getContrastingColour()
public void setContrastingColour(java.awt.Color contrastingColor)
contrastingColor
- the contrastingColor to set