public class CompositeDisplayable extends Displayable
A change to the list of Displayable-s of an instance of this class fires a javax.swing.event.ListDataEvent.
Modifier and Type | Field and Description |
---|---|
static int |
cnt
_more_
|
java.lang.String |
label
_more_
|
DISPLAY, parent, SCALAR_MAP_SET
Modifier | Constructor and Description |
---|---|
|
CompositeDisplayable()
Constructs from nothing.
|
protected |
CompositeDisplayable(CompositeDisplayable that)
Constructs from another instance.
|
|
CompositeDisplayable(visad.LocalDisplay display)
Constructs from an initial VisAD display.
|
|
CompositeDisplayable(java.lang.String lbl)
_more_
|
Modifier and Type | Method and Description |
---|---|
visad.ConstantMap |
addConstantMap(visad.ConstantMap map)
Associates a ConstantMap with this Displayable.
|
void |
addDisplayable(Displayable displayable)
Adds a Displayable to the composite.
|
void |
addListDataListener(javax.swing.event.ListDataListener listener)
Adds a listener for list-data events.
|
void |
clearDisplayables()
Removes all displayables from this composite -- causing them to be
removed from the VisAD display.
|
Displayable |
cloneForDisplay()
Returns a clone of this instance suitable for another VisAD display.
|
void |
debug()
_more_
|
protected void |
destroy()
Called when the displayable is removed from a display master
|
void |
destroyAll()
_more_
|
int |
displayableCount()
Gets the current number of displayables.
|
protected void |
fireListDataContentsChanged(int index0,
int index1)
Invokes the contentsChanged() method of all registered ListDataListener-s.
|
protected void |
fireListDataIntervalAdded(int index0,
int index1)
Invokes the intervalAdded() method of all registered ListDataListener-s.
|
protected void |
fireListDataIntervalRemoved(int index0,
int index1)
Invokes the intervalRemoved() method of all registered
ListDataListener-s.
|
visad.Set |
getAnimationSet(visad.RealType aniType,
boolean force)
Returns the set of values for the given
aniType if
the contained Data object adapted by this DisplayableData have
any data of that type. |
Displayable |
getDisplayable(int index)
Gets a Displayable of the composite.
|
int |
indexOf(Displayable displayable)
Gets the index of the particular Displayable.
|
java.util.Iterator |
iterator()
Obtains an Iterator over the children of this composite.
|
Displayable |
lastDisplayable()
Obtains the last displayable added to this composite.
|
protected void |
myAddDataReferences()
Adds DataReference-s to the associated display.
|
protected void |
myRemoveDataReferences()
Removes this instance's DataReference-s from the associated VisAD
display.
|
boolean |
removeDisplayable(Displayable displayable)
Removes a Displayable from the composite.
|
Displayable |
removeDisplayable(int index)
Removes a Displayable from the composite.
|
void |
removeListDataListener(javax.swing.event.ListDataListener listener)
Removes a listener for list-data events.
|
void |
setAdjustFlow(boolean adjust)
Sets whether flows are adjusted.
|
void |
setColor(java.awt.Color c)
Sets the color of the children
|
void |
setColorPalette(float[][] c)
Sets the color table of the children.
|
void |
setColorUnit(visad.Unit unit)
Sets the unit to be used for colors on all contained children
|
void |
setConstantPosition(double value,
visad.DisplayRealType type)
Set the z position to given value
|
void |
setDisplay(visad.LocalDisplay display)
Sets the associated VisAD display.
|
void |
setDisplayable(int index,
Displayable displayable)
Sets a Displayable of the composite.
|
protected void |
setDisplayMaster(DisplayMaster master)
_more_
|
void |
setDisplayUnit(visad.Unit unit)
Sets the unit on all contained children.
|
void |
setLineWidth(float width)
Sets the line width of the children.
|
void |
setManipulable(boolean manipulable)
Sets the manipulable value of this Displayable.
|
void |
setPointMode(boolean usePoints)
Set the flags for whether the Displayable displays data
as points.
|
void |
setPointSize(float size)
Sets the point size of the children
|
void |
setSelectedRange(double low,
double hi)
Set the range of the selected data on each of the children
displayables.
|
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 |
setUseTimesInAnimation(boolean value)
Set the UseTimesInAnimation property.
|
void |
setVisible(boolean visible)
Sets the visibility of this Displayable.
|
void |
setVisible(boolean visible,
int index)
Sets the visibility of an individual child.
|
void |
setVisible(boolean visible,
int lowerIndex,
int upperIndex)
Sets the visibility of an interval of children.
|
void |
toFront()
Brings all the children to front.
|
java.lang.String |
toString()
Returns a string representation of this composite.
|
addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, hasDataObject, isActive, isUnitCompatible, isVisible, logException, myAddConstantMaps, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setColorPalette, setContourInfo, setDisplayActive, setDisplayInactive, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange
public CompositeDisplayable() throws java.rmi.RemoteException, visad.VisADException
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public CompositeDisplayable(java.lang.String lbl) throws java.rmi.RemoteException, visad.VisADException
lbl
- _more_java.rmi.RemoteException
- _more_visad.VisADException
- _more_public CompositeDisplayable(visad.LocalDisplay display) throws java.rmi.RemoteException, visad.VisADException
display
- The VisAD display.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected CompositeDisplayable(CompositeDisplayable that) throws visad.VisADException, java.rmi.RemoteException
that
- The other instance.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void addListDataListener(javax.swing.event.ListDataListener listener)
listener
- The listener for list-data events.public void removeListDataListener(javax.swing.event.ListDataListener listener)
listener
- The listener for list-data events.public void addDisplayable(Displayable displayable) throws java.rmi.RemoteException, visad.VisADException
displayable
- The Displayable to be added.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.setDisplayable(int, ucar.visad.display.Displayable)
public void setDisplayable(int index, Displayable displayable) throws java.rmi.RemoteException, visad.VisADException
index
- The index of the Displayable.displayable
- The Displayable to be added.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public Displayable getDisplayable(int index) throws java.lang.IndexOutOfBoundsException
index
- The position that contains the Displayable.
Must be non-negative and less than the number
of Displayable-s.Displayable
at the given position.java.lang.IndexOutOfBoundsException
- Invalid index.public boolean removeDisplayable(Displayable displayable) throws visad.VisADException, java.rmi.RemoteException
displayable
- The Displayable to be removed.true
if and only if this composite
contained the specified Displayable.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected void destroy() throws java.rmi.RemoteException, visad.VisADException
destroy
in class Displayable
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public Displayable removeDisplayable(int index) throws java.rmi.RemoteException, visad.VisADException
index
- The index of the displayable to be removed.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public java.util.Iterator iterator()
public void setDisplay(visad.LocalDisplay display) throws java.rmi.RemoteException, visad.VisADException
setDisplay
in class Displayable
display
- The associated VisAD display.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.Displayable.removeDataReferences()
protected void setDisplayMaster(DisplayMaster master) throws visad.VisADException, java.rmi.RemoteException
setDisplayMaster
in class Displayable
master
- _more_java.rmi.RemoteException
- _more_visad.VisADException
- _more_protected final void myAddDataReferences() throws visad.VisADException, java.rmi.RemoteException
myAddDataReferences
in class Displayable
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected final void myRemoveDataReferences() throws visad.VisADException, java.rmi.RemoteException
myRemoveDataReferences
in class Displayable
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public visad.ConstantMap addConstantMap(visad.ConstantMap map) throws visad.VisADException, java.rmi.RemoteException
addConstantMap
in class Displayable
map
- A ConstantMap to be associated with this
Displayable.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void debug()
public void setVisible(boolean visible) throws java.rmi.RemoteException, visad.VisADException
setVisible
in class Displayable
visible
- If true
and this composite's
addScalarMaps()
and addDataReferences()
methods have been invoked, then the composite
will be made visible; otherwise, if
false
, then it is or will become
invisible.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setManipulable(boolean manipulable) throws visad.VisADException, java.rmi.RemoteException
setManipulable
in class Displayable
manipulable
- valuevisad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setVisible(boolean visible, int lowerIndex, int upperIndex) throws java.rmi.RemoteException, visad.VisADException
visible
- Whether or not to display the interval of
children.lowerIndex
- The lower index of the interval.upperIndex
- The upper index of the interval.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setUseFastRendering(boolean fastRender) throws visad.VisADException, java.rmi.RemoteException
setUseFastRendering
in class Displayable
fastRender
- Should the rendering be quick (and possibly
inaccurate)visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setPointMode(boolean usePoints) throws visad.VisADException, java.rmi.RemoteException
setPointMode
in class Displayable
usePoints
- true to display as pointsvisad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setConstantPosition(double value, visad.DisplayRealType type) throws visad.VisADException, java.rmi.RemoteException
setConstantPosition
in class Displayable
value
- The valuetype
- The typejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic void toFront() throws java.rmi.RemoteException, visad.VisADException
toFront
in class Displayable
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setColor(java.awt.Color c) throws java.rmi.RemoteException, visad.VisADException
setColor
in class Displayable
c
- The color.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setUseTimesInAnimation(boolean value) throws java.rmi.RemoteException, visad.VisADException
setUseTimesInAnimation
in class Displayable
value
- The new value for UseTimesInAnimationvisad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setAdjustFlow(boolean adjust) throws java.rmi.RemoteException, visad.VisADException
setAdjustFlow
in class Displayable
adjust
- true to adjustjava.rmi.RemoteException
- Java RMI failure.visad.VisADException
- VisAD failure.public void setDisplayUnit(visad.Unit unit) throws java.rmi.RemoteException, visad.VisADException
setDisplayUnit
in class Displayable
unit
- The display unit to use.visad.VisADException
- if a VisADFailure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.public void setSelectedRange(double low, double hi) throws java.rmi.RemoteException, visad.VisADException
setSelectedRange
in class Displayable
low
- The minimum value of the selected rangehi
- The maximum value of the selected rangevisad.VisADException
- if a VisADFailure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.public void setColorUnit(visad.Unit unit) throws java.rmi.RemoteException, visad.VisADException
setColorUnit
in class Displayable
unit
- The display unit to use.java.rmi.RemoteException
visad.VisADException
public void setPointSize(float size) throws java.rmi.RemoteException, visad.VisADException
setPointSize
in class Displayable
size
- size (pixels)java.rmi.RemoteException
visad.VisADException
public void setLineWidth(float width) throws java.rmi.RemoteException, visad.VisADException
setLineWidth
in class Displayable
width
- width for children (pixels)java.rmi.RemoteException
visad.VisADException
public void setColorPalette(float[][] c) throws java.rmi.RemoteException, visad.VisADException
setColorPalette
in class Displayable
c
- color palettevisad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setVisible(boolean visible, int index) throws java.rmi.RemoteException, visad.VisADException
visible
- Whether or not to display theindex
- The index of the child.visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void clearDisplayables() throws java.rmi.RemoteException, visad.VisADException
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void destroyAll() throws java.rmi.RemoteException, visad.VisADException
java.rmi.RemoteException
- _more_visad.VisADException
- _more_public Displayable lastDisplayable()
public int displayableCount()
public int indexOf(Displayable displayable)
Displayable
doesn't exist, then -1
is returned.displayable
- The Displayable
to have its index returned.public visad.Set getAnimationSet(visad.RealType aniType, boolean force) throws java.rmi.RemoteException, visad.VisADException
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 Displayable
aniType
- The type used for animationforce
- _more_null
.visad.VisADException
- if a VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.Displayable.hasDataObject()
public Displayable cloneForDisplay() throws java.rmi.RemoteException, visad.VisADException
cloneForDisplay
in class Displayable
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected void fireListDataContentsChanged(int index0, int index1)
index0
- The lower index of the range.index1
- The upper index of the range.protected void fireListDataIntervalAdded(int index0, int index1)
index0
- The lower index of the range.index1
- The upper index of the range.protected void fireListDataIntervalRemoved(int index0, int index1)
index0
- The lower index of the range.index1
- The upper index of the range.public java.lang.String toString()
toString
in class java.lang.Object