gov.noaa.pmel.sgt
Class GridAttribute

java.lang.Object
  |
  +--gov.noaa.pmel.sgt.GridAttribute
All Implemented Interfaces:
Attribute, java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener

public class GridAttribute
extends java.lang.Object
implements Attribute, java.lang.Cloneable, java.beans.PropertyChangeListener

Sets the rendering style for grid data. ColorMap, ContourLevels are GridAttribute properties.

Since:
1.0
Version:
$Revision: 1.15 $, $Date: 2001/12/13 19:07:04 $
Author:
Donald Denbo
See Also:
GridCartesianRenderer, ContourLevels

Field Summary
static int AREA_FILL
          Area fill style.
static int AREA_FILL_CONTOUR
          Area fill and Contour style.
static int CONTOUR
          Contour line style.
static int RASTER
          Raster style.
static int RASTER_CONTOUR
          Raster and Contour style.
 
Constructor Summary
GridAttribute()
          Default constructor.
GridAttribute(ContourLevels clev)
          GridAttribute constructor for CONTOUR style.
GridAttribute(int style, ColorMap cmap)
          GridAttribute constructor for RASTER and AREA_FILL styles.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add listener to changes in GridAttribute properties.
 GridAttribute copy()
          Copy the GridAttribute.
 ColorMap getColorMap()
          Get the ColorMap.
 ContourLevels getContourLevels()
          Get the ContourLevels.
 int getStyle()
          Get grid style.
 boolean isAreaFill()
          Tests if GridAttribute style is eigther AREA_FILL or AREA_FILL_CONTOUR.
 boolean isContour()
          Tests if GridAttribute style is either CONTOUR, RASTER_CONTOUR, or AREA_FILL_CONTOUR.
 boolean isRaster()
          Tests if GridAttribute style is either RASTER or RASTER_CONTOUR.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          This method gets called when a bound property is changed.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove change listener.
 void setColorMap(ColorMap cmap)
          Set the ColorMap.
 void setContourLevels(ContourLevels clev)
          Set the ContourLevels.
 void setStyle(int st)
          Set the grid style.
 java.lang.String toString()
          Get a String representation of the GridAttribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RASTER

public static final int RASTER
Raster style.

AREA_FILL

public static final int AREA_FILL
Area fill style.

CONTOUR

public static final int CONTOUR
Contour line style.

RASTER_CONTOUR

public static final int RASTER_CONTOUR
Raster and Contour style.
Since:
2.0

AREA_FILL_CONTOUR

public static final int AREA_FILL_CONTOUR
Area fill and Contour style.
Since:
2.0
Constructor Detail

GridAttribute

public GridAttribute()
Default constructor. Default style is RASTER and default ColorMap is null.

GridAttribute

public GridAttribute(int style,
                     ColorMap cmap)
GridAttribute constructor for RASTER and AREA_FILL styles.
Parameters:
style - grid style
cmap - ColorMap

GridAttribute

public GridAttribute(ContourLevels clev)
GridAttribute constructor for CONTOUR style.
Parameters:
clev - ContourLevels
Method Detail

setContourLevels

public void setContourLevels(ContourLevels clev)
Set the ContourLevels.
Property Change: contourLevels.
Parameters:
clev - ContourLevels

getContourLevels

public ContourLevels getContourLevels()
Get the ContourLevels.
Returns:
ContourLevels

copy

public GridAttribute copy()
Copy the GridAttribute.
Returns:
new GridAttribute

setStyle

public void setStyle(int st)
Set the grid style.
Property Change: style.
Parameters:
st - grid style

getStyle

public int getStyle()
Get grid style.
Returns:
grid style

isRaster

public boolean isRaster()
Tests if GridAttribute style is either RASTER or RASTER_CONTOUR.
Since:
2.0

isContour

public boolean isContour()
Tests if GridAttribute style is either CONTOUR, RASTER_CONTOUR, or AREA_FILL_CONTOUR.
Since:
2.0

isAreaFill

public boolean isAreaFill()
Tests if GridAttribute style is eigther AREA_FILL or AREA_FILL_CONTOUR.
Since:
2.0

getColorMap

public ColorMap getColorMap()
Get the ColorMap.
Returns:
the ColorMap

setColorMap

public void setColorMap(ColorMap cmap)
Set the ColorMap.
Property Change: colorMap.
Parameters:
cmap - the ColorMap

toString

public java.lang.String toString()
Get a String representation of the GridAttribute.
Specified by:
toString in interface Attribute
Overrides:
toString in class java.lang.Object
Returns:
String representation

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add listener to changes in GridAttribute properties.
Specified by:
addPropertyChangeListener in interface Attribute

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: Attribute
Remove change listener.
Specified by:
removePropertyChangeListener in interface Attribute

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Description copied from interface: java.beans.PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.


Send comments about the Scientific Graphics toolkit to dwd@pmel.noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on December 13 2001