public class HydraRGBDisplayable extends ucar.visad.display.DisplayableData
Modifier and Type | Field and Description |
---|---|
private boolean |
alphaflag
flag for whether alpha is used or not
|
private ScalarMap |
animMap
field index to Animation ScalarMap
|
static java.lang.String |
COLOR_PALETTE
The name of the "color palette" property.
|
private BaseColorControl |
colorControl
control for ScalarMap
|
private ScalarMap |
colorMap
color ScalarMap
|
private float[][] |
colorPalette
Color Palette
|
private java.lang.String |
colorPaletteName |
private int |
curvedSize
default curvedSize
|
private double |
highRange
high range for colors
|
private double |
highSelectedRange
high range for select
|
private RealType |
indexRealType
RealType for the Animation ScalarMap
|
private double |
lowRange
low range for colors
|
private double |
lowSelectedRange
low range for select
|
private double |
maxSelect
high range for select map
|
private double |
minSelect
low range for select map
|
private HydraControl |
multiSpecCntrl |
private float |
myPointSize
local point size
|
static int |
POLYGON_FILL
The polygon fill style
|
static int |
POLYGON_LINE
The polygon line style
|
static int |
POLYGON_POINT
The polygon point style
|
private int |
polygonMode
default polygonMode
|
static java.lang.String |
RGB_REAL_TYPE
The name of the "RGB real-type" property.
|
private RealType |
rgbRealType
RealType for the ScalarMap
|
private RangeControl |
selectControl
Control for select range
|
private ScalarMap |
selectMap
RealType for the SelectRange ScalarMap
|
private RealType |
selectRealType
RealType for the SelectRange ScalarMap
|
private boolean |
useDefaultRenderer |
Modifier | Constructor and Description |
---|---|
protected |
HydraRGBDisplayable(HydraRGBDisplayable that)
Constructs from another instance.
|
|
HydraRGBDisplayable(java.lang.String name,
RealType rgbRealType,
RealType indexRealType,
boolean alphaflag,
HydraControl multiSpecCntrl)
Constructs from a name for the Displayable and the type of the
RGB parameter.
|
|
HydraRGBDisplayable(java.lang.String name,
RealType rgbRealType,
RealType indexRealType,
float[][] colorPalette,
boolean alphaflag,
ucar.unidata.util.Range initRange,
HydraControl multiSpecCntrl) |
|
HydraRGBDisplayable(java.lang.String name,
RealType rgbRealType,
RealType indexRealType,
float[][] colorPalette,
java.lang.String colorPaletteName,
boolean alphaflag,
ucar.unidata.util.Range initRange,
HydraControl multiSpecCntrl)
Constructs from a name for the Displayable and the type of the
RGB parameter.
|
Modifier and Type | Method and Description |
---|---|
private void |
applyUnit(ScalarMap colorMap,
RealType rgbRealType)
Apply the correct unit (either the displayUnit or the colorUnit)
to the scalar map
|
private int |
convertToVisADPolygonMode(int myMode)
Converts an RGBDisplayable Polygon mode to the appropriate
(or default) VisAD mode
|
ScalarMap |
getAnimationMap() |
ScalarMap |
getColorMap() |
float[][] |
getColorPalette()
Return the current color palette in this Displayable
|
java.lang.String |
getColorPaletteName() |
int |
getCurvedSize()
Return the size of a curved texture
|
protected DataRenderer |
getDataRenderer() |
float |
getPointSize()
Gets the point size associated with this LineDrawing
|
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 |
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
|
private boolean |
hasSelectMinMax()
Check to see if the range has been set for the select
|
protected ConstantMap |
makeCurvedSizeMap(int curvedSize)
Create the ConstantMap for the texture curve size
|
void |
setColor(java.awt.Color color)
Make a color palette representing this color and set it as the
color pallete.
|
private void |
setColorMaps()
creates the ScalarMap for color and ColorControl for this Displayable.
|
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;
asigns null (doesn't have a name) for the name.
|
void |
setColorPalette(float[][] colorPalette,
java.lang.String name)
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 |
setDefaultRenderer() |
void |
setDisplayUnit(Unit unit)
Set the units for the displayed range
|
void |
setGreyPalette()
This method sets the color palette to shades of grey.
|
void |
setImageRenderer() |
void |
setPointSize(float pointSize)
Sets the size of points in this Displayable.
|
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(ucar.visad.display.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
|
private void |
setSelectMap() |
private void |
setSelectMaps()
creates the ScalarMap for SelectRange and control for this Displayable.
|
protected void |
setSelectRealType(RealType realType)
Sets the RealType of the select parameter.
|
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.
|
addAction, cloneForDisplay, dataChange, destroy, getActive, getAnimationSet, getData, getLineWidth, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setLineWidth, setManipulable, setPickable, setPointMode, setUseFastRendering, setVisible, showme, toString
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setScalarMapSet, setSelectedRange, setUseTimesInAnimation, toFront
public static final java.lang.String COLOR_PALETTE
public static final java.lang.String RGB_REAL_TYPE
public static final int POLYGON_FILL
public static final int POLYGON_LINE
public static final int POLYGON_POINT
private float[][] colorPalette
private java.lang.String colorPaletteName
private volatile BaseColorControl colorControl
private volatile RealType rgbRealType
private RealType indexRealType
private RangeControl selectControl
private RealType selectRealType
private boolean alphaflag
private float myPointSize
private double lowRange
private double highRange
private int polygonMode
private int curvedSize
private double lowSelectedRange
private double highSelectedRange
private double minSelect
private double maxSelect
private HydraControl multiSpecCntrl
private boolean useDefaultRenderer
public HydraRGBDisplayable(java.lang.String name, RealType rgbRealType, RealType indexRealType, boolean alphaflag, HydraControl multiSpecCntrl) throws VisADException, java.rmi.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.RGBVisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public HydraRGBDisplayable(java.lang.String name, RealType rgbRealType, RealType indexRealType, float[][] colorPalette, boolean alphaflag, ucar.unidata.util.Range initRange, HydraControl multiSpecCntrl) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public HydraRGBDisplayable(java.lang.String name, RealType rgbRealType, RealType indexRealType, float[][] colorPalette, java.lang.String colorPaletteName, boolean alphaflag, ucar.unidata.util.Range initRange, HydraControl multiSpecCntrl) throws VisADException, java.rmi.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 trueinitRange
- Range to use as initial or first min,maxVisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected HydraRGBDisplayable(HydraRGBDisplayable that) throws VisADException, java.rmi.RemoteException
that
- The other instance.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected boolean useDisplayUnitForColor()
public void setRGBRealType(RealType realType) throws java.rmi.RemoteException, VisADException
realType
- The RealType of the RGB parameter. May
not be null
.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public ScalarMap getColorMap()
public ScalarMap getAnimationMap()
public RealType getRGBRealType()
null
.public RealType getSelectRealType()
null
.protected DataRenderer getDataRenderer() throws VisADException
getDataRenderer
in class ucar.visad.display.DisplayableData
VisADException
public void setDefaultRenderer()
public void setImageRenderer()
protected void setScalarMaps(ucar.visad.display.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, java.lang.String name) throws java.rmi.RemoteException, VisADException
colorPalette
- Color table or color-alpha table desired.name
- Name for the color table (can be null
).VisADException
- if a core VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.public void setColorPalette(float[][] colorPalette) throws VisADException, java.rmi.RemoteException
setColorPalette
in class ucar.visad.display.Displayable
colorPalette
- the color table or color-alpha table desiredVisADException
- if a core VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.public float[][] getColorPalette()
public java.lang.String getColorPaletteName()
public void setColor(java.awt.Color color) throws java.rmi.RemoteException, VisADException
setColor
in class ucar.visad.display.Displayable
color
- color to useVisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public final void setGreyPalette() throws java.rmi.RemoteException, VisADException
VisADException
- if a core VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.public final void setVisADPalette() throws java.rmi.RemoteException, VisADException
VisADException
- if a core VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.public void setRange(double low, double hi) throws VisADException, java.rmi.RemoteException
low
- the minimun valuehi
- the maximum valuejava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectpublic void setRangeForColor(double low, double hi) throws VisADException, java.rmi.RemoteException
setRangeForColor
in class ucar.visad.display.Displayable
low
- 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.java.rmi.RemoteException
- Java RMI failure.public double[] getRangeforColor()
public double[] getRangeForColor()
private void applyUnit(ScalarMap colorMap, RealType rgbRealType) throws VisADException, java.rmi.RemoteException
colorMap
- ScalarMap to apply torgbRealType
- RealType for default Unitjava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectpublic void setDisplayUnit(Unit unit) throws VisADException, java.rmi.RemoteException
setDisplayUnit
in class ucar.visad.display.Displayable
unit
- Unit for displayjava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectpublic void setColorUnit(Unit unit) throws VisADException, java.rmi.RemoteException
setColorUnit
in class ucar.visad.display.Displayable
unit
- Unit for displayjava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectpublic boolean hasRange()
public void setPointSize(float pointSize) throws VisADException, java.rmi.RemoteException
setPointSize
in class ucar.visad.display.DisplayableData
pointSize
- Size of points (2 = normal)VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public float getPointSize()
getPointSize
in class ucar.visad.display.DisplayableData
public void setPolygonMode(int polygonMode) throws VisADException, java.rmi.RemoteException
polygonMode
- polygon modejava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectprivate int convertToVisADPolygonMode(int myMode)
myMode
- polygon modepublic int getPolygonMode()
public void setCurvedSize(int curvedSize) throws VisADException, java.rmi.RemoteException
curvedSize
- size to use (> 0)java.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectprotected ConstantMap makeCurvedSizeMap(int curvedSize) throws VisADException, java.rmi.RemoteException
curvedSize
- size for texture curvejava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectpublic int getCurvedSize()
private void setColorMaps() throws java.rmi.RemoteException, VisADException
VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.private void setSelectMap() throws java.rmi.RemoteException, VisADException
java.rmi.RemoteException
VisADException
protected void setSelectRealType(RealType realType) throws java.rmi.RemoteException, VisADException
realType
- The RealType of the RGB parameter. May
not be null
.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public boolean hasSelectedRange()
public void setSelectedRange(double low, double hi) throws VisADException, java.rmi.RemoteException
setSelectedRange
in class ucar.visad.display.Displayable
low
- low select valuehi
- hi select valuejava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectpublic void setRangeForSelect(double low, double hi) throws VisADException, java.rmi.RemoteException
low
- the minimun valuehi
- the maximum valuejava.rmi.RemoteException
- Java RMI errorVisADException
- problem creating VisAD objectprivate boolean hasSelectMinMax()
private void setSelectMaps() throws java.rmi.RemoteException, VisADException
VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.