net.sf.jtreemap.swing
Class UniqueColorProvider

java.lang.Object
  extended by net.sf.jtreemap.swing.ColorProvider
      extended by net.sf.jtreemap.swing.UniqueColorProvider
All Implemented Interfaces:
java.io.Serializable

public class UniqueColorProvider
extends ColorProvider

Color Provider by default.
All values are associated to a unique color.

See Also:
Serialized Form
 

Constructor Summary
UniqueColorProvider()
          Constructor.
UniqueColorProvider(java.awt.Color color)
          Constructor.
 
Method Summary
 java.awt.Color getColor(Value value)
          get the associated color to the value.
 javax.swing.JPanel getLegendPanel()
          get a legend JPanel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueColorProvider

public UniqueColorProvider()
Constructor.


UniqueColorProvider

public UniqueColorProvider(java.awt.Color color)
Constructor.

Parameters:
color - unique color
Method Detail

getColor

public java.awt.Color getColor(Value value)
Description copied from class: ColorProvider
get the associated color to the value.

Specified by:
getColor in class ColorProvider
Parameters:
value - double value
Returns:
the associated color to the value

getLegendPanel

public javax.swing.JPanel getLegendPanel()
Description copied from class: ColorProvider
get a legend JPanel.

Specified by:
getLegendPanel in class ColorProvider
Returns:
a legend JPanel