sgtplot
Class GridAttribute
- java.lang.Object
-
- sgtplot.GridAttribute
-
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Attribute
public class GridAttribute extends java.lang.Object implements Attribute, java.lang.Cloneable, java.beans.PropertyChangeListener
Sets the rendering style for grid data.ColorMap,ContourLevelsareGridAttributeproperties.- Since:
- 1.0
- See Also:
GridCartesianRenderer,ContourLevels, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intAREA_FILLArea fill style.static intAREA_FILL_CONTOURArea fill and Contour style.static intCONTOURContour line style.static intRASTERRaster style.static intRASTER_CONTOURRaster and Contour style.
-
Constructor Summary
Constructors Constructor and Description GridAttribute()Default constructor.GridAttribute(ContourLevels clev)GridAttributeconstructor forCONTOURstyle.GridAttribute(int style, ColorMap cmap)GridAttributeconstructor forRASTERandAREA_FILLstyles.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)Add listener to changes inGridAttributeproperties.GridAttributecopy()Copy theGridAttribute.ColorMapgetColorMap()Get theColorMap.ContourLevelsgetContourLevels()Get theContourLevels.java.lang.StringgetId()Get attribute id.intgetStyle()Get grid style.booleanisAreaFill()Tests ifGridAttributestyle is eigther AREA_FILL or AREA_FILL_CONTOUR.booleanisBatch()Is the attribute in batch mode?booleanisContour()Tests ifGridAttributestyle is either CONTOUR, RASTER_CONTOUR, or AREA_FILL_CONTOUR.booleanisRaster()Tests ifGridAttributestyle is either RASTER or RASTER_CONTOUR.voidpropertyChange(java.beans.PropertyChangeEvent evt)voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)Remove change listener.voidsetBatch(boolean batch)Batch the changes to the attribute.voidsetBatch(boolean batch, boolean local)Batch the changes to the attribute and set local flag.voidsetColorMap(ColorMap cmap)Set theColorMap.voidsetContourLevels(ContourLevels clev)Set theContourLevels.voidsetId(java.lang.String id)Set attribute id.voidsetStyle(int st)Set the grid style.java.lang.StringtoString()Get aStringrepresentation of theGridAttribute.
-
-
-
Field Detail
-
RASTER
public static final int RASTER
Raster style.- See Also:
- Constant Field Values
-
AREA_FILL
public static final int AREA_FILL
Area fill style.- See Also:
- Constant Field Values
-
CONTOUR
public static final int CONTOUR
Contour line style.- See Also:
- Constant Field Values
-
RASTER_CONTOUR
public static final int RASTER_CONTOUR
Raster and Contour style.- Since:
- 2.0
- See Also:
- Constant Field Values
-
AREA_FILL_CONTOUR
public static final int AREA_FILL_CONTOUR
Area fill and Contour style.- Since:
- 2.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridAttribute
public GridAttribute()
Default constructor. Default style isRASTERand defaultColorMapis null.
-
GridAttribute
public GridAttribute(int style, ColorMap cmap)GridAttributeconstructor forRASTERandAREA_FILLstyles.- Parameters:
style- grid stylecmap-ColorMap
-
GridAttribute
public GridAttribute(ContourLevels clev)
GridAttributeconstructor forCONTOURstyle.- Parameters:
clev-ContourLevels
-
-
Method Detail
-
setContourLevels
public void setContourLevels(ContourLevels clev)
Set theContourLevels.
Property Change:contourLevels.- Parameters:
clev-ContourLevels
-
getContourLevels
public ContourLevels getContourLevels()
Get theContourLevels.- Returns:
ContourLevels
-
copy
public GridAttribute copy()
Copy theGridAttribute.- 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 ifGridAttributestyle is either RASTER or RASTER_CONTOUR.- Since:
- 2.0
-
isContour
public boolean isContour()
Tests ifGridAttributestyle is either CONTOUR, RASTER_CONTOUR, or AREA_FILL_CONTOUR.- Since:
- 2.0
-
isAreaFill
public boolean isAreaFill()
Tests ifGridAttributestyle is eigther AREA_FILL or AREA_FILL_CONTOUR.- Since:
- 2.0
-
getColorMap
public ColorMap getColorMap()
Get theColorMap.- Returns:
- the
ColorMap
-
setColorMap
public void setColorMap(ColorMap cmap)
Set theColorMap.
Property Change:colorMap.- Parameters:
cmap- theColorMap
-
toString
public java.lang.String toString()
Get aStringrepresentation of theGridAttribute.
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add listener to changes inGridAttributeproperties.- Specified by:
addPropertyChangeListenerin interfaceAttribute
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface:AttributeRemove change listener.- Specified by:
removePropertyChangeListenerin interfaceAttribute
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
setId
public void setId(java.lang.String id)
Description copied from interface:AttributeSet attribute id.
-
getId
public java.lang.String getId()
Description copied from interface:AttributeGet attribute id.
-
setBatch
public void setBatch(boolean batch)
Description copied from interface:AttributeBatch the changes to the attribute.
-
setBatch
public void setBatch(boolean batch, boolean local)Description copied from interface:AttributeBatch the changes to the attribute and set local flag. Determines whetherAttributeChangeEventwill be set local.
-
-
DMelt 3.0 © DataMelt by jWork.ORG