PamView
Class ColourArray
java.lang.Object
PamView.ColourArray
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class ColourArray
- extends java.lang.Object
- implements java.lang.Cloneable, java.io.Serializable
A series of functions for creating arrays of colours
Can be used for spectrogram colouring, contour colouring, etc.
- Author:
- Doug Gillespie
- See Also:
- Serialized Form
|
Field Summary |
private java.awt.Color[] |
colours
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
colours
private java.awt.Color[] colours
ColourArray
private ColourArray()
getName
public static java.lang.String getName(ColourArray.ColourArrayType type)
createStandardColourArray
public static ColourArray createStandardColourArray(int nPoints,
ColourArray.ColourArrayType type)
createWhiteToBlackArray
public static ColourArray createWhiteToBlackArray(int nPoints)
createBlackToWhiteArray
public static ColourArray createBlackToWhiteArray(int nPoints)
createHotArray
public static ColourArray createHotArray(int nPoints)
createMultiColouredArray
public 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.
- Parameters:
nPoints - total number of colour pointscolourList - variable number of colours.
- Returns:
- a new ColourArray object.
createMergedArray
public static ColourArray createMergedArray(int nPoints,
java.awt.Color c1,
java.awt.Color c2)
getColours
public java.awt.Color[] getColours()
getColour
public java.awt.Color getColour(int iCol)
getIntColourArray
public int[] getIntColourArray(int iCol)
getNumbColours
public int getNumbColours()
reverseArray
public void reverseArray()
clone
protected ColourArray clone()
- Overrides:
clone in class java.lang.Object