visad.java2d
Class DefaultDisplayRendererJ2D
- java.lang.Object
-
- visad.DisplayRenderer
-
- visad.java2d.DisplayRendererJ2D
-
- visad.java2d.DefaultDisplayRendererJ2D
-
- All Implemented Interfaces:
- java.util.EventListener, ControlListener, RendererSourceListener
public class DefaultDisplayRendererJ2D extends DisplayRendererJ2D
DefaultDisplayRendererJ2Dis the VisAD class for default background and metadata rendering under Java2D.
-
-
Constructor Summary
Constructors Constructor and Description DefaultDisplayRendererJ2D()This is the defaultDisplayRendererused by theDisplayImplJ2Dconstructor.DefaultDisplayRendererJ2D(java.lang.Class mbj2dClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description VisADGroupcreateSceneGraph(VisADCanvasJ2D c)Create scene graph root, if none exists, with Transform and direct manipulation root; create 3-D box, lights andMouseBehaviorJ2Dfor embedded user interface.booleangetMode2D()Returntrueif this is a 2-DDisplayRenderer.booleanlegalDisplayScalar(DisplayRealType type)Returntrueiftypeis legal for thisDisplayRenderer; for example, 2-DDisplayRenderers use this to disallow mappings to ZAxis and Latitude.voidsetBoxAspect(double[] aspect)set the aspect for the containing box aspect double[3] array used to scale x, y and z box sizesvoidsetLineWidth(float width)-
Methods inherited from class visad.java2d.DisplayRendererJ2D
addDirectManipulationSceneGraphComponent, addKeyboardBehavior, addSceneGraphComponent, anyCursorStringVector, anyDirects, clearScale, clearScales, clearScene, controlChanged, createBasicSceneGraph, createBasicSceneGraph, depth_cursor, drag_cursor, drag_depth, drawCursorStringVector, findDirect, getBoxOnBranch, getCanvas, getCursor, getCursorOnBranch, getDirect, getImage, getMouseBehavior, getNonDirect, getRoot, getTextureHeightMax, getTextureWidthMax, getTrans, initControl, legalDataRenderer, makeControl, makeDefaultRenderer, render_trigger, rendererDeleted, setClip, setCursorOn, setDirectOn, setDisplay, setScale, setScale, setScale, setScaleOn, setTransform2D, setWaitFlag, unsetClip
-
Methods inherited from class visad.DisplayRenderer
getAnimationString, getAnimationStringVisible, getBoxOn, getCursorColor, getCursorStringVector, getCursorStringVectorUnconditional, getDirectAxisValue, getDirectAxisValue, getDisplay, getPickThreshhold, getRendererControl, getRotateAboutCenter, getScaleRotation, getWaitFlag, getWaitMessageVisible, prepareAction, setAnimationString, setAnimationStringVisible, setBackgroundColor, setBackgroundColor, setBoxColor, setBoxColor, setBoxOn, setCursorColor, setCursorColor, setCursorStringOn, setCursorStringVector, setCursorStringVector, setForegroundColor, setForegroundColor, setPickThreshhold, setRotateAboutCenter, setScaleRotation, setWaitMessageVisible
-
-
-
-
Constructor Detail
-
DefaultDisplayRendererJ2D
public DefaultDisplayRendererJ2D()
This is the defaultDisplayRendererused by theDisplayImplJ2Dconstructor. It draws a 2-D box around the scene and a 2-D cursor.The left mouse button controls the projection as follows:
- mouse drag or mouse drag with Ctrl translates the scene sideways
- mouse drag with Shift down zooms the scene
- mouse drag translates the cursor sideways
Dataobject and dragging or re-drawing it.Cursor and direct manipulation locations are displayed in RealType values
BadMappingExceptionsandUnimplementedExceptionsare displayedNo RealType may be mapped to ZAxis, Latitude or Alpha.
-
DefaultDisplayRendererJ2D
public DefaultDisplayRendererJ2D(java.lang.Class mbj2dClass)
- Parameters:
mbj2dClass- - sub Class of MouseBehaviorJ2D
-
-
Method Detail
-
getMode2D
public boolean getMode2D()
Description copied from class:DisplayRendererReturntrueif this is a 2-DDisplayRenderer.- Overrides:
getMode2Din classDisplayRenderer- Returns:
trueif this is a 2-D renderer.
-
legalDisplayScalar
public boolean legalDisplayScalar(DisplayRealType type)
Description copied from class:DisplayRendererReturntrueiftypeis legal for thisDisplayRenderer; for example, 2-DDisplayRenderers use this to disallow mappings to ZAxis and Latitude.- Overrides:
legalDisplayScalarin classDisplayRenderer- Parameters:
type- The mapping type to check.- Returns:
trueiftypeis legal.
-
createSceneGraph
public VisADGroup createSceneGraph(VisADCanvasJ2D c) throws DisplayException
Create scene graph root, if none exists, with Transform and direct manipulation root; create 3-D box, lights andMouseBehaviorJ2Dfor embedded user interface.- Specified by:
createSceneGraphin classDisplayRendererJ2D- Parameters:
c-- Returns:
- Scene graph root.
- Throws:
DisplayException
-
setBoxAspect
public void setBoxAspect(double[] aspect)
set the aspect for the containing box aspect double[3] array used to scale x, y and z box sizes- Specified by:
setBoxAspectin classDisplayRenderer
-
setLineWidth
public void setLineWidth(float width)
- Overrides:
setLineWidthin classDisplayRendererJ2D
-
-
DMelt 3.0 © DataMelt by jWork.ORG