org.askalon.graph.chart
Class SurfaceColorCalculator

java.lang.Object
  extended by org.askalon.graph.chart.SurfaceColorCalculator

public class SurfaceColorCalculator
extends Object

This class calculates the color of a surface of the SurfaceChart, based on it's current height. It's intended for internal use only.

Author:
Georg Schild and Franz Endstrasser

Constructor Summary
SurfaceColorCalculator()
           
 
Method Summary
 Color getColorForHeight(double height)
          Gets the color for a given height, based on the current minimum and maximum value.
static Color getColorForPercent(double percent)
          Gets the color for a given (normalized) value between 0.0 and 1.0.
 void setMaxValue(double value)
          Sets the maximum value, which is the current highest value.
 void setMinValue(double value)
          Sets the minimum value, which is the current lowest height.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SurfaceColorCalculator

public SurfaceColorCalculator()
Method Detail

setMinValue

public void setMinValue(double value)
Sets the minimum value, which is the current lowest height.

Parameters:
value - the new minimum value

setMaxValue

public void setMaxValue(double value)
Sets the maximum value, which is the current highest value.

Parameters:
value - the new maximum value

getColorForHeight

public Color getColorForHeight(double height)
Gets the color for a given height, based on the current minimum and maximum value.

Parameters:
height - the height for which the color should be calculated
Returns:
the colur for this height
See Also:
Color

getColorForPercent

public static Color getColorForPercent(double percent)
Gets the color for a given (normalized) value between 0.0 and 1.0.

Parameters:
percent - value between 0.0 and 1.0
Returns:
the color for this height
See Also:
Color


Part of:
Askalon_Logo
ASKALON Visualisation Diagrams