## visad.java2d
Class DefaultDisplayRendererJ2D

    java.lang.Object
      visad.DisplayRenderer
          visad.java2d.DisplayRendererJ2D
              visad.java2d.DefaultDisplayRendererJ2D

All Implemented Interfaces:
  ControlListener, EventListener, RendererSourceListener

public class DefaultDisplayRendererJ2D
extends DisplayRendererJ2D

`DefaultDisplayRendererJ2D` is the VisAD class for default background and metadata rendering under Java2D.

Field Summary

Fields inherited from class visad.DisplayRenderer
``

Constructor Summary
`DefaultDisplayRendererJ2D()` This is the default `DisplayRenderer` used by the `DisplayImplJ2D` constructor.
`DefaultDisplayRendererJ2D(Class mbj2dClass)`

Method Summary
`VisADGroup` `createSceneGraph(VisADCanvasJ2D c)` Create scene graph root, if none exists, with Transform and direct manipulation root; create 3-D box, lights and `MouseBehaviorJ2D` for embedded user interface.
`boolean` `getMode2D()` Return `true` if this is a 2-D `DisplayRenderer`.
`boolean` `legalDisplayScalar(DisplayRealType type)` Return `true` if `type` is legal for this `DisplayRenderer`; for example, 2-D `DisplayRenderer`s use this to disallow mappings to ZAxis and Latitude.
`void` `setBoxAspect(double[] aspect)` set the aspect for the containing box aspect double[3] array used to scale x, y and z box sizes
`void` `setLineWidth(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, notifyCapture, 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, getWaitFlag, getWaitMessageVisible, prepareAction, setAnimationString, setAnimationStringVisible, setBackgroundColor, setBackgroundColor, setBoxColor, setBoxColor, setBoxOn, setCursorColor, setCursorColor, setCursorStringOn, setCursorStringVector, setCursorStringVector, setForegroundColor, setForegroundColor, setPickThreshhold, setWaitMessageVisible`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultDisplayRendererJ2D

    public DefaultDisplayRendererJ2D()

  This is the default `DisplayRenderer` used by the `DisplayImplJ2D` constructor. 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
  The center mouse button activates and controls the 2-D cursor as follows:
  - mouse drag translates the cursor sideways
  The right mouse button is used for direct manipulation by clicking on the depiction of a `Data` object and dragging or re-drawing it.

  Cursor and direct manipulation locations are displayed in RealType values

  `BadMappingExceptions` and `UnimplementedExceptions` are displayed

  No RealType may be mapped to ZAxis, Latitude or Alpha.

### DefaultDisplayRendererJ2D

    public DefaultDisplayRendererJ2D(Class mbj2dClass)

Method Detail

### getMode2D

    public boolean getMode2D()

  Description copied from class: `DisplayRenderer`
  Return `true` if this is a 2-D `DisplayRenderer`.

  Overrides:
    `getMode2D` in class `DisplayRenderer`
  Returns:
    `true` if this is a 2-D renderer.

### legalDisplayScalar

    public boolean legalDisplayScalar(DisplayRealType type)

  Description copied from class: `DisplayRenderer`
  Return `true` if `type` is legal for this `DisplayRenderer`; for example, 2-D `DisplayRenderer`s use this to disallow mappings to ZAxis and Latitude.

  Overrides:
    `legalDisplayScalar` in class `DisplayRenderer`
  Parameters:
    `type` - The mapping type to check.
  Returns:
    `true` if `type` is 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 and `MouseBehaviorJ2D` for embedded user interface.

  Specified by:
    `createSceneGraph` in class `DisplayRendererJ2D`
  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:
    `setBoxAspect` in class `DisplayRenderer`

### setLineWidth

    public void setLineWidth(float width)

  Overrides:
    `setLineWidth` in class `DisplayRendererJ2D`