visad
Class GraphicsModeControl
- java.lang.Object
-
- visad.Control
-
- visad.GraphicsModeControl
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- GraphicsModeControlJ2D, GraphicsModeControlJ3D
public abstract class GraphicsModeControl extends Control implements java.lang.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
Fields Modifier and Type Field and Description static intAVERAGE_COLOR_MODEAverage color style for merging color mapsstatic intDASH_DOT_STYLEDash-Dot line style for Display.LineStyle mappingstatic intDASH_STYLEDash line style for Display.LineStyle mappingstatic intDOT_STYLEDot line style for Display.LineStyle mappingstatic intSOLID_STYLESolid line style for Display.LineStyle mappingstatic intSTACK2D2D stack type for volume renderingstatic intSUM_COLOR_MODESum color style for merging color mapsstatic intTEXTURE3D3D texture type for volume rendering
-
Constructor Summary
Constructors Constructor and Description GraphicsModeControl(DisplayImpl d)Create a GraphicsModeControl for the display.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract java.lang.Objectclone()A method to copy this objectabstract booleangetAdjustProjectionSeam()See whether or not to call methods to adjust the projection seam (VisADGeometryArray.adjustLongitude/adjustSeam);abstract booleangetCacheAppearances()Get whether Appearances are cached or notabstract intgetColorMode()Get the color mode.abstract intgetCurvedSize()Get the undersampling factor of surface shape for curved texture mapsabstract intgetLineStyle()Get the line styleabstract floatgetLineWidth()Get the width of line rendering.abstract booleangetMergeGeometries()Set whether Geometries for shapes should be merged into Groupabstract booleangetMissingTransparent()See whether missing values are rendered as transparent or not.abstract booleangetMode2D()Get the 2D mode of the display.abstract booleangetPointMode()Get the point mode.abstract floatgetPointSize()Get the size for point renderingabstract intgetPolygonMode()Get the Polygon modeabstract floatgetPolygonOffset()Get the current polygon offset.abstract floatgetPolygonOffsetFactor()Get the current polygon offset factor.abstract intgetProjectionPolicy()Get the current graphics-API-specific projection policy for the display.java.lang.StringgetSaveString()Get a string that can be used to reconstruct this control laterabstract booleangetScaleEnable()Get the use of numerical scales along display axes.abstract intgetTexture3DMode()Get the mode for Texture3D for volume renderingabstract booleangetTextureEnable()Get the use of texture mapping.abstract intgetTransparencyMode()Gets the graphics-API-specific transparency mode (e.g., SCREEN_DOOR, BLENDED) used in the displayabstract voidsetAdjustProjectionSeam(boolean adjust)Set whether or not to call methods to adjust the projection seam (VisADGeometryArray.adjustLongitude/adjustSeam);abstract voidsetCacheAppearances(boolean cache)Set whether the Appearances are reusedabstract voidsetColorMode(int mode)Set the mode for merging color mappings.abstract voidsetCurvedSize(int curved_size)Set the undersampling factor of surface shape for curved texture mapsabstract voidsetLineStyle(int style)set the style of line rendering; this is over-ridden by ConstantMaps to Display.LineStyleabstract voidsetLineStyle(int style, boolean noChange)Set the style of line rendering, does not update the display.abstract voidsetLineWidth(float width)Set the width of line rendering; this is over-ridden by ConstantMaps to Display.LineWidth.abstract voidsetLineWidth(float width, boolean noChange)Set the width of line rendering, do not update the display.abstract voidsetMergeGeometries(boolean merge)Set whether Geometries for shapes should be merged into Group if possible to reduce memory use.abstract voidsetMissingTransparent(boolean missing)Set the transparency of missing values.abstract voidsetPointMode(boolean mode)Set the point rendering mode.abstract voidsetPointSize(float size)Set the size for point rendering; this is over-ridden by ConstantMaps to Display.PointSize.abstract voidsetPointSize(float size, boolean noChange)Set the size for point rendering, does not update the display.abstract voidsetPolygonMode(int mode)Sets the graphics-API-specific polygon mode and updates the displayabstract voidsetPolygonMode(int mode, boolean noChange)Sets the graphics-API-specific polygon mode.abstract voidsetPolygonOffset(float polygonOffset)Sets the polygon offset and updates the display.abstract voidsetPolygonOffset(float polygonOffset, boolean noChange)Sets the polygon offset.abstract voidsetPolygonOffsetFactor(float factor)Sets the polygon offset factor and updates the display.abstract voidsetPolygonOffsetFactor(float factor, boolean noChange)Sets the polygon offset factor, does not update display.abstract voidsetProjectionPolicy(int policy)Sets a graphics-API-specific projection policy (e.g., PARALLEL_PROJECTION, PERSPECTIVE_PROJECTION) for the display.voidsetSaveString(java.lang.String save)Reconstruct this control using the specified save stringabstract voidsetScaleEnable(boolean enable)Set the use of numerical scales along display axes.abstract voidsetTexture3DMode(int mode)Set the mode for Texture3D for volume renderingabstract voidsetTextureEnable(boolean enable)Set the use of texture mapping.abstract voidsetTransparencyMode(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, getInstanceNumber, incTick, nullControl, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks, syncControl, toString
-
-
-
-
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, java.rmi.RemoteExceptionSet the width of line rendering; this is over-ridden by ConstantMaps to Display.LineWidth.- Parameters:
width- line width to use- Throws:
java.rmi.RemoteExceptionVisADException
-
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 usenoChange- dummy flag
-
getPointSize
public abstract float getPointSize()
Get the size for point rendering- Returns:
- point size
-
setPointSize
public abstract void setPointSize(float size) throws VisADException, java.rmi.RemoteExceptionSet the size for point rendering; this is over-ridden by ConstantMaps to Display.PointSize.- Parameters:
size- point size- Throws:
VisADException- unable to set point sizejava.rmi.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 sizenoChange- dummy flag
-
getLineStyle
public abstract int getLineStyle()
Get the line style- Returns:
- line style
-
setLineStyle
public abstract void setLineStyle(int style) throws VisADException, java.rmi.RemoteExceptionset 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 stylejava.rmi.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
noChange- dummy flag
-
getColorMode
public abstract int getColorMode()
Get the color mode.- Returns:
- color mode
-
setColorMode
public abstract void setColorMode(int mode) throws VisADException, java.rmi.RemoteExceptionSet 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 modejava.rmi.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, java.rmi.RemoteExceptionSet 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 modejava.rmi.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, java.rmi.RemoteExceptionSet 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 mappingjava.rmi.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, java.rmi.RemoteExceptionSet 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 scalesjava.rmi.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, java.rmi.RemoteExceptionSets 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 modejava.rmi.RemoteException- can't change transparency mode on remote display
-
setProjectionPolicy
public abstract void setProjectionPolicy(int policy) throws VisADException, java.rmi.RemoteExceptionSets 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 objectjava.rmi.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, java.rmi.RemoteExceptionSets 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 objectjava.rmi.RemoteException- can't change mode on remote display
-
setPolygonMode
public abstract void setPolygonMode(int mode, boolean noChange) throws VisADException, java.rmi.RemoteExceptionSets the graphics-API-specific polygon mode. Does not update the display.- Parameters:
mode- the polygon mode to be usednoChange- dummy flag- Throws:
VisADException- bad mode or can't create the necessary VisAD objectjava.rmi.RemoteException- can't change mode on remote display
-
getPolygonMode
public abstract int getPolygonMode()
Get the Polygon mode- Returns:
- the polygon mode
-
setPolygonOffset
public abstract void setPolygonOffset(float polygonOffset) throws VisADException, java.rmi.RemoteExceptionSets the polygon offset and updates the display.- Parameters:
polygonOffset- the polygon offset to be used- Throws:
VisADException- Unable to change offsetjava.rmi.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 usednoChange- dummy variable
-
getPolygonOffset
public abstract float getPolygonOffset()
Get the current polygon offset.- Returns:
- offset
-
setPolygonOffsetFactor
public abstract void setPolygonOffsetFactor(float factor) throws VisADException, java.rmi.RemoteExceptionSets the polygon offset factor and updates the display.- Parameters:
factor- the polygon offset factor to be used- Throws:
VisADException- Unable to change offset factorjava.rmi.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:
factor- the polygon offset to be usednoChange- dummy variable
-
getPolygonOffsetFactor
public abstract float getPolygonOffsetFactor()
Get the current polygon offset factor.- Returns:
- offset factor
-
setMissingTransparent
public abstract void setMissingTransparent(boolean missing) throws VisADException, java.rmi.RemoteExceptionSet the transparency of missing values.- Parameters:
missing- true if missing values should be rendered transparent.- Throws:
VisADException- Unable to change missing transparentjava.rmi.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, java.rmi.RemoteExceptionSet 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 propertyjava.rmi.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 mode) throws VisADException, java.rmi.RemoteExceptionSet the mode for Texture3D for volume rendering- Parameters:
mode- mode for Texture3D (STACK2D or TEXTURE3D)- Throws:
VisADException- Unable to change Texture3D modejava.rmi.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 sizejava.rmi.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)
-
setCacheAppearances
public abstract void setCacheAppearances(boolean cache)
Set whether the Appearances are reused- Parameters:
cache- true to cache and reuse appearances
-
getCacheAppearances
public abstract boolean getCacheAppearances()
Get whether Appearances are cached or not- Returns:
- true if caching
-
setMergeGeometries
public abstract void setMergeGeometries(boolean merge)
Set whether Geometries for shapes should be merged into Group if possible to reduce memory use.- Parameters:
merge- true to merge geometries if possible
-
getMergeGeometries
public abstract boolean getMergeGeometries()
Set whether Geometries for shapes should be merged into Group- Returns:
- true if merging is used
-
getSaveString
public java.lang.String getSaveString()
Get a string that can be used to reconstruct this control later- Specified by:
getSaveStringin classControl- Returns:
- save string
-
setSaveString
public void setSaveString(java.lang.String save) throws VisADException, java.rmi.RemoteExceptionReconstruct this control using the specified save string- Specified by:
setSaveStringin classControl- Parameters:
save- save string- Throws:
java.rmi.RemoteExceptionVisADException
-
-
DMelt 3.0 © DataMelt by jWork.ORG