|
||||||||||
| 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
public class DisplayableData
Provides support for displaying data that comprises a single VisAD Data object (and, consequently, needs only a single DataReference).
Instances of this class have the following bound properties:
| Name | Type | Access | Default | Description |
|---|---|---|---|---|
| boolean | set/is | true |
Whether or not the data should be rendered. | |
| manipulable | boolean | set/is | false |
Whether or not the data can be manipulated (i.e. modified) via the display. |
| Field Summary | |
|---|---|
static String |
LINE_WIDTH
The name of the line-width property. |
static String |
MANIPULABLE
The name of the "manipulable" property. |
static String |
VISIBLE
The name of the "visible" property. |
| Fields inherited from class ucar.visad.display.Displayable |
|---|
DISPLAY, parent, SCALAR_MAP_SET |
| Constructor Summary | |
|---|---|
DisplayableData(DisplayableData that)
Constructs from another instance. |
|
DisplayableData(String name)
Constructs from a name for the Displayable. |
|
| Method Summary | |
|---|---|
void |
addAction(Action action)
Adds a listener for data changes. |
Displayable |
cloneForDisplay()
Returns a clone of this instance suitable for another VisAD Display. |
protected void |
dataChange()
Handles a change to the data. |
protected void |
destroy()
Called when the displayable is removed from a display master |
boolean |
getActive()
Gets the "active" property. |
Set |
getAnimationSet(RealType aniType)
Returns the set of values for the given aniType if
the contained Data object adapted by this DisplayableData have
any data of that type. |
Data |
getData()
Returns the data of this instance or null if no such data
exists. |
protected DataRenderer |
getDataRenderer()
Obtains the DataRenderer for this displayable. |
float |
getLineWidth()
Gets the current line width associated with this Displayable |
String |
getName()
Returns the name of this instance. |
float |
getPointSize()
Gets the point size associated with this DisplayableData |
boolean |
hasData()
See if any data has been set in the DataReference for this DisplayableData. |
boolean |
hasDataObject()
Indicates whether or not this Displayable adapts a single,
VisAD data object. |
boolean |
isManipulable()
Gets the "manipulable" property. |
boolean |
isPickable()
Get the pickable property |
protected void |
myAddConstantMaps(ConstantMap[] newMaps)
Adds this instance's data references to the associated VisAD display if possible. |
protected void |
myAddDataReferences()
Adds the VisAD DataReference of this instance to the associated VisAD display if appropriate. |
protected void |
myRemoveDataReferences()
Removes the VisAD DataReference of this instance from the associated VisAD display. |
void |
removeAction(Action action)
Removes a listener for data changes. |
void |
setActive(boolean active)
Sets the "active" property. |
void |
setData(Data data)
Sets the data for this instance. |
void |
setDataReference(DataReference reference)
Set the data reference for this instance. |
void |
setLineWidth(float lineWidth)
Sets the width of lines in this Displayable. |
void |
setManipulable(boolean manipulable)
Sets the "manipulable" property. |
void |
setPickable(boolean pickable)
Set the pickable property |
void |
setPointMode(boolean usePoints)
Set the flags for whether the Displayable displays data as points. |
void |
setPointSize(float pointSize)
Sets the size of points in this Displayable. |
void |
setUseFastRendering(boolean fastRender)
Set the flags for whether the Displayable uses it's methods to render quickly (eg, not account for projection seams). |
void |
setVisible(boolean visible)
Sets the "visible" property. |
String |
toString()
Get a String representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String MANIPULABLE
public static final String VISIBLE
public static String LINE_WIDTH
| Constructor Detail |
|---|
public DisplayableData(String name)
throws VisADException,
RemoteException
true.
name - The name for the Displayable.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public DisplayableData(DisplayableData that)
throws VisADException,
RemoteException
that - The other instance.
VisADException - VisAD failure.
RemoteException - Java RMI failure.| Method Detail |
|---|
public void setUseFastRendering(boolean fastRender)
throws VisADException,
RemoteException
setUseFastRendering in class DisplayablefastRender - Should the rendering be quick (and possibly
inaccurate)
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public void setPointMode(boolean usePoints)
throws VisADException,
RemoteException
setPointMode in class DisplayableusePoints - true to display as points
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public Displayable cloneForDisplay()
throws VisADException,
RemoteException
Returns a clone of this instance suitable for another VisAD Display.
This implementation does not clone the underlying data.
cloneForDisplay in class DisplayableVisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.public final String getName()
public final void setManipulable(boolean manipulable)
throws VisADException,
RemoteException
Sets the "manipulable" property. This property may be set even while this instance is being displayed. This method fires a PropertyChangeEvent for @link #MANIPULABLE}.
This implementation uses the overridable method getDataRenderer() to obtain a new DataRenderer, if
necessary, and the method Displayable.getConstantMaps() if the
data-reference needs to be (re)added to the display.
manipulable - Whether or not this instance may be directly
manipulated by the VisAD system.
VisADException - VisAD failure.
RemoteException - Java RMI failure.public final boolean isManipulable()
true if and only if this instance may be
directly manipulated by the VisAD system.
public void setVisible(boolean visible)
throws RemoteException,
VisADException
setVisible in class Displayablevisible - Whether or not this instance should be visible.
VisADException - VisAD failure.
RemoteException - Java RMI failure.public boolean getActive()
public final void setActive(boolean active)
throws VisADException,
RemoteException
true. If
the data object changed while the active property was false,
then the change will be reported when the active property is set
to true.
active - Whether or not to report changes to the data
object.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
protected final void myAddDataReferences()
throws VisADException,
RemoteException
Adds the VisAD DataReference of this instance to the associated VisAD display if appropriate. This method does not verify that the VisAD display has been set. This method is idempotent.
This implementation uses the overridable methods getDataRenderer() and Displayable.getConstantMaps().
myAddDataReferences in class DisplayableVisADException - VisAD failure.
RemoteException - Java RMI failure.
protected final void myRemoveDataReferences()
throws VisADException,
RemoteException
getDataRenderer() being invoked if
this instance is subsequently added to the display.
myRemoveDataReferences in class DisplayableVisADException - VisAD failure.
RemoteException - Java RMI failure.
protected void myAddConstantMaps(ConstantMap[] newMaps)
throws VisADException,
RemoteException
myAddConstantMaps in class DisplayablenewMaps - maps to add
VisADException - VisAD failure.
RemoteException - Java RMI failure.
protected void dataChange()
throws VisADException,
RemoteException
Handles a change to the data. This method is called when the data of this instance's DataReference changes -- whether by direct manipulation by the VisAD display or by the setData() or setDataReference() methods. This method should be overridden in subclasses when appropriate.
This implementation does nothing.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public final void setDataReference(DataReference reference)
throws TypeException,
RemoteException,
VisADException
Set the data reference for this instance. This method will result in the invocation of the dataChange() method. This method may be called even while this instance is being rendered in the associated VisAD display: it will cause the new data to be rendered.
This implementations uses the overridable methods getDataRenderer() and Displayable.getConstantMaps().
reference - The data reference for this instance. May not
have null data.
TypeException - Data reference has null data.
VisADException - VisAD failure.
RemoteException - Java RMI failure.dataChange()
protected void destroy()
throws RemoteException,
VisADException
destroy in class DisplayableVisADException - VisAD failure.
RemoteException - Java RMI failure.
public final void setData(Data data)
throws RemoteException,
VisADException
Sets the data for this instance. This method will result in the invocation of the dataChange() method. This method may be called even while this instance is being rendered in the associated VisAD display: it will cause the new data to be rendered.
This implementation uses the overridable methods getDataRenderer() and Displayable.getConstantMaps().
data - The data for this instance.
VisADException - VisAD failure.
RemoteException - Java RMI failure.dataChange()public final boolean hasDataObject()
Indicates whether or not this Displayable adapts a single,
VisAD data object.
This implementation always returns true.
hasDataObject in class Displayable
public final Data getData()
throws VisADException,
RemoteException
null if no such data
exists. If the return-value is non-null then it is the
actual data and not a copy.
getData in class Displayablenull.
VisADException - VisAD failure.
RemoteException - Java RMI failure.Displayable.hasDataObject()
public final void addAction(Action action)
throws VisADException,
RemoteException
action - The listener for changes to the underlying
data.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public final void removeAction(Action action)
throws VisADException,
RemoteException
action - The listener for changes to the underlying
data.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public boolean hasData()
throws VisADException,
RemoteException
VisADException - VisAD failure.
RemoteException - Java RMI failure.
protected DataRenderer getDataRenderer()
throws VisADException
VisADException - VisAD failure.
public void setPickable(boolean pickable)
throws VisADException,
RemoteException
pickable - true to pick
VisADException - VisAD failure.
RemoteException - Java RMI failure.public boolean isPickable()
public Set getAnimationSet(RealType aniType)
throws VisADException,
RemoteException
Returns the set of values for the given aniType if
the contained Data object adapted by this DisplayableData have
any data of that type. null will be returned if
this instance adapts such an object but the object is unset, or if this
instance does not support this type.
getAnimationSet in class DisplayableaniType - The type used for animation
null.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.hasDataObject()public String toString()
toString in class Object
public void setLineWidth(float lineWidth)
throws VisADException,
RemoteException
setLineWidth in class DisplayablelineWidth - Width of lines (1 = normal)
VisADException - VisAD failure.
RemoteException - Java RMI failure.public float getLineWidth()
public void setPointSize(float pointSize)
throws VisADException,
RemoteException
setPointSize in class DisplayablepointSize - Size of points (2 = normal)
VisADException - VisAD failure.
RemoteException - Java RMI failure.public float getPointSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||