Class DisplayMaster
- Direct Known Subclasses:
AerologicalDisplay
,NavigatedDisplay
,WindProfileDisplay
,XYDisplay
DisplayImpl
and a list of Displayable
s.
Instances of this class have the following bound properties:
Name | Type | Access | Default | Description |
---|---|---|---|---|
pointMode | boolean | set/is | false |
Whether or not the VisAD display associated with this instance displays 1-D manifold data as points or lines. |
- Author:
- Steven R. Emmerson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected KeyboardBehavior
The keyboard behaviorstatic final int[][][]
The default mouse function mapstatic LogUtil.LogCategory
Use this member to log messages (through calls to LogUtil)static String
The name of the "point mode" property. -
Constructor Summary
ConstructorsConstructorDescriptionParameterless ctor.DisplayMaster
(DisplayImpl display) Constructs from a Display.DisplayMaster
(DisplayImpl display, int initialCapacity) Constructs from a VisAD display and an anticipated number ofDisplayable
s.DisplayMaster
(DisplayImpl display, int initialCapacity, Dimension offscreenDimension) Constructs from a VisAD display and an anticipated number ofDisplayable
s. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addDisplayable
(Displayable displayable) Adds a Displayable to the Displayable-s managed by this instance.void
addDisplayListener
(DisplayListener listener) Adds a VisADDisplayListener
to this instance'sDisplay
.void
addKeyboardBehavior
(KeyboardBehavior behavior) Adds aKeyboardBehavior
to the display that this DisplayMaster manages.void
Adds a PropertyChangeListener.void
addPropertyChangeListener
(String name, PropertyChangeListener listener) Adds a named PropertyChangeListener.protected void
addScalarMap
(ScalarMap map) Adds aScalarMap
to this instance.protected void
addScalarMaps
(ScalarMapSet mapSet) AddsScalarMap
s to this instance.void
Adds a VetoableChangeListener.void
addVetoableChangeListener
(String name, VetoableChangeListener listener) Adds a named VetoableChangeListener.protected Set
Build the animation setprotected void
Handles a change to the data in the displayables.void
destroy()
Destroys this instance, releasing any resources.void
draw()
Causes the Displayable-s managed by this instance to be rendered to the VisAD display.boolean
Ensures that this instance is inactive (ie: that it will not automatically rebuild the display when appropriate).boolean
Indicates if this instance if semantically identical to another object.protected void
Fires a PropertyChangeEvent.protected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue) Fires a PropertyChangeEvent.protected Set
Collect the animation set that is the union of all databoolean
Return whether the animation string is visible or notReturns the background color being usedGets the associated AWT Component.boolean
_more_final LocalDisplay
Returns the associated VisAD display.final int
Returns the number of Displayable-s.final Displayable[]
Returns theDisplayable
s of this instance as an array.final Displayable
getDisplayables
(int index) Returns theDisplayable
at a given position in the list ofDisplayable
s.double[]
Gets the current display aspect.Returns the component of the display.float
Get the scaling factor for probes and such.Returns the foreground color being used for the cursor and boxgetImage
(boolean doSync) Get a buffered image of the DisplayGet the current mouse behaviorint[][][]
mouse function mapprotected Dimension
Get the off screen dimensiondouble[]
Gets the current display projection.double[]
_more_double[]
Returns the saved projection Matrix.double
getScale()
_more_Helper to get the screen boundsboolean
Determine if this MapDisplay can do stereo.boolean
Get the state of the "Please wait.." string visibility.protected void
Handle when the mouse scroll wheel has been movedint
hashCode()
Gets the hash-code of this instance.int
indexOf
(Displayable displayable) Returns the index of a particularDisplayable
.void
init
(DisplayImpl display, int initialCapacity) Initialize this display masterprotected boolean
is3D()
Are we in 3D.boolean
isActive()
Indicates if this instance is active (i.e will immediately rebuild the display when appropriate).boolean
Gets the point-mode of the VisAD display.void
printMatrix
(String name, double[] matrix) Print out the matrix.void
printMe()
Print out a messageprotected void
rebuild()
Rebuild the display when needed.void
Rebuilds the display if appropriate.protected void
Tells the Display to retransform all data objects.boolean
removeDisplayable
(Displayable displayable) Removes a Displayable from this instance.void
Removes all Displayables from this instance.void
Removes a PropertyChangeListener.void
removePropertyChangeListener
(String name, PropertyChangeListener listener) Removes a named PropertyChangeListener.protected boolean
removeScalarMap
(ScalarMap map) Removes aScalarMap
from this instance.protected void
removeScalarMaps
(ScalarMapSet mapSet) Removes givenScalarMap
s from this instance.void
Removes a VetoableChangeListener.void
removeVetoableChangeListener
(String name, VetoableChangeListener listener) Removes a named VetoableChangeListener.protected void
replaceScalarMap
(ScalarMap oldMap, ScalarMap newMap) Replaces aScalarMap
in this instance.void
reScale()
Autoscale the axes of the display that have not had a range set on them.void
resetClipDistance
(double scale) void
Reset the mouse functions to the default.void
Restores to projection at time of lastsaveProjection()
call -- if one was made -- or to initial projection otherwise.void
rotate
(double anglex, double angley, double anglez) rotate some anglevoid
rotateX
(double angle) rotate some anglevoid
rotateY
(double angle) rotate some anglevoid
rotateZ
(double angle) rotate some anglevoid
saveCurrentDisplay
(File toFile) Capture the display's current image and save it to a file as an image (e.g., JPEG, png).void
saveCurrentDisplay
(File toFile, boolean doSync, boolean block) Capture the display's current image and save it to a file as an image (eg, JPEG, png).void
saveCurrentDisplay
(File toFile, boolean doSync, boolean block, float quality) Capture the display's current image and save it to a file as an image (eg, JPEG, png).void
Saves the current display projection.void
setActive
(boolean newActiveValue) Determines whether or not this instance will automatically rebuild the display when appropriate.void
setAnimation
(Animation animation, AnimationWidget animationWidget) Set the Animation for this DisplayMastervoid
setAnimationStringVisible
(boolean visible) Toggle the animation string visibility.void
setBackground
(Color color) Sets the background color of this VisAD display.static void
setDefaultMouseFunctions
(DisplayImpl display) A general utility method that sets the default mouse functions on the given display.final void
setDisplayables
(int index, Displayable displayable) Sets the Displayable managed by this instance at a given point in the list of Displayable-s.final void
setDisplayables
(Displayable[] displayables) Sets theDisplayable
s managed by this instance.void
Activate the display if there is one or fewer pending inactive callsvoid
setDisplayAspect
(double[] newAspect) Sets the display aspect ratio.void
Sets this instance inactive (ie: that it will not automatically rebuild the display when appropriate).void
setEyePosition
(double position) Set the eye position of each eye for a stereo view.void
setForeground
(Color color) Sets the "foreground" color of this VisAD displayprotected void
setKeyboardBehavior
(KeyboardBehavior behavior) Set the keyboard behavior to usevoid
setKeyboardEventMap
(int[][] map) Set the key to function map on the current keyboard behaviorstatic void
setKeyboardEventMap
(int[][] map, KeyboardBehavior behavior) Set the key to function map on the given behaviorvoid
setMouseFunctions
(int[][][] map) Set the mouse functions for this display.protected void
For offscreen renderingvoid
setPointMode
(boolean usePoints) Sets the point-mode of the VisAD display.void
setProjectionMatrix
(double[] newMatrix) Sets the current display projection.void
Sets the "rebuild necessary" property.void
setWaitMessageVisible
(boolean visible) Toggle the "Please wait.." string visibility.void
setWheelEventMap
(int[][] map) Set the mapping between mouse wheel event and functionvoid
translate
(double xFactor, double yFactor) Translate (X,Y position) of the displayvoid
zoom
(double factor) Zoom in on the displayvoid
zoom
(double xfactor, double yfactor, double zfactor) Zoom in on the display
-
Field Details
-
log_
Use this member to log messages (through calls to LogUtil) -
POINT_MODE
The name of the "point mode" property. -
behavior
The keyboard behavior -
defaultMouseFunctions
public static final int[][][] defaultMouseFunctionsThe default mouse function map
-
-
Constructor Details
-
DisplayMaster
public DisplayMaster()Parameterless ctor. Note: If you instantiate a DisplayMaster through this constructor you must also call the init method. -
DisplayMaster
Constructs from a Display.- Parameters:
display
- The VisAD display.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
DisplayMaster
public DisplayMaster(DisplayImpl display, int initialCapacity) throws VisADException, RemoteException Constructs from a VisAD display and an anticipated number ofDisplayable
s.- Parameters:
display
- The VisAD display.initialCapacity
- The anticipated number of Displayable-s.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
DisplayMaster
public DisplayMaster(DisplayImpl display, int initialCapacity, Dimension offscreenDimension) throws VisADException, RemoteException Constructs from a VisAD display and an anticipated number ofDisplayable
s.- Parameters:
display
- The VisAD display.initialCapacity
- The anticipated number of Displayable-s.offscreenDimension
- Use this to set the dimension of the offscreen component- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
-
Method Details
-
setWheelEventMap
public void setWheelEventMap(int[][] map) Set the mapping between mouse wheel event and function- Parameters:
map
- The mapping
-
init
Initialize this display master- Parameters:
display
- The displayinitialCapacity
- Initial capacity of the displayables list- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setOffscreenDimension
For offscreen rendering- Parameters:
dim
- The screen dimension
-
getOffscreenDimension
Get the off screen dimension- Returns:
- off screen dimension
-
getDisplayComponent
Returns the component of the display. If in offscreen mode returns the offscreenComponent- Returns:
- Display component
-
getScreenBounds
Helper to get the screen bounds- Returns:
- Bounds
-
getDestroyed
public boolean getDestroyed()_more_- Returns:
- _more_
-
destroy
public void destroy()Destroys this instance, releasing any resources. This method should be invoked when this instance is no longer needed. The client should not try to use this instance after invoking this method. Subclasses that override this method should invokesuper.destroy()
. -
getComponent
Gets the associated AWT Component.- Returns:
- The associated AWT Component.
-
reDisplayAll
protected void reDisplayAll()Tells the Display to retransform all data objects. -
reScale
public void reScale()Autoscale the axes of the display that have not had a range set on them. -
rebuildDisplay
Rebuilds the display if appropriate. If this instance is active and the display has been marked for a future rebuild, then the display is rebuilt.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
rebuild
Rebuild the display when needed.- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setAnimation
public void setAnimation(Animation animation, AnimationWidget animationWidget) throws VisADException, RemoteException Set the Animation for this DisplayMaster- Parameters:
animation
- Animation objectanimationWidget
- the associated widget- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
getDisplay
Returns the associated VisAD display.- Returns:
- The VisAD display.
-
getDisplayableCount
public final int getDisplayableCount()Returns the number of Displayable-s.- Returns:
- The number of Displayable-s.
-
addDisplayable
Adds a Displayable to the Displayable-s managed by this instance.- Parameters:
displayable
- The Displayable to be added.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayables
public final void setDisplayables(int index, Displayable displayable) throws VisADException, RemoteException Sets the Displayable managed by this instance at a given point in the list of Displayable-s.- Parameters:
index
- The position in the list of Displayable-s.displayable
- The Displayable to be in the given position.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayables
public final void setDisplayables(Displayable[] displayables) throws VisADException, RemoteException Sets theDisplayable
s managed by this instance.- Parameters:
displayables
- The Displayable-s to be managed by this instance.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeDisplayable
Removes a Displayable from this instance. Invokes the Displayable'sremoveDataReferences()
method if and only if the Displayable is in this instance's list of Displayable-s. NOTE: If the Displayable is in this instance's list of Displayable-s, then this instance must be active or be made active before the Displayable is can be successfully added to another display. The display might be rebuilt or marked for a rebuild.- Parameters:
displayable
- The Displayable to be removed.- Returns:
true
if and only if the Displayable was in this instance's list of Displayable-s.- Throws:
VisADException
- if an error occurs in core VisADRemoteException
- if a Java RMI failure occurs.- See Also:
-
removeDisplayables
Removes all Displayables from this instance.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
setBackground
Sets the background color of this VisAD display.- Parameters:
color
- a Java Color to become the background color.
-
getBackground
Returns the background color being used- Returns:
- color being used or null if it couldn't be determined
-
getForeground
Returns the foreground color being used for the cursor and box- Returns:
- color being used or null if it couldn't be determined
-
setForeground
Sets the "foreground" color of this VisAD display- Parameters:
color
- color to use
-
getDisplayables
Returns theDisplayable
at a given position in the list ofDisplayable
s.- Parameters:
index
- The position in the list to get the Displayable.- Returns:
- The Displayable at the given position.
-
getDisplayables
Returns theDisplayable
s of this instance as an array.- Returns:
- The array of Displayable-s.
-
indexOf
Returns the index of a particularDisplayable
.- Parameters:
displayable
- The Displayable to look for.- Returns:
- The index of the Displayable in this composite or -1 if this CompositeDisplayable does not contain this Displayable.
-
setPointMode
Sets the point-mode of the VisAD display.- Parameters:
usePoints
- True if the display should use points rather than connected line segments.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
isPointMode
public boolean isPointMode()Gets the point-mode of the VisAD display.- Returns:
- True if the display is using points rather than connected line segments.
-
saveProjection
public void saveProjection()Saves the current display projection. The projection may later be restored by the methodresetProjection()
.- See Also:
-
setDisplayAspect
Sets the display aspect ratio. The argument is passed unaltered toProjectionControl.setAspect(double[])
.- Parameters:
newAspect
- The new aspect ratio.- Throws:
VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
is3D
protected boolean is3D()Are we in 3D. This is rudimentary and just checks the type of the display- Returns:
- is the display 3D
-
getDisplayAspect
public double[] getDisplayAspect()Gets the current display aspect.- Returns:
- The current display aspect ratio.
-
getProjectionMatrix
public double[] getProjectionMatrix()Gets the current display projection. The object returned fromProjectionControl.getMatrix()
is returned.- Returns:
- The current display projection.
-
getScale
public double getScale()_more_- Returns:
- _more_
-
getRotation
public double[] getRotation()_more_- Returns:
- _more_
-
setProjectionMatrix
Sets the current display projection. The argument is passed, unaltered, toProjectionControl.setMatrix(double[])
.- Parameters:
newMatrix
- The new projection matrix.- Throws:
VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
getSavedProjectionMatrix
public double[] getSavedProjectionMatrix()Returns the saved projection Matrix. The object returned fromProjectionControl.getSavedProjectionMatrix()
is returned.- Returns:
- The saved projection matrix.
-
resetProjection
Restores to projection at time of lastsaveProjection()
call -- if one was made -- or to initial projection otherwise.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
addKeyboardBehavior
Adds a
KeyboardBehavior
to the display that this DisplayMaster manages.This implementation does nothing but check to see if this instance has been destroyed.
- Parameters:
behavior
- The keyboard behavior to be added.
-
setKeyboardBehavior
Set the keyboard behavior to use- Parameters:
behavior
- the keyboard behavior
-
setKeyboardEventMap
public void setKeyboardEventMap(int[][] map) Set the key to function map on the current keyboard behavior- Parameters:
map
- the map
-
setKeyboardEventMap
Set the key to function map on the given behavior- Parameters:
map
- the mapbehavior
- behavior to set
-
setMouseFunctions
Set the mouse functions for this display.- Parameters:
map
- array of mouse functions to buttons- Throws:
VisADException
- the VisAD exception- See Also:
-
getMouseFunctionMap
public int[][][] getMouseFunctionMap()mouse function map- Returns:
- mouse function map
-
getMouseBehavior
Get the current mouse behavior- Returns:
- mouse behavior
-
rotateX
public void rotateX(double angle) rotate some angle- Parameters:
angle
- rotate angle
-
rotateY
public void rotateY(double angle) rotate some angle- Parameters:
angle
- rotate angle
-
rotateZ
public void rotateZ(double angle) rotate some angle- Parameters:
angle
- rotate angle
-
handleMouseWheelMoved
Handle when the mouse scroll wheel has been moved- Parameters:
e
- event
-
zoom
public void zoom(double factor) Zoom in on the display- Parameters:
factor
- zoom factor ( > 1 = zoom in, 1 > zoom > 0 = zoom out). using 2.0 and .5 seems to work well.
-
zoom
public void zoom(double xfactor, double yfactor, double zfactor) Zoom in on the display- Parameters:
xfactor
- x zoom factoryfactor
- y zoom factorzfactor
- z zoom factor ( > 1 = zoom in, 1 > zoom > 0 = zoom out). using 2.0 and .5 seems to work well.
-
resetClipDistance
public void resetClipDistance(double scale) -
getDisplayScale
public float getDisplayScale()Get the scaling factor for probes and such. The scaling is the parameter that gets passed to TextControl.setSize() and ShapeControl.setScale().- Returns:
- ratio of the current matrix scale factor to the saved matrix scale factor.
-
translate
public void translate(double xFactor, double yFactor) Translate (X,Y position) of the display- Parameters:
xFactor
- X translation factoryFactor
- Y translation factor
-
rotate
public void rotate(double anglex, double angley, double anglez) rotate some angle- Parameters:
anglex
- rotate angleangley
- rotate angleanglez
- rotate angle
-
resetMouseFunctions
Reset the mouse functions to the default.- Throws:
VisADException
- the VisAD exception
-
setDefaultMouseFunctions
A general utility method that sets the default mouse functions on the given display.- Parameters:
display
- Display to set functions for- Throws:
VisADException
- the VisAD exception
-
setWaitMessageVisible
public void setWaitMessageVisible(boolean visible) Toggle the "Please wait.." string visibility.- Parameters:
visible
- true to make it visible
-
getWaitMessageVisible
public boolean getWaitMessageVisible()Get the state of the "Please wait.." string visibility.- Returns:
- true if visible
-
setAnimationStringVisible
public void setAnimationStringVisible(boolean visible) Toggle the animation string visibility.- Parameters:
visible
- true to make it visible
-
getAnimationStringVisible
public boolean getAnimationStringVisible()Return whether the animation string is visible or not- Returns:
- true if visible
-
getStereoAvailable
public boolean getStereoAvailable()Determine if this MapDisplay can do stereo. Subclasses that support this should override this method- Returns:
- false (unless overriden)
-
setEyePosition
public void setEyePosition(double position) Set the eye position of each eye for a stereo view. Subclasses that support this should override this method- Parameters:
position
- x position of each eye (left negative, right positive).
-
addVetoableChangeListener
Adds a VetoableChangeListener.- Parameters:
listener
- The VetoableChangeListener to add.
-
addVetoableChangeListener
Adds a named VetoableChangeListener.- Parameters:
name
- The name of the property.listener
- The VetoableChangeListener to add.
-
removeVetoableChangeListener
Removes a VetoableChangeListener.- Parameters:
listener
- The VetoableChangeListener to be removed.
-
removeVetoableChangeListener
Removes a named VetoableChangeListener.- Parameters:
name
- The name of the property.listener
- The VetoableChangeListener to be removed.
-
addPropertyChangeListener
Adds a PropertyChangeListener.- Parameters:
listener
- The PropertyChangeListener to add.
-
addPropertyChangeListener
Adds a named PropertyChangeListener.- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to add.
-
removePropertyChangeListener
Removes a PropertyChangeListener.- Parameters:
listener
- The PropertyChangeListener to be removed.
-
removePropertyChangeListener
Removes a named PropertyChangeListener.- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to be removed.
-
draw
Causes the Displayable-s managed by this instance to be rendered to the VisAD display.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
equals
Indicates if this instance if semantically identical to another object. -
hashCode
public int hashCode()Gets the hash-code of this instance. -
addDisplayListener
Adds a VisADDisplayListener
to this instance'sDisplay
.- Parameters:
listener
- The VisAD DisplayListener to be added.
-
firePropertyChange
Fires a PropertyChangeEvent.- Parameters:
event
- The PropertyChangeEvent to be fired.
-
firePropertyChange
Fires a PropertyChangeEvent.- Parameters:
propertyName
- The name of the property.oldValue
- The old value of the property.newValue
- The new Value of the property.
-
addScalarMap
Adds a
ScalarMap
to this instance. The display might be rebuilt or marked for a rebuild.This implementation invokes
addScalarMaps(ScalarMapSet)
with the givenScalarMap
as the only member of the set.- Parameters:
map
- The ScalarMap to add.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
addScalarMaps
AddsScalarMap
s to this instance.- Parameters:
mapSet
- The ScalarMap-s to add.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeScalarMaps
Removes givenScalarMap
s from this instance. The display might be rebuilt or marked for a rebuild.- Parameters:
mapSet
- The ScalarMap-s to remove.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeScalarMap
Removes aScalarMap
from this instance. The display might be rebuilt or marked for a rebuild.true
is returned if and only if theScalarMap
had been added via a previousaddScalarMap(ScalarMap)
oraddScalarMaps(ScalarMapSet)
.- Parameters:
map
- The ScalarMap to remove.- Returns:
true
if the ScalarMap existed.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
replaceScalarMap
protected void replaceScalarMap(ScalarMap oldMap, ScalarMap newMap) throws VisADException, RemoteException Replaces aScalarMap
in this instance. The display might be rebuilt or marked for a rebuild.- Parameters:
oldMap
- The ScalarMap to remove.newMap
- The ScalarMap to add.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setRebuildNecessary
public void setRebuildNecessary()Sets the "rebuild necessary" property. deprecated -
isActive
public boolean isActive()Indicates if this instance is active (i.e will immediately rebuild the display when appropriate).- Returns:
true
if and only if the display master is active.
-
printMe
public void printMe()Print out a message -
setDisplayInactive
public void setDisplayInactive()Sets this instance inactive (ie: that it will not automatically rebuild the display when appropriate).This implementation invokes
setActive(boolean)
. -
setDisplayActive
Activate the display if there is one or fewer pending inactive calls- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setActive
Determines whether or not this instance will automatically rebuild the display when appropriate. If the argument istrue
and the display has been marked for a rebuild, then the display will be rebuilt. This method is idempotent.- Parameters:
newActiveValue
-true
will cause an immediate rebuld if appropriate and ensure future, automatic rebuilds.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure. deprecated This will become private in the future. You should usesetDisplayInactive()
andsetDisplayActive()
-
ensureInactive
public boolean ensureInactive()Ensures that this instance is inactive (ie: that it will not automatically rebuild the display when appropriate).This implementation invokes
setActive(boolean)
.- Returns:
- The previous value of the "active" property.
deprecated This will become private in the future. You should use
setDisplayInactive()
andsetDisplayActive()
-
saveCurrentDisplay
Capture the display's current image and save it to a file as an image (e.g., JPEG, png). No blocking occurs and the currently rendered display is captured.
This implementation simply calls
saveCurrentDisplay(File, boolean, boolean)
withdoSync=false
.- Parameters:
toFile
- The file to which to save the current image.
-
getAnimationSetFromDisplayables
Collect the animation set that is the union of all data- Returns:
- Set of animation samplings
- Throws:
RemoteException
- problem computing set from remote data objectsVisADException
- problem computing set from local Data objects
-
buildAnimationSet
Build the animation set- Returns:
- the animation set
- Throws:
RemoteException
- problem computing set from remote data objectsVisADException
- problem computing set from local Data objects
-
dataChange
Handles a change to the data in the displayables.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
saveCurrentDisplay
Capture the display's current image and save it to a file as an image (eg, JPEG, png). IfdoSync
is true, then the calling thread will block until rendering is complete.- Parameters:
toFile
- The file to which to save the current image.doSync
- Whether or not to wait until the display is stable.block
- Whether or not to wait until the image is saved.
-
saveCurrentDisplay
Capture the display's current image and save it to a file as an image (eg, JPEG, png). IfdoSync
is true, then the calling thread will block until rendering is complete.- Parameters:
toFile
- The file to which to save the current image.doSync
- Whether or not to wait until the display is stable.block
- Whether or not to wait until the image is saved.quality
- JPEG quality
-
getImage
Get a buffered image of the Display- Parameters:
doSync
- true to wait until display is done- Returns:
- BufferedImage
- Throws:
Exception
- problem getting the image
-
printMatrix
Print out the matrix.- Parameters:
name
- the name of the matrixmatrix
- the matrix to print
-