org.dishevelled.colorscheme
Interface ColorScheme

All Known Implementing Classes:
ContinuousColorScheme, ContinuousDivergentColorScheme, DiscreteColorScheme, DiscreteDivergentColorScheme

public interface ColorScheme

Color scheme.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Method Summary
 Color getColor(double value)
          Return a color appropriate for the specified value.
 ColorFactory getColorFactory()
          Return the color factory for this color scheme.
 Interpolation getInterpolation()
          Return the interpolation method for this color scheme.
 double getMaximumValue()
          Return the maximum potential value for this color scheme.
 double getMinimumValue()
          Return the minimum potential value for this color scheme.
 double getZeroValue()
          Return the zero value for this color scheme.
 void setColorFactory(ColorFactory colorFactory)
          Set the color factory for this color scheme to colorFactory (optional operation).
 void setInterpolation(Interpolation interpolation)
          Set the interpolation method for this color scheme to interpolation (optional operation).
 void setMaximumValue(double maximumValue)
          Set the maximum potential value for this color scheme to maximumValue (optional operation).
 void setMinimumValue(double minimumValue)
          Set the minimum potential value for this color scheme to minimumValue (optional operation).
 void setZeroValue(double zeroValue)
          Set the zero value for this color scheme to zeroValue (optional operation).
 

Method Detail

getMinimumValue

double getMinimumValue()
Return the minimum potential value for this color scheme. Defaults to 0.0d.

Returns:
the minimum potential value for this color scheme

setMinimumValue

void setMinimumValue(double minimumValue)
Set the minimum potential value for this color scheme to minimumValue (optional operation).

Parameters:
minimumValue - minimum potential value
Throws:
UnsupportedOperationException - if this operation is not supported by this color scheme

getMaximumValue

double getMaximumValue()
Return the maximum potential value for this color scheme. Defaults to 1.0d.

Returns:
the maximum potential value for this color scheme

setMaximumValue

void setMaximumValue(double maximumValue)
Set the maximum potential value for this color scheme to maximumValue (optional operation).

Parameters:
maximumValue - maximum potential value
Throws:
UnsupportedOperationException - if this operation is not supported by this color scheme

getZeroValue

double getZeroValue()
Return the zero value for this color scheme.

Returns:
the zero value for this color scheme

setZeroValue

void setZeroValue(double zeroValue)
Set the zero value for this color scheme to zeroValue (optional operation).

Parameters:
zeroValue - zero value
Throws:
UnsupportedOperationException - if this operation is not supported by this color scheme

getColorFactory

ColorFactory getColorFactory()
Return the color factory for this color scheme.

Returns:
the color factory for this color scheme

setColorFactory

void setColorFactory(ColorFactory colorFactory)
Set the color factory for this color scheme to colorFactory (optional operation).

Parameters:
colorFactory - color factory, must not be null
Throws:
UnsupportedOperationException - if this operation is not supported by this color scheme

getInterpolation

Interpolation getInterpolation()
Return the interpolation method for this color scheme. The interpolation method will not be null.

Returns:
the interpolation method for this color scheme

setInterpolation

void setInterpolation(Interpolation interpolation)
Set the interpolation method for this color scheme to interpolation (optional operation).

Parameters:
interpolation - interpolation method, must not be null
Throws:
UnsupportedOperationException - if this operation is not supported by this color scheme

getColor

Color getColor(double value)
Return a color appropriate for the specified value.

Parameters:
value - value
Returns:
a color appropriate for the specified value


Copyright (c) 2009-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).