|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.DisplayRenderer
public abstract class DisplayRenderer
DisplayRenderer
is the VisAD abstract super-class for
background and metadata rendering algorithms. These complement
depictions of Data
objects created by
DataRenderer
objects.
DisplayRenderer
also manages the overall relation of
DataRenderer
output to the graphics library.
DisplayRenderer
is not Serializable
and
should not be copied between JVMs.
Constructor Summary | |
---|---|
DisplayRenderer()
Construct a new DisplayRenderer . |
Method Summary | |
---|---|
abstract boolean |
anyDirects()
|
abstract void |
clearScale(AxisScale axisScale)
Remove a particular scale being rendered. |
abstract void |
clearScales()
Remove all the scales being rendered. |
abstract void |
depth_cursor(VisADRay ray)
set a VisADRay along which to drag cursor in depth (in and out of screen) |
abstract void |
drag_cursor(VisADRay ray,
boolean first)
drag cursor parallel to plane of screen |
abstract void |
drag_depth(float diff)
drag cursor in depth (in and out of screen) |
abstract DataRenderer |
findDirect(VisADRay ray,
int mouseModifiers)
Returns a direct manipulation renderer if one is close to the specified ray (within pick threshold). |
String[] |
getAnimationString()
Return Array of String s describing the
animation sequence |
boolean |
getAnimationStringVisible()
Return whether the animation info should be visible in the display or not. |
boolean |
getBoxOn()
Get the box visibility. |
abstract double[] |
getCursor()
Return an array giving the cursor location as (XAxis, YAxis, ZAxis) coordinates |
float[] |
getCursorColor()
Get the cursor color. |
Vector |
getCursorStringVector()
Return Vector of String s describing the
cursor location, if cursor location display is enabled. |
Vector |
getCursorStringVectorUnconditional()
Return Vector of String s describing the
cursor location, regardless of whether cursor location display is
enabled. |
double |
getDirectAxisValue(RealType type)
get the value of a RealType if it is included in the cursor location |
double |
getDirectAxisValue(String name)
get the value of a named RealType if it is included in the cursor location |
DisplayImpl |
getDisplay()
Get the Display associated with this renderer. |
abstract BufferedImage |
getImage()
Get a snapshot of the displayed image. |
boolean |
getMode2D()
Return true if this is a 2-D DisplayRenderer . |
abstract MouseBehavior |
getMouseBehavior()
|
float |
getPickThreshhold()
|
RendererControl |
getRendererControl()
Get the Control which holds the "shared" data
for this renderer. |
boolean |
getRotateAboutCenter()
Get the RotateAboutCenter property. |
boolean |
getScaleRotation()
Get the ScaleRotation property. |
abstract int |
getTextureHeightMax()
|
abstract int |
getTextureWidthMax()
|
boolean |
getWaitFlag()
Get the wait flag state. |
boolean |
getWaitMessageVisible()
Return whether the please wait info should be visible in the display or not. |
abstract void |
initControl(RendererControl ctl)
Internal method used to initialize newly created RendererControl with current renderer settings
before it is actually connected to the renderer. |
abstract boolean |
legalDataRenderer(DataRenderer renderer)
determine whether a DataRenderer is legal for this DisplayRenderer |
boolean |
legalDisplayScalar(DisplayRealType type)
Return true if type is legal for this
DisplayRenderer ; for example, 2-D
DisplayRenderer s use this to disallow mappings to
ZAxis and Latitude. |
abstract Control |
makeControl(ScalarMap map)
Factory for constructing a subclass of Control
appropriate for the graphics API and for this
DisplayRenderer ; invoked by ScalarMap
when it is addMap() ed to a Display . |
abstract DataRenderer |
makeDefaultRenderer()
Factory for constructing the default subclass of DataRenderer for this DisplayRenderer . |
void |
prepareAction(Vector temp,
Vector tmap,
boolean go,
boolean initialize)
prepare for transforming Data into scene graph depictions, including possible auto-scaling of ScalarMaps |
void |
render_trigger()
trigger the graphics API to render the scene graph to the screen; intended to be over-ridden by graphics-API-specific extensions of DisplayRenderer |
void |
setAnimationString(String[] animation)
Set Array of String s describing the
animation sequence |
void |
setAnimationStringVisible(boolean visible)
Set whether the animation info should be visible in the display or not. |
void |
setBackgroundColor(Color color)
Set the background color. |
void |
setBackgroundColor(float r,
float g,
float b)
Set the background color. |
abstract void |
setBoxAspect(double[] aspect)
set the aspect for the containing box aspect double[3] array used to scale x, y and z box sizes |
void |
setBoxColor(Color color)
Set the box color. |
void |
setBoxColor(float r,
float g,
float b)
Set the box color. |
void |
setBoxOn(boolean on)
Set the box visibility. |
void |
setCursorColor(Color color)
Set the cursor color. |
void |
setCursorColor(float r,
float g,
float b)
Set the cursor color. |
abstract void |
setCursorOn(boolean on)
set flag indicating whether the cursor should be displayed. |
void |
setCursorStringOn(boolean on)
set flag indicating whether the cursor location String should be displayed. |
void |
setCursorStringVector()
Set Vector of String s describing the
cursor location from the cursor location; this is invoked when the
cursor location changes or the cursor display status changes |
void |
setCursorStringVector(Vector vect)
Set Vector of String s describing the
cursor location by copy; this is invoked by direct manipulation
renderers. |
abstract void |
setDirectOn(boolean on)
set flag indicating whether direct manipulation is active |
void |
setDisplay(DisplayImpl d)
Specify DisplayImpl to be rendered. |
void |
setForegroundColor(Color color)
Set the foreground color (box, cursor and scales). |
void |
setForegroundColor(float r,
float g,
float b)
Set the foreground color (box, cursor and scales). |
void |
setPickThreshhold(float pt)
set the distance threshhold for picking in direct manipulation |
void |
setRotateAboutCenter(boolean value)
Set the RotateAboutCenter property. |
abstract void |
setScale(AxisScale axisScale)
Set an axis scale. |
abstract void |
setScale(int axis,
int axis_ordinal,
VisADLineArray array,
float[] scale_color)
Set an axis scale. |
abstract void |
setScale(int axis,
int axis_ordinal,
VisADLineArray array,
VisADTriangleArray labels,
float[] scale_color)
Set an axis scale. |
abstract void |
setScaleOn(boolean on)
Enable scales to be displayed if they are set. |
void |
setScaleRotation(boolean value)
Set the ScaleRotation property. |
void |
setWaitFlag(boolean b)
Set the wait flag to the specified value. |
void |
setWaitMessageVisible(boolean visible)
Set whether the "please wait" info should be visible in the display or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface visad.ControlListener |
---|
controlChanged |
Constructor Detail |
---|
public DisplayRenderer()
DisplayRenderer
.
Method Detail |
---|
public float getPickThreshhold()
public void setPickThreshhold(float pt)
pt
- distance (in XAxis, YAxis, ZAxis coordinates)public abstract void setBoxAspect(double[] aspect)
public void setDisplay(DisplayImpl d) throws VisADException
DisplayImpl
to be rendered.
d
- Display
to render.
VisADException
- If a DisplayImpl
has already
been specified.public abstract void initControl(RendererControl ctl)
RendererControl
with current renderer settings
before it is actually connected to the renderer. This
means that changes will not generate MonitorEvent
s.
ctl
- RendererControl to initializepublic DisplayImpl getDisplay()
Display
associated with this renderer.
public RendererControl getRendererControl()
Control
which holds the "shared" data
for this renderer.
Control
.public void setWaitFlag(boolean b)
Display
.) DisplayEvent.WAIT_ON and
DisplayEvent.WAIT_OFF events are fired based on value of b.
b
- Boolean value to which wait flag is set.public boolean getWaitFlag()
true
if the wait flag is enabled.public abstract BufferedImage getImage()
public abstract void setScale(AxisScale axisScale) throws VisADException
axisScale
- AxisScale to set (it knows what axis
it is for)
VisADException
- couldn't set the scalepublic abstract void setScale(int axis, int axis_ordinal, VisADLineArray array, float[] scale_color) throws VisADException
axis
- axis for this scale (0 = XAxis, 1 = YAxis, 2 = ZAxis)axis_ordinal
- position along the axisarray
- VisADLineArray
representing the scale plotscale_color
- float[3] array representing the red, green and
blue color values.
VisADException
- couldn't set the scalepublic abstract void setScale(int axis, int axis_ordinal, VisADLineArray array, VisADTriangleArray labels, float[] scale_color) throws VisADException
axis
- axis for this scale (0 = XAxis, 1 = YAxis, 2 = ZAxis)axis_ordinal
- position along the axisarray
- VisADLineArray
representing the scale plotlabels
- VisADTriangleArray
representing the labels
created using a font (can be null)scale_color
- float[3] array representing the red, green and
blue color values.
VisADException
- couldn't set the scalepublic abstract void clearScales()
public abstract void clearScale(AxisScale axisScale)
axisScale
- scale to removepublic abstract void setScaleOn(boolean on)
GraphicsModeControl.setScaleEnable
instead of this method.
on
- true to turn them on, false to set them invisiblepublic boolean getMode2D()
true
if this is a 2-D DisplayRenderer
.
true
if this is a 2-D renderer.public void setBackgroundColor(Color color) throws RemoteException, VisADException
color
- background color
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public void setBackgroundColor(float r, float g, float b) throws RemoteException, VisADException
[0.0f - 1.0f]
.
r
- Red value.g
- Green value.b
- Blue value.
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public void setForegroundColor(Color color) throws RemoteException, VisADException
color
- foreground color
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public void setForegroundColor(float r, float g, float b) throws RemoteException, VisADException
[0.0f - 1.0f]
.
r
- Red value.g
- Green value.b
- Blue value.
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public boolean getBoxOn() throws RemoteException, VisADException
true
if the box is visible.
RemoteException
VisADException
public void setBoxColor(Color color) throws RemoteException, VisADException
color
- box color
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public void setBoxColor(float r, float g, float b) throws RemoteException, VisADException
[0.0f - 1.0f]
.
r
- Red value.g
- Green value.b
- Blue value.
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public void setBoxOn(boolean on) throws RemoteException, VisADException
on
- true
if the box should be visible.
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public float[] getCursorColor() throws RemoteException, VisADException
float
values
in the range [0.0f - 1.0f]
in the order (Red, Green, Blue).
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public void setCursorColor(Color color) throws RemoteException, VisADException
color
- cursor color
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public void setCursorColor(float r, float g, float b) throws RemoteException, VisADException
[0.0f - 1.0f]
.
r
- Red value.g
- Green value.b
- Blue value.
RemoteException
- If there was a problem making this change
in a remote collaborative
DisplayRenderer
.
VisADException
- If this renderer as not yet been assigned
to a Display
.public abstract Control makeControl(ScalarMap map)
Control
appropriate for the graphics API and for this
DisplayRenderer
; invoked by ScalarMap
when it is addMap()
ed to a Display
.
map
- The ScalarMap
for which a Control
should be built.
Control
.public abstract DataRenderer makeDefaultRenderer()
DataRenderer
for this DisplayRenderer
.
DataRenderer
.public abstract boolean legalDataRenderer(DataRenderer renderer)
renderer
- DisplayRenderer to test for legality
public void setAnimationStringVisible(boolean visible)
visible
- true to show the animation infopublic boolean getAnimationStringVisible()
public void setWaitMessageVisible(boolean visible)
visible
- true to show the please wait infopublic boolean getWaitMessageVisible()
public String[] getAnimationString()
String
s describing the
animation sequence
public void setAnimationString(String[] animation)
String
s describing the
animation sequence
animation
- a String[2] array describing the
animation sequencepublic abstract double[] getCursor()
double
array of cursor coordinates.public abstract void setCursorOn(boolean on)
on
- value of flag to setpublic abstract void depth_cursor(VisADRay ray)
ray
- VisADRay to setpublic abstract void drag_cursor(VisADRay ray, boolean first)
ray
- VisADRay that goes through new cursor locationfirst
- true to indicate this is first call to drag_cursor()
for this dragpublic abstract void setDirectOn(boolean on)
on
- value of flag to setpublic abstract void drag_depth(float diff)
diff
- amount to move cursor in depth (0.0 corresponds
to no movement)public abstract boolean anyDirects()
public abstract MouseBehavior getMouseBehavior()
public abstract DataRenderer findDirect(VisADRay ray, int mouseModifiers)
ray
- The ray used to look for a nearby direct manipulation
renderer.mouseModifiers
- Value of InputEvent.getModifiers().
null
.public void setCursorStringOn(boolean on)
on
- value of flag to setpublic Vector getCursorStringVector()
Vector
of String
s describing the
cursor location, if cursor location display is enabled.
public Vector getCursorStringVectorUnconditional()
Vector
of String
s describing the
cursor location, regardless of whether cursor location display is
enabled.
public double getDirectAxisValue(RealType type)
type
- RealType whose value to get
public double getDirectAxisValue(String name)
name
- String name of RealType whose value to get
public void setCursorStringVector(Vector vect)
Vector
of String
s describing the
cursor location by copy; this is invoked by direct manipulation
renderers.
vect
- String descriptions of cursor location.public void setCursorStringVector()
Vector
of String
s describing the
cursor location from the cursor location; this is invoked when the
cursor location changes or the cursor display status changes
public void render_trigger()
public boolean legalDisplayScalar(DisplayRealType type)
true
if type
is legal for this
DisplayRenderer
; for example, 2-D
DisplayRenderer
s use this to disallow mappings to
ZAxis and Latitude.
type
- The mapping type to check.
true
if type
is legal.public void prepareAction(Vector temp, Vector tmap, boolean go, boolean initialize) throws VisADException, RemoteException
temp
- Vector of DataRendererstmap
- Vector of ScalarMapsgo
- flag indicating whether Data transforms are requestedinitialize
- flag indicating whether auto-scaling is
requested
VisADException
- a VisAD error occurred
RemoteException
- an RMI error occurredpublic abstract int getTextureWidthMax() throws VisADException
VisADException
public abstract int getTextureHeightMax() throws VisADException
VisADException
public void setScaleRotation(boolean value)
value
- The new value for ScaleRotationpublic boolean getScaleRotation()
public void setRotateAboutCenter(boolean value)
value
- The new value for RotateAboutCenterpublic boolean getRotateAboutCenter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |