Package ucar.visad.display
Class XYDisplay
java.lang.Object
ucar.visad.display.DisplayMaster
ucar.visad.display.XYDisplay
- Direct Known Subclasses:
HovmollerDisplay
,TimeHeightDisplay
,XSDisplay
A wrapper for a 2D display for XY plots of data
- Version:
- $Revision: 1.25 $
- Author:
- Don Murray
-
Field Summary
Fields inherited from class ucar.visad.display.DisplayMaster
behavior, defaultMouseFunctions, log_, POINT_MODE
-
Constructor Summary
ConstructorsConstructorDescriptionConstuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and a default name.Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and the specified offscreen.Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and the specified name.Constructor with RealTypes for the X and Y axes and the given name.XYDisplay
(String name, RealType xAxisType, RealType yAxisType, boolean offScreen, Dimension dimension) Constructor with RealTypes for the X and Y axes and the given name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Let the XAxis autoscale.void
Let the YAxis autoscale.void
enableClipping
(boolean clip) Enable clipping of data at the box edges.boolean
Get whether the grid lines are visiblegetName()
Get the name given to this display.Get the AxisScale associated with the X axis.Get the mapping for the XAxis.Get the units of displayed values on the X axisGet the AxisScale associated with the Y axis.Get the mapping for the YAxis.Get the units of displayed values on the Y axisvoid
setAspect
(double x, double y) Set the aspect ratio of the axesvoid
setAxisTypes
(RealType xType, RealType yType) Change the mapping for both axesvoid
setGridLinesVisible
(boolean yesorno) Set the grid lines visiblevoid
Set the name of this display.void
setXAxisType
(RealType xType) Change the mapping for the XAxis.void
setXDisplayUnit
(Unit newUnit) Set the units of displayed values on the X axisvoid
setXRange
(double min, double max) Set the range of displayed values on the X axisvoid
setYAxisType
(RealType yType) Change the mapping for the YAxis.void
setYDisplayUnit
(Unit newUnit) Set the units of displayed values on the Y axisvoid
setYRange
(double min, double max) Set the range of displayed values on the Y axisvoid
showAxisScales
(boolean show) Show the scale on both axes.Methods inherited from class ucar.visad.display.DisplayMaster
addDisplayable, addDisplayListener, addKeyboardBehavior, addPropertyChangeListener, addPropertyChangeListener, addScalarMap, addScalarMaps, addVetoableChangeListener, addVetoableChangeListener, buildAnimationSet, dataChange, destroy, draw, ensureInactive, equals, firePropertyChange, firePropertyChange, getAnimationSetFromDisplayables, getAnimationStringVisible, getBackground, getComponent, getDestroyed, getDisplay, getDisplayableCount, getDisplayables, getDisplayables, getDisplayAspect, getDisplayComponent, getDisplayScale, getForeground, getImage, getMouseBehavior, getMouseFunctionMap, getOffscreenDimension, getProjectionMatrix, getRotation, getSavedProjectionMatrix, getScale, getScreenBounds, getStereoAvailable, getWaitMessageVisible, handleMouseWheelMoved, hashCode, indexOf, init, is3D, isActive, isPointMode, printMatrix, printMe, rebuild, rebuildDisplay, reDisplayAll, removeDisplayable, removeDisplayables, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, removeScalarMaps, removeVetoableChangeListener, removeVetoableChangeListener, replaceScalarMap, reScale, resetClipDistance, resetMouseFunctions, resetProjection, rotate, rotateX, rotateY, rotateZ, saveCurrentDisplay, saveCurrentDisplay, saveCurrentDisplay, saveProjection, setActive, setAnimation, setAnimationStringVisible, setBackground, setDefaultMouseFunctions, setDisplayables, setDisplayables, setDisplayActive, setDisplayAspect, setDisplayInactive, setEyePosition, setForeground, setKeyboardBehavior, setKeyboardEventMap, setKeyboardEventMap, setMouseFunctions, setOffscreenDimension, setPointMode, setProjectionMatrix, setRebuildNecessary, setWaitMessageVisible, setWheelEventMap, translate, zoom, zoom
-
Constructor Details
-
XYDisplay
Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and a default name.- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
XYDisplay
Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and the specified name.- Parameters:
name
- name for the display- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
XYDisplay
Constuctor for display with RealType.XAxis mapped to Display.XAxis and RealType.YAxis mapped to Display.YAxis and the specified offscreen.- Parameters:
offscreen
- is this display offscreendimension
- size of display for off screen rendering. May be null.- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
XYDisplay
public XYDisplay(String name, RealType xAxisType, RealType yAxisType) throws VisADException, RemoteException Constructor with RealTypes for the X and Y axes and the given name.- Parameters:
name
- name for the displayxAxisType
- a RealType for ScalarMap(yAxisType, Display.XAxis)yAxisType
- a RealType for ScalarMap(xAxisType, Display.YAxis)- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
XYDisplay
public XYDisplay(String name, RealType xAxisType, RealType yAxisType, boolean offScreen, Dimension dimension) throws VisADException, RemoteException Constructor with RealTypes for the X and Y axes and the given name.- Parameters:
name
- name for the displayxAxisType
- a RealType for ScalarMap(yAxisType, Display.XAxis)yAxisType
- a RealType for ScalarMap(xAxisType, Display.YAxis)offScreen
- is this display offscreendimension
- size of display for off screen rendering. May be null.- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
-
Method Details
-
setXAxisType
Change the mapping for the XAxis.- Parameters:
xType
- new RealType for ScalarMap- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
setYAxisType
Change the mapping for the YAxis.- Parameters:
yType
- new RealType for ScalarMap- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
getXAxisType
Get the mapping for the XAxis.- Returns:
- RealType for X axis ScalarMap
-
getYAxisType
Get the mapping for the YAxis.- Returns:
- RealType for Y axis ScalarMap
-
setAxisTypes
Change the mapping for both axes- Parameters:
xType
- new RealType for X axis ScalarMapyType
- new RealType for Y axis ScalarMap- Throws:
VisADException
- some VisAD errorRemoteException
- a remote error
-
getXAxisScale
Get the AxisScale associated with the X axis.- Returns:
- X AxisScale
-
getYAxisScale
Get the AxisScale associated with the Y axis.- Returns:
- X AxisScale
-
showAxisScales
public void showAxisScales(boolean show) Show the scale on both axes.- Parameters:
show
- true to show
-
setXRange
public void setXRange(double min, double max) Set the range of displayed values on the X axis- Parameters:
min
- minimum value for axismax
- maximum value for axis
-
setYRange
public void setYRange(double min, double max) Set the range of displayed values on the Y axis- Parameters:
min
- minimum value for axismax
- maximum value for axis
-
autoScaleXAxis
public void autoScaleXAxis()Let the XAxis autoscale. -
autoScaleYAxis
public void autoScaleYAxis()Let the YAxis autoscale. -
setXDisplayUnit
Set the units of displayed values on the X axis- Parameters:
newUnit
- units to use
-
setYDisplayUnit
Set the units of displayed values on the Y axis- Parameters:
newUnit
- units to use
-
getXDisplayUnit
Get the units of displayed values on the X axis- Returns:
- axis units
-
getYDisplayUnit
Get the units of displayed values on the Y axis- Returns:
- axis units
-
setAspect
public void setAspect(double x, double y) Set the aspect ratio of the axes- Parameters:
x
- X axis ratioy
- Y axis ratio
-
getName
Get the name given to this display.- Returns:
- name of display.
-
setName
Set the name of this display.- Parameters:
newName
- new name of display.
-
enableClipping
public void enableClipping(boolean clip) Enable clipping of data at the box edges.- Parameters:
clip
- true to turn clipping on, otherwise off
-
setGridLinesVisible
public void setGridLinesVisible(boolean yesorno) Set the grid lines visible- Parameters:
yesorno
- true to be visible
-
getGridLinesVisible
public boolean getGridLinesVisible()Get whether the grid lines are visible- Returns:
- true if visible
-