tpp
Class ColourScheme

java.lang.Object
  extended by tpp.ColourScheme
All Implemented Interfaces:
java.io.Serializable

public class ColourScheme
extends java.lang.Object
implements java.io.Serializable

A ColourScheme is made up of a palette of colors for drawing a TPP graph. Objects can be colored in one of two ways: unordered or ordered. The first are suitable for nominal classifications, the second for numeric variables with a lower and upper bound. TODO implement the other color schemes from here:http://colorbrewer2.org/

See Also:
Serialized Form

Field Summary
static ColourScheme DARK
           
static int INTERVALS
          The number of colors in the spectrum.
static ColourScheme LIGHT
           
 
Method Summary
 java.awt.Color getAxesColor()
           
 java.awt.Color getBackgroundColor()
           
 java.awt.Color getClassificationColor(int c)
           
 java.awt.Color[] getClassificationColors()
           
 java.awt.Color getColorFromSpectrum(double c, double lowerBound, double upperBound)
          Get a color for representing a value of c within a range of [lower,upper].
 java.awt.Color getForegroundColor()
           
 java.awt.Color[] getSpectrum()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INTERVALS

public static final int INTERVALS
The number of colors in the spectrum. In fact this is the number of intervals in a half-range. So if INTERVAL=3 there will be 7 colors in a bipolar spectrum (+ve and -ve).

See Also:
Constant Field Values

DARK

public static final ColourScheme DARK

LIGHT

public static final ColourScheme LIGHT
Method Detail

getAxesColor

public java.awt.Color getAxesColor()

getBackgroundColor

public java.awt.Color getBackgroundColor()

getClassificationColors

public java.awt.Color[] getClassificationColors()

getClassificationColor

public java.awt.Color getClassificationColor(int c)

getColorFromSpectrum

public java.awt.Color getColorFromSpectrum(double c,
                                           double lowerBound,
                                           double upperBound)
Get a color for representing a value of c within a range of [lower,upper].


getForegroundColor

public java.awt.Color getForegroundColor()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSpectrum

public java.awt.Color[] getSpectrum()