visad.java2d
Class DisplayImplJ2D

java.lang.Object
  extended by visad.ActionImpl
      extended by visad.DisplayImpl
          extended by visad.java2d.DisplayImplJ2D
All Implemented Interfaces:
Runnable, EventListener, Action, Display, LocalDisplay, ThingChangedListener

public class DisplayImplJ2D
extends DisplayImpl

DisplayImplJ2D is the VisAD class for displays that use Java 3D. It is runnable.

DisplayImplJ2D is not Serializable and should not be copied between JVMs.


Nested Class Summary
 
Nested classes/interfaces inherited from class visad.DisplayImpl
DisplayImpl.Syncher
 
Field Summary
static int JPANEL
           
static int OFFSCREEN
           
static int UNKNOWN
          legal values for api
 
Fields inherited from class visad.ActionImpl
TRACE_STACK, TRACE_TIME
 
Fields inherited from interface visad.Display
AdjustProjectionSeam, Alpha, Animation, Blue, CacheAppearances, CMY, ColorMode, components3c, components3s, componentscmy, componentscyl, componentsflow1, componentsflow1s, componentsflow2, componentsflow2s, componentshsv, componentsrgb, componentsso, CurvedSize, Cyan, CylAzimuth, CylRadius, CylZAxis, DisplayCMYCoordSys, DisplayCMYTuple, DisplayCylindricalCoordSys, DisplayFlow1SphericalCoordSys, DisplayFlow1SphericalTuple, DisplayFlow1Tuple, DisplayFlow2SphericalCoordSys, DisplayFlow2SphericalTuple, DisplayFlow2Tuple, DisplayHSVCoordSys, DisplayHSVTuple, DisplayRealArray, DisplayRGBTuple, DisplaySpatialCartesianTuple, DisplaySpatialCylindricalTuple, DisplaySpatialOffsetTuple, DisplaySpatialSphericalTuple, DisplaySphericalCoordSys, Flow1Azimuth, Flow1Elevation, Flow1Radial, Flow1X, Flow1Y, Flow1Z, Flow2Azimuth, Flow2Elevation, Flow2Radial, Flow2X, Flow2Y, Flow2Z, Green, HSV, Hue, IsoContour, Latitude, LineStyle, LineWidth, List, Longitude, Magenta, MergeGeometries, MissingTransparent, PointMode, PointSize, PolygonMode, PolygonOffset, PolygonOffsetFactor, Radius, Red, RGB, RGBA, Saturation, SelectRange, SelectValue, Shape, ShapeScale, Text, Texture3DMode, TextureEnable, Value, XAxis, XAxisOffset, YAxis, YAxisOffset, Yellow, ZAxis, ZAxisOffset
 
Constructor Summary
DisplayImplJ2D(RemoteDisplay rmtDpy)
           
DisplayImplJ2D(RemoteDisplay rmtDpy, DisplayRendererJ2D renderer)
           
DisplayImplJ2D(String name)
          construct a DisplayImpl for Java2D with the default DisplayRenderer, in a JFC JPanel
DisplayImplJ2D(String name, DisplayRendererJ2D renderer)
          construct a DisplayImpl for Java2D with a non-default DisplayRenderer, in a JFC JPanel
DisplayImplJ2D(String name, DisplayRendererJ2D renderer, int api)
          construct a DisplayImpl for Java2D with a non-default DisplayRenderer; in a JFC JPanel if api == DisplayImplJ2D.JPANEL
DisplayImplJ2D(String name, DisplayRendererJ2D renderer, int width, int height)
          offscreen constructor with non-default DisplayRenderer
DisplayImplJ2D(String name, DisplayRendererJ2D renderer, int api, int width, int height)
          most general constructor
DisplayImplJ2D(String name, int api)
          constructor with default DisplayRenderer
DisplayImplJ2D(String name, int width, int height)
          construct a DisplayImpl for Java2D for offscreen rendering, with size given by width and height; getComponent() of this returns null, but display is accesible via getImage()
 
Method Summary
 void clearMaps()
          remove all ScalarMaps linked this display;
 void destroy()
          destroy this display: clear all references to objects (so they can be garbage collected), stop all Threads and remove all links
 void doAction()
          Check if any Data need re-transform, and if so, do it.
 int getAPI()
          Return the API used for this display
 boolean getAutoAspect()
           
protected  DisplayRenderer getDefaultDisplayRenderer()
           
 GraphicsModeControl getGraphicsModeControl()
          return the GraphicsModeControl associated with this Display
 ProjectionControl getProjectionControl()
          return the ProjectionControl associated with this Display
 void setAutoAspect(boolean auto)
           
 void setScratch()
           
 
Methods inherited from class visad.DisplayImpl
addActivityHandler, addControl, addDataSourceListener, addDisplayListener, addMap, addMap, addMessageListener, addReference, addReference, addReferences, addReferences, addReferences, addReferences, addRemoteSourceListener, addRendererSourceListener, addSlave, checkTicks, connectionFailed, controlChanged, delay, disableEvent, enableEvent, equals, finalize, getComponent, getConnectionID, getConstantMapVector, getControl, getControl, getControls, getControlVector, getDisplayMonitor, getDisplayRenderer, getDisplayScalar, getDisplayScalarCount, getDisplayScalarIndex, getDisplaySync, getImage, getImage, getMapVector, getMouseBehavior, getNumberOfControls, getPrintable, getRenderers, getRendererVector, getScalar, getScalarCount, getScalarIndex, getValueArrayLength, getValueToMap, getValueToScalar, getWidgetPanel, hasSlaves, isDestroyed, isEventEnabled, lostCollabConnection, make_matrix, multiply_matrix, notifyListeners, notifyListeners, printStack, reAutoScale, reDisplayAll, removeActivityHandler, removeAllReferences, removeAllSlaves, removeDataSourceListener, removeDisplayListener, removeMap, removeMap, removeMessageListener, removeReference, removeRemoteSourceListener, removeRendererSourceListener, removeSlave, replaceReference, replaceReference, replaceReferences, replaceReferences, replaceReferences, replaceReferences, sendMessage, setAlwaysAutoScale, setComponent, setMouseBehavior, syncRemoteData, toString, toString, updateBusyStatus, updateSlaves, updateSlaves
 
Methods inherited from class visad.ActionImpl
disableAction, enableAction, findReference, getCurrentActionThread, getLinks, getName, getTaskCount, printPool, run, setEnabled, setName, setThreadPoolMaximum, stop, stopThreadPool, thingChanged, waitForTasks
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface visad.Action
getName
 
Methods inherited from interface visad.ThingChangedListener
thingChanged
 

Field Detail

UNKNOWN

public static final int UNKNOWN
legal values for api

See Also:
Constant Field Values

JPANEL

public static final int JPANEL
See Also:
Constant Field Values

OFFSCREEN

public static final int OFFSCREEN
See Also:
Constant Field Values
Constructor Detail

DisplayImplJ2D

public DisplayImplJ2D(RemoteDisplay rmtDpy)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(RemoteDisplay rmtDpy,
                      DisplayRendererJ2D renderer)
               throws VisADException,
                      RemoteException
Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(String name)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java2D with the default DisplayRenderer, in a JFC JPanel

Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(String name,
                      DisplayRendererJ2D renderer)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java2D with a non-default DisplayRenderer, in a JFC JPanel

Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(String name,
                      int api)
               throws VisADException,
                      RemoteException
constructor with default DisplayRenderer

Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(String name,
                      DisplayRendererJ2D renderer,
                      int api)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java2D with a non-default DisplayRenderer; in a JFC JPanel if api == DisplayImplJ2D.JPANEL

Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(String name,
                      int width,
                      int height)
               throws VisADException,
                      RemoteException
construct a DisplayImpl for Java2D for offscreen rendering, with size given by width and height; getComponent() of this returns null, but display is accesible via getImage()

Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(String name,
                      DisplayRendererJ2D renderer,
                      int width,
                      int height)
               throws VisADException,
                      RemoteException
offscreen constructor with non-default DisplayRenderer

Throws:
VisADException
RemoteException

DisplayImplJ2D

public DisplayImplJ2D(String name,
                      DisplayRendererJ2D renderer,
                      int api,
                      int width,
                      int height)
               throws VisADException,
                      RemoteException
most general constructor

Throws:
VisADException
RemoteException
Method Detail

getDefaultDisplayRenderer

protected DisplayRenderer getDefaultDisplayRenderer()
Specified by:
getDefaultDisplayRenderer in class DisplayImpl
Returns:
the default DisplayRenderer for this DisplayImpl

getProjectionControl

public ProjectionControl getProjectionControl()
Description copied from interface: LocalDisplay
return the ProjectionControl associated with this Display

Specified by:
getProjectionControl in interface LocalDisplay
Specified by:
getProjectionControl in class DisplayImpl
Returns:
the ProjectionControl associated with this DisplayImpl

getGraphicsModeControl

public GraphicsModeControl getGraphicsModeControl()
Description copied from interface: LocalDisplay
return the GraphicsModeControl associated with this Display

Specified by:
getGraphicsModeControl in interface LocalDisplay
Specified by:
getGraphicsModeControl in class DisplayImpl
Returns:
the GraphicsModeControl associated with this DisplayImpl

getAPI

public int getAPI()
           throws VisADException
Return the API used for this display

Overrides:
getAPI in class DisplayImpl
Returns:
the mode being used (UNKNOWN, JPANEL, OFFSCREEN)
Throws:
VisADException

setScratch

public void setScratch()

clearMaps

public void clearMaps()
               throws VisADException,
                      RemoteException
Description copied from class: DisplayImpl
remove all ScalarMaps linked this display;

Specified by:
clearMaps in interface Display
Overrides:
clearMaps in class DisplayImpl
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

doAction

public void doAction()
              throws VisADException,
                     RemoteException
Description copied from class: DisplayImpl
Check if any Data need re-transform, and if so, do it. Check if auto-scaling is needed for any ScalarMaps, and if so, do it. This method does the real work of DisplayImpl.

Overrides:
doAction in class DisplayImpl
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

getAutoAspect

public boolean getAutoAspect()

setAutoAspect

public void setAutoAspect(boolean auto)

destroy

public void destroy()
             throws VisADException,
                    RemoteException
Description copied from class: DisplayImpl
destroy this display: clear all references to objects (so they can be garbage collected), stop all Threads and remove all links

Specified by:
destroy in interface Display
Overrides:
destroy in class DisplayImpl
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred