gov.noaa.pmel.sgt
Class ColorMap

java.lang.Object
  |
  +--gov.noaa.pmel.sgt.ColorMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
CLIndexedColorMap, CLTransformColorMap, IndexedColorMap, TransformColorMap

public abstract class ColorMap
extends java.lang.Object
implements java.lang.Cloneable, java.beans.PropertyChangeListener, java.io.Serializable

ColorMap provides a mapping from an index or value to a Color. Several methods of mapping an index or value to a Color are summarized below.

IndexedColorMap
Color is determined from an array, the index computed from a Transform.
TransformColorMap
Red, green, blue Color components are computed from Transforms.
CLIndexedColorMap
Color is determined from and array, the index computed from a ContourLevels object.
CLTransformColorMap
Red, green, blue Color components are computed from Transforms, using the index computed from a ContourLevels object divided by the maximum index value.

Since:
1.0
Version:
$Revision: 1.14 $, $Date: 2002/06/14 17:12:25 $
Author:
Donald Denbo
See Also:
Serialized Form

Constructor Summary
ColorMap()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add listener to changes in ColorMap properties.
abstract  ColorMap copy()
           
abstract  boolean equals(ColorMap cm)
          Test for equality of color maps.
abstract  java.awt.Color getColor(double val)
          Get a Color.
abstract  Range2D getRange()
          Get the current user range for the Transforms or ContourLevel.
 boolean isBatch()
          Is the attribute in batch mode?
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove listener.
 void setBatch(boolean batch)
          Batch the changes to the ColorMap.
 void setBatch(boolean batch, boolean local)
          Batch the changes to the ColorMap and set local flag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorMap

public ColorMap()
Method Detail

copy

public abstract ColorMap copy()

getColor

public abstract java.awt.Color getColor(double val)
Get a Color.

Parameters:
val - Value
Returns:
Color

getRange

public abstract Range2D getRange()
Get the current user range for the Transforms or ContourLevel.

Returns:
user range

equals

public abstract boolean equals(ColorMap cm)
Test for equality of color maps.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add listener to changes in ColorMap properties.


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove listener.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

setBatch

public void setBatch(boolean batch)
Batch the changes to the ColorMap.

Since:
3.0

setBatch

public void setBatch(boolean batch,
                     boolean local)
Batch the changes to the ColorMap and set local flag. Determines whether AttributeChangeEvent will be set local.

Since:
3.0

isBatch

public boolean isBatch()
Is the attribute in batch mode?

Since:
3.0


Send comments about the Scientific Graphics toolkit to Donald.W.Denbo@noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on October 9 2003