## visad
Class GraphicsModeControl

    java.lang.Object
      visad.Control
          visad.GraphicsModeControl

All Implemented Interfaces:
  Cloneable, Serializable

Direct Known Subclasses:
  GraphicsModeControlJ2D, GraphicsModeControlJ3D

public abstract class GraphicsModeControl
extends Control
implements Cloneable

GraphicsModeControl is the VisAD interface class for controlling various mode settings for rendering.

A GraphicsModeControl is not linked to any DisplayRealType or ScalarMap. It is linked to a DisplayImpl.

See Also:
  Serialized Form

Field Summary
`static int` `AVERAGE_COLOR_MODE` Average color style for merging color maps
`static int` `DASH_DOT_STYLE` Dash-Dot line style for Display.LineStyle mapping
`static int` `DASH_STYLE` Dash line style for Display.LineStyle mapping
`static int` `DOT_STYLE` Dot line style for Display.LineStyle mapping
`static int` `SOLID_STYLE` Solid line style for Display.LineStyle mapping
`static int` `STACK2D` 2D stack type for volume rendering
`static int` `SUM_COLOR_MODE` Sum color style for merging color maps
`static int` `TEXTURE3D` 3D texture type for volume rendering

Fields inherited from class visad.Control
`display, displayRenderer`

Constructor Summary
`GraphicsModeControl(DisplayImpl d)` Create a GraphicsModeControl for the display.

Method Summary
`abstract Object` `clone()` A method to copy this object
`abstract boolean` `getAdjustProjectionSeam()` See whether or not to call methods to adjust the projection seam (VisADGeometryArray.adjustLongitude/adjustSeam);
`abstract int` `getColorMode()` Get the color mode.
`abstract int` `getCurvedSize()` Get the undersampling factor of surface shape for curved texture maps
`abstract int` `getLineStyle()` Get the line style
`abstract float` `getLineWidth()` Get the width of line rendering.
`abstract boolean` `getMissingTransparent()` See whether missing values are rendered as transparent or not.
`abstract boolean` `getMode2D()` Get the 2D mode of the display.
`abstract boolean` `getPointMode()` Get the point mode.
`abstract float` `getPointSize()` Get the size for point rendering
`abstract int` `getPolygonMode()`
`abstract float` `getPolygonOffset()` Get the current polygon offset.
`abstract float` `getPolygonOffsetFactor()` Get the current polygon offset factor.
`abstract int` `getProjectionPolicy()` Get the current graphics-API-specific projection policy for the display.
`String` `getSaveString()` Get a string that can be used to reconstruct this control later
`abstract boolean` `getScaleEnable()` Get the use of numerical scales along display axes.
`abstract int` `getTexture3DMode()` Get the mode for Texture3D for volume rendering
`abstract boolean` `getTextureEnable()` Get the use of texture mapping.
`abstract int` `getTransparencyMode()` Gets the graphics-API-specific transparency mode (e.g., SCREEN_DOOR, BLENDED) used in the display
`abstract void` `setAdjustProjectionSeam(boolean adjust)` Set whether or not to call methods to adjust the projection seam (VisADGeometryArray.adjustLongitude/adjustSeam);
`abstract void` `setColorMode(int mode)` Set the mode for merging color mappings.
`abstract void` `setCurvedSize(int curved_size)` Set the undersampling factor of surface shape for curved texture maps
`abstract void` `setLineStyle(int style)` set the style of line rendering; this is over-ridden by ConstantMaps to Display.LineStyle
`abstract void` `setLineStyle(int style, boolean noChange)` Set the style of line rendering, does not update the display.
`abstract void` `setLineWidth(float width)` Set the width of line rendering; this is over-ridden by ConstantMaps to Display.LineWidth.
`abstract void` `setLineWidth(float width, boolean noChange)` Set the width of line rendering, do not update the display.
`abstract void` `setMissingTransparent(boolean missing)` Set the transparency of missing values.
`abstract void` `setPointMode(boolean mode)` Set the point rendering mode.
`abstract void` `setPointSize(float size)` Set the size for point rendering; this is over-ridden by ConstantMaps to Display.PointSize.
`abstract void` `setPointSize(float size, boolean noChange)` Set the size for point rendering, does not update the display.
`abstract void` `setPolygonMode(int mode)` Sets the graphics-API-specific polygon mode and updates the display
`abstract void` `setPolygonMode(int mode, boolean noChange)` Sets the graphics-API-specific polygon mode.
`abstract void` `setPolygonOffset(float polygonOffset)` Sets the polygon offset and updates the display.
`abstract void` `setPolygonOffset(float polygonOffset, boolean noChange)` Sets the polygon offset.
`abstract void` `setPolygonOffsetFactor(float factor)` Sets the polygon offset factor and updates the display.
`abstract void` `setPolygonOffsetFactor(float factor, boolean noChange)` Sets the polygon offset factor, does not update display.
`abstract void` `setProjectionPolicy(int policy)` Sets a graphics-API-specific projection policy (e.g., PARALLEL_PROJECTION, PERSPECTIVE_PROJECTION) for the display.
`void` `setSaveString(String save)` Reconstruct this control using the specified save string
`abstract void` `setScaleEnable(boolean enable)` Set the use of numerical scales along display axes.
`abstract void` `setTexture3DMode(int type)` Set the mode for Texture3D for volume rendering
`abstract void` `setTextureEnable(boolean enable)` Set the use of texture mapping.
`abstract void` `setTransparencyMode(int mode)` Sets a graphics-API-specific transparency mode (e.g., SCREEN_DOOR, BLENDED) on the display.

Methods inherited from class visad.Control
`addControlListener, animation_string, changeControl, checkTicks, equals, getDisplay, getDisplayRenderer, getIndex, getInstanceNumber, incTick, nullControl, peekTicks, removeControlListener, resetTicks, setIndex, setInstanceNumber, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks, syncControl, toString`

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

Field Detail

### SOLID_STYLE

    public static final int SOLID_STYLE

  Solid line style for Display.LineStyle mapping

  See Also:
    Constant Field Values

### DASH_STYLE

    public static final int DASH_STYLE

  Dash line style for Display.LineStyle mapping

  See Also:
    Constant Field Values

### DOT_STYLE

    public static final int DOT_STYLE

  Dot line style for Display.LineStyle mapping

  See Also:
    Constant Field Values

### DASH_DOT_STYLE

    public static final int DASH_DOT_STYLE

  Dash-Dot line style for Display.LineStyle mapping

  See Also:
    Constant Field Values

### AVERAGE_COLOR_MODE

    public static final int AVERAGE_COLOR_MODE

  Average color style for merging color maps

  See Also:
    Constant Field Values

### SUM_COLOR_MODE

    public static final int SUM_COLOR_MODE

  Sum color style for merging color maps

  See Also:
    Constant Field Values

### STACK2D

    public static final int STACK2D

  2D stack type for volume rendering

  See Also:
    Constant Field Values

### TEXTURE3D

    public static final int TEXTURE3D

  3D texture type for volume rendering

  See Also:
    Constant Field Values

Constructor Detail

### GraphicsModeControl

    public GraphicsModeControl(DisplayImpl d)

  Create a GraphicsModeControl for the display.

Parameters:
  `d` - DisplayImpl to use

Method Detail

### getMode2D

    public abstract boolean getMode2D()

  Get the 2D mode of the display.

  Returns:
    true if display has a 2D mode.

### getLineWidth

    public abstract float getLineWidth()

  Get the width of line rendering.

  Returns:
    line width

### setLineWidth

    public abstract void setLineWidth(float width)
                               throws VisADException,
                                      RemoteException

  Set the width of line rendering; this is over-ridden by ConstantMaps to Display.LineWidth.

  Parameters:
    `width` - line width to use
  Throws:
    `VisADException`
    `RemoteException`

### setLineWidth

    public abstract void setLineWidth(float width,
                                      boolean noChange)

  Set the width of line rendering, do not update the display.

  Parameters:
    `width` - line width to use

### getPointSize

    public abstract float getPointSize()

  Get the size for point rendering

  Returns:
    point size

### setPointSize

    public abstract void setPointSize(float size)
                               throws VisADException,
                                      RemoteException

  Set the size for point rendering; this is over-ridden by ConstantMaps to Display.PointSize.

  Parameters:
    `size` - point size
  Throws:
    `VisADException` - unable to set point size
    `RemoteException` - unable to set point size on remote display

### setPointSize

    public abstract void setPointSize(float size,
                                      boolean noChange)

  Set the size for point rendering, does not update the display.

  Parameters:
    `size` - point size

### getLineStyle

    public abstract int getLineStyle()

  Get the line style

  Returns:
    line style

### setLineStyle

    public abstract void setLineStyle(int style)
                               throws VisADException,
                                      RemoteException

  set the style of line rendering; this is over-ridden by ConstantMaps to Display.LineStyle

  Parameters:
    `style` - The line styles are:
    - GraphicsModeControl.SOLID_STYLE
    - GraphicsModeControl.DASH_STYLE
    - GraphicsModeControl.DOT_STYLE
    - GraphicsModeControl.DASH_DOT_STYLE
  Throws:
    `VisADException` - unable to set line style
    `RemoteException` - unable to set line style on remote display

### setLineStyle

    public abstract void setLineStyle(int style,
                                      boolean noChange)

  Set the style of line rendering, does not update the display.

  Parameters:
    `style` - The line styles are:
    - GraphicsModeControl.SOLID_STYLE
    - GraphicsModeControl.DASH_STYLE
    - GraphicsModeControl.DOT_STYLE
    - GraphicsModeControl.DASH_DOT_STYLE

### getColorMode

    public abstract int getColorMode()

  Get the color mode.

  Returns:
    color mode

### setColorMode

    public abstract void setColorMode(int mode)
                               throws VisADException,
                                      RemoteException

  Set the mode for merging color mappings.

  Parameters:
    `mode` - The color modes are:
    - GraphicsModeControl.AVERAGE_COLOR_MODE
    - GraphicsModeControl.SUM_COLOR_MODE
  Throws:
    `VisADException` - unable to set color mode
    `RemoteException` - unable to set color mode on remote display

### getPointMode

    public abstract boolean getPointMode()

  Get the point mode.

  Returns:
    point mode

### setPointMode

    public abstract void setPointMode(boolean mode)
                               throws VisADException,
                                      RemoteException

  Set the point rendering mode.

  Parameters:
    `mode` - if true, this will cause some rendering as points rather than lines or surfaces.
  Throws:
    `VisADException` - unable to enable point mode
    `RemoteException` - unable to enable point mode on remote display

### getTextureEnable

    public abstract boolean getTextureEnable()

  Get the use of texture mapping.

  Returns:
    if true this the use of texture mapping is enabled

### setTextureEnable

    public abstract void setTextureEnable(boolean enable)
                                   throws VisADException,
                                          RemoteException

  Set the use of texture mapping.

  Parameters:
    `enable` - if true this will enable the use of texture mapping, where appropriate
  Throws:
    `VisADException` - unable to enable texture mapping
    `RemoteException` - unable to enable texture mapping on remote display

### getScaleEnable

    public abstract boolean getScaleEnable()

  Get the use of numerical scales along display axes.

  Returns:
    true if numerical scales are enabled along display spatial axes

### setScaleEnable

    public abstract void setScaleEnable(boolean enable)
                                 throws VisADException,
                                        RemoteException

  Set the use of numerical scales along display axes.

  Parameters:
    `enable` - if true, this will enable numerical scales along display spatial axes
  Throws:
    `VisADException` - unable to enable scales
    `RemoteException` - unable to enable scales on remote display

### getTransparencyMode

    public abstract int getTransparencyMode()

  Gets the graphics-API-specific transparency mode (e.g., SCREEN_DOOR, BLENDED) used in the display

  Returns:
    the graphics-API-specific transparency mode

### setTransparencyMode

    public abstract void setTransparencyMode(int mode)
                                      throws VisADException,
                                             RemoteException

  Sets a graphics-API-specific transparency mode (e.g., SCREEN_DOOR, BLENDED) on the display.

  Parameters:
    `mode` - graphics-API-specific transparency mode
  Throws:
    `VisADException` - Unable to change transparency mode
    `RemoteException` - can't change transparency mode on remote display

### setProjectionPolicy

    public abstract void setProjectionPolicy(int policy)
                                      throws VisADException,
                                             RemoteException

  Sets a graphics-API-specific projection policy (e.g., PARALLEL_PROJECTION, PERSPECTIVE_PROJECTION) for the display.

  Parameters:
    `policy` - policy to be used
  Throws:
    `VisADException` - bad policy or can't create the necessary VisAD object
    `RemoteException` - change policy on remote display

### getProjectionPolicy

    public abstract int getProjectionPolicy()

  Get the current graphics-API-specific projection policy for the display.

  Returns:
    policy

### setPolygonMode

    public abstract void setPolygonMode(int mode)
                                 throws VisADException,
                                        RemoteException

  Sets the graphics-API-specific polygon mode and updates the display

  Parameters:
    `mode` - the polygon mode to be used
  Throws:
    `VisADException` - bad mode or can't create the necessary VisAD object
    `RemoteException` - can't change mode on remote display

### setPolygonMode

    public abstract void setPolygonMode(int mode,
                                        boolean noChange)
                                 throws VisADException,
                                        RemoteException

  Sets the graphics-API-specific polygon mode. Does not update the display.

  Parameters:
    `mode` - the polygon mode to be used
  Throws:
    `VisADException` - bad mode or can't create the necessary VisAD object
    `RemoteException` - can't change mode on remote display

### getPolygonMode

    public abstract int getPolygonMode()

### setPolygonOffset

    public abstract void setPolygonOffset(float polygonOffset)
                                   throws VisADException,
                                          RemoteException

  Sets the polygon offset and updates the display.

  Parameters:
    `polygonOffset` - the polygon offset to be used
  Throws:
    `VisADException` - Unable to change offset
    `RemoteException` - can't change offset on remote display

### setPolygonOffset

    public abstract void setPolygonOffset(float polygonOffset,
                                          boolean noChange)

  Sets the polygon offset. Does not update the display.

  Parameters:
    `polygonOffset` - the polygon offset to be used
    `noChange` - dummy variable
  Throws:
    `VisADException` - Unable to change offset
    `RemoteException` - can't change offset on remote display

### getPolygonOffset

    public abstract float getPolygonOffset()

  Get the current polygon offset.

  Returns:
    offset

### setPolygonOffsetFactor

    public abstract void setPolygonOffsetFactor(float factor)
                                         throws VisADException,
                                                RemoteException

  Sets the polygon offset factor and updates the display.

  Throws:
    `VisADException` - Unable to change offset factor
    `RemoteException` - can't change offset factor on remote display

### setPolygonOffsetFactor

    public abstract void setPolygonOffsetFactor(float factor,
                                                boolean noChange)

  Sets the polygon offset factor, does not update display.

  Parameters:
    `noChange` - dummy variable
  Throws:
    `VisADException` - Unable to change offset factor
    `RemoteException` - can't change offset factor on remote display

### getPolygonOffsetFactor

    public abstract float getPolygonOffsetFactor()

  Get the current polygon offset factor.

  Returns:
    offset factor

### setMissingTransparent

    public abstract void setMissingTransparent(boolean missing)
                                        throws VisADException,
                                               RemoteException

  Set the transparency of missing values.

  Parameters:
    `missing` - true if missing values should be rendered transparent.
  Throws:
    `VisADException` - Unable to change missing transparent
    `RemoteException` - can't change missing transparent on remote display

### getMissingTransparent

    public abstract boolean getMissingTransparent()

  See whether missing values are rendered as transparent or not.

  Returns:
    true if missing values are transparent.

### setAdjustProjectionSeam

    public abstract void setAdjustProjectionSeam(boolean adjust)
                                          throws VisADException,
                                                 RemoteException

  Set whether or not to call methods to adjust the projection seam (VisADGeometryArray.adjustLongitude/adjustSeam);

  Parameters:
    `adjust` - true if seams should be adjusted
  Throws:
    `VisADException` - Unable to change adjust seam property
    `RemoteException` - can't change adjust seam property on remote display

### getAdjustProjectionSeam

    public abstract boolean getAdjustProjectionSeam()

  See whether or not to call methods to adjust the projection seam (VisADGeometryArray.adjustLongitude/adjustSeam);

  Returns:
    true if adjust seam methods should be called

### setTexture3DMode

    public abstract void setTexture3DMode(int type)
                                   throws VisADException,
                                          RemoteException

  Set the mode for Texture3D for volume rendering

  Throws:
    `VisADException` - Unable to change Texture3D mode
    `RemoteException` - can't change Texture3D mode on remote display

### getTexture3DMode

    public abstract int getTexture3DMode()

  Get the mode for Texture3D for volume rendering

  Returns:
    mode for Texture3D (e.g., STACK2D or TEXTURE3D)

### setCurvedSize

    public abstract void setCurvedSize(int curved_size)

  Set the undersampling factor of surface shape for curved texture maps

  Parameters:
    `curved_size` - undersampling factor (default 10)
  Throws:
    `VisADException` - Unable to change curved size
    `RemoteException` - can't change curved size on remote display

### getCurvedSize

    public abstract int getCurvedSize()

  Get the undersampling factor of surface shape for curved texture maps

  Returns:
    undersampling factor (default 10)

### getSaveString

    public String getSaveString()

  Get a string that can be used to reconstruct this control later

  Specified by:
    `getSaveString` in class `Control`
  Returns:
    save string

### setSaveString

    public void setSaveString(String save)
                       throws VisADException,
                              RemoteException

  Reconstruct this control using the specified save string

  Specified by:
    `setSaveString` in class `Control`
  Parameters:
    `save` - save string
  Throws:
    `VisADException` - if a VisAD error occurs
    `RemoteException` - if an RMI error occurs

### clone

    public abstract Object clone()

  A method to copy this object

  Overrides:
    `clone` in class `Control`
  Returns:
    a copy of this object