|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.RGBDisplayable
public abstract class RGBDisplayable
Provides support for a Displayable that needs a map to either Display.RGB or to Display.RGBA.
Instances of this class have the following bound properties:
| Name | Type | Access | Default | Description |
|---|---|---|---|---|
| colorPalette | float[][] | set/get | 0 | The color palette for this instance. |
| rgbRealType | visad.RealType | set/get | null |
The VisAD type of the colored quantity. |
| lineWidth | float | set/get | 1.0f | The width of rendered lines. |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData |
|---|
DisplayableData.DragAdapter |
| Field Summary | |
|---|---|
static String |
COLOR_PALETTE
The name of the "color palette" property. |
static int |
POLYGON_FILL
The polygon fill style |
static int |
POLYGON_LINE
The polygon line style |
static int |
POLYGON_POINT
The polygon point style |
static String |
RGB_REAL_TYPE
The name of the "RGB real-type" property. |
| Fields inherited from class ucar.visad.display.DisplayableData |
|---|
LINE_WIDTH, MANIPULABLE, renderer, VISIBLE |
| Fields inherited from class ucar.visad.display.Displayable |
|---|
DISPLAY, parent, SCALAR_MAP_SET |
| Constructor Summary | |
|---|---|
protected |
RGBDisplayable(RGBDisplayable that)
Constructs from another instance. |
|
RGBDisplayable(String name,
RealType rgbRealType,
boolean alphaflag)
Constructs from a name for the Displayable and the type of the RGB parameter. |
|
RGBDisplayable(String name,
RealType rgbRealType,
float[][] colorPalette,
boolean alphaflag)
Constructs from a name for the Displayable and the type of the RGB parameter. |
| Method Summary | |
|---|---|
boolean |
getAutoScaleColorRange()
Set whether the RGB type is used for the select range. |
float[][] |
getColorPalette()
Return the current color palette in this Displayable |
int |
getCurvedSize()
Return the size of a curved texture |
int |
getPolygonMode()
Return the type of polygon mode being used |
double[] |
getRangeforColor()
Deprecated. use #getRangeForColor() |
double[] |
getRangeForColor()
Get the color range |
RealType |
getRGBRealType()
Returns the RealType of the RGB parameter. |
RealType |
getSelectRealType()
Returns the RealType of the SelectRange parameter. |
boolean |
getUseRGBTypeForSelect()
Get whether the RGB type is used for the select range. |
boolean |
hasRange()
Returns whether this Displayable has a valid range (i.e., lowRange and highRange are both not NaN's |
boolean |
hasSelectedRange()
Returns whether this Displayable has a valid range (i.e., lowSelectedRange and highSelectedRange are both not NaN's |
protected ConstantMap |
makeCurvedSizeMap(int curvedSize)
Create the ConstantMap for the texture curve size |
void |
setAutoScaleColorRange(boolean yesno)
Set whether the color scale should auto scale |
void |
setColor(Color color)
Make a color palette representing this color and set it as the color pallete. |
void |
setColorPalette(float[][] colorPalette)
This method sets the color palette according to the color table in argument; pair this method with setRange(lo,high) to get a fixed association of color table and range of values. |
void |
setColorUnit(Unit unit)
Set the units for the displayed range |
void |
setCurvedSize(int curvedSize)
Set the curved size for textured displays |
void |
setDisplayUnit(Unit unit)
Set the units for the displayed range |
void |
setGreyPalette()
This method sets the color palette to shades of grey. |
void |
setPolygonMode(int polygonMode)
Set the type of polygon display that should be used |
void |
setRange(double low,
double hi)
Deprecated. use setRangeForColor |
void |
setRangeForColor(double low,
double hi)
Set the upper and lower limit of the range values associated with a color table. |
void |
setRangeForSelect(double low,
double hi)
Set the upper and lower limit of the range values associated with a color table. |
void |
setRGBRealType(RealType realType)
Sets the RealType of the RGB parameter. |
protected void |
setScalarMaps(ScalarMapSet maps)
Sets the set of ScalarMap-s of this instance. |
void |
setSelectedRange(double low,
double hi)
Set selected range with the range for select |
protected void |
setSelectRealType(RealType realType)
Sets the RealType of the select parameter. |
void |
setUseRGBTypeForSelect(boolean yesno)
Set whether the RGB type is used for the select range. |
void |
setVisADPalette()
This method with no argument sets the default Vis5D color spectrum. |
protected boolean |
useDisplayUnitForColor()
Does this object use the displayUnit (or the colorUnit) for its display unit. |
| Methods inherited from class ucar.visad.display.DisplayableData |
|---|
addAction, cloneForDisplay, dataChange, destroy, getActive, getAnimationSet, getData, getDataRenderer, getLineWidth, getName, getPointSize, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setLineWidth, setManipulable, setPickable, setPointMode, setPointSize, setUseFastRendering, setVisible, showme, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String COLOR_PALETTE
public static final String RGB_REAL_TYPE
public static final int POLYGON_FILL
public static final int POLYGON_LINE
public static final int POLYGON_POINT
| Constructor Detail |
|---|
public RGBDisplayable(String name,
RealType rgbRealType,
boolean alphaflag)
throws VisADException,
RemoteException
name - The name for the displayable.rgbRealType - The type of the RGB parameter. May be
null.alphaflag - boolean - will use Display.RBGA if true
otherwise only Display.RGB
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public RGBDisplayable(String name,
RealType rgbRealType,
float[][] colorPalette,
boolean alphaflag)
throws VisADException,
RemoteException
name - The name for the displayable.rgbRealType - The type of the RGB parameter. May be
null.colorPalette - The initial colorPalette to use. May be
null (Vis5D palette used
as default).alphaflag - boolean - use Display.RBGA if true
VisADException - VisAD failure.
RemoteException - Java RMI failure.
protected RGBDisplayable(RGBDisplayable that)
throws VisADException,
RemoteException
that - The other instance.
VisADException - VisAD failure.
RemoteException - Java RMI failure.| Method Detail |
|---|
protected boolean useDisplayUnitForColor()
public void setRGBRealType(RealType realType)
throws RemoteException,
VisADException
realType - The RealType of the RGB parameter. May
not be null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.public RealType getRGBRealType()
null.public RealType getSelectRealType()
null.
protected void setScalarMaps(ScalarMapSet maps)
throws BadMappingException
null for the old value and the new
set of ScalarMap-s for the new Value. Intermediate subclasses that
have their own ScalarMap-s should override this method and invoke
super.setScalarMaps(ScalarMapSet).
maps - The set of ScalarMap-s to be added.
BadMappingException - The RealType of the color parameter
has not been set or its ScalarMap is alread in
the set.
public void setColorPalette(float[][] colorPalette)
throws RemoteException,
VisADException
setColorPalette in class DisplayablecolorPalette - the color table or color-alpha table desired
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.public float[][] getColorPalette()
public void setColor(Color color)
throws RemoteException,
VisADException
setColor in class Displayablecolor - color to use
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public final void setGreyPalette()
throws RemoteException,
VisADException
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
public final void setVisADPalette()
throws RemoteException,
VisADException
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
public void setRange(double low,
double hi)
throws VisADException,
RemoteException
low - the minimun valuehi - the maximum value
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public void setRangeForColor(double low,
double hi)
throws VisADException,
RemoteException
setRangeForColor in class Displayablelow - The minimum value of the parameter matched to
the low end of the color table.hi - The maximum value of the parameter matched to
the high end of the color table.
VisADException - VisAD failure.
RemoteException - Java RMI failure.public double[] getRangeforColor()
public double[] getRangeForColor()
public void setDisplayUnit(Unit unit)
throws VisADException,
RemoteException
setDisplayUnit in class Displayableunit - Unit for display
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public void setColorUnit(Unit unit)
throws VisADException,
RemoteException
setColorUnit in class Displayableunit - Unit for display
RemoteException - Java RMI error
VisADException - problem creating VisAD objectpublic boolean hasRange()
public void setPolygonMode(int polygonMode)
throws VisADException,
RemoteException
polygonMode - polygon mode
RemoteException - Java RMI error
VisADException - problem creating VisAD objectpublic int getPolygonMode()
public void setCurvedSize(int curvedSize)
throws VisADException,
RemoteException
curvedSize - size to use (> 0)
RemoteException - Java RMI error
VisADException - problem creating VisAD object
protected ConstantMap makeCurvedSizeMap(int curvedSize)
throws VisADException,
RemoteException
curvedSize - size for texture curve
RemoteException - Java RMI error
VisADException - problem creating VisAD objectpublic int getCurvedSize()
protected void setSelectRealType(RealType realType)
throws RemoteException,
VisADException
realType - The RealType of the RGB parameter. May
not be null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.public boolean hasSelectedRange()
public void setSelectedRange(double low,
double hi)
throws VisADException,
RemoteException
setSelectedRange in class Displayablelow - low select valuehi - hi select value
RemoteException - Java RMI error
VisADException - problem creating VisAD object
public void setRangeForSelect(double low,
double hi)
throws VisADException,
RemoteException
low - the minimun valuehi - the maximum value
RemoteException - Java RMI error
VisADException - problem creating VisAD objectpublic void setUseRGBTypeForSelect(boolean yesno)
yesno - true to use the RGB type for thepublic boolean getUseRGBTypeForSelect()
public void setAutoScaleColorRange(boolean yesno)
yesno - true to autoscalepublic boolean getAutoScaleColorRange()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||