public class TransectDisplay extends NavigatedDisplay implements visad.DisplayListener, visad.ControlListener
Modifier and Type | Class and Description |
---|---|
protected class |
TransectDisplay.TransectCoordinateSystem
Class for converting from lat/lon/alt to xyz
|
NavigatedDisplay.VerticalMapSet
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
DEFAULT_PRESSURE_LABELS
default pressure labels
|
static float |
DEFAULT_Z
default z value
|
BOTTOM_VIEW, BOTTOM_VIEW_NAME, CLIP_BACK_DEFAULT, CLIP_BACK_PERSPECTIVE, CLIP_FRONT_DEFAULT, CLIP_FRONT_PERSPECTIVE, CURSOR_ALTITUDE, CURSOR_LATITUDE, CURSOR_LONGITUDE, defaultClipDistanceBack, defaultClipDistanceFront, EAST_VIEW, EAST_VIEW_NAME, MODE_2D, MODE_2Din3D, MODE_3D, NORTH_VIEW, NORTH_VIEW_NAME, SOUTH_VIEW, SOUTH_VIEW_NAME, TOP_VIEW, TOP_VIEW_NAME, WEST_VIEW, WEST_VIEW_NAME
behavior, defaultMouseFunctions, log_, POINT_MODE
Constructor and Description |
---|
TransectDisplay()
Constructs a new TransectDisplay to display data as an XY plot
along a lat/lon transect.
|
TransectDisplay(visad.Gridded2DSet line)
Constructs a new TransectDisplay to display data as an XY plot
along a lat/lon transect.
|
TransectDisplay(visad.Gridded2DSet line,
boolean offscreen,
java.awt.Dimension dimension)
Constructs a new TransectDisplay to display data as an XY plot
along a lat/lon transect.
|
Modifier and Type | Method and Description |
---|---|
void |
addKeyboardBehavior(visad.KeyboardBehavior behavior)
Add a keyboard behavior for this display
|
void |
addVerticalMap(visad.RealType newVertType)
Add a new mapping of this type to the vertical coordinate
|
void |
controlChanged(visad.ControlEvent ce)
Handle a change to the control
|
protected void |
cursorChange()
Handles a change to the cursor position.
|
protected void |
cursorMoved()
Handles a change to the cursor position.
|
void |
displayChanged(visad.DisplayEvent event)
Handle a DisplayEvent
|
void |
enableClipping(boolean clip)
Enable clipping of data at the scale edges
|
void |
extendTransect(double amount)
Extend (or condense) the displayed transect.
|
void |
extendVerticalRange(double amount)
Extend (or condense) the displayed transect.
|
protected visad.ScalarMap |
getAltitudeMap()
Accessor method for the ScalarMap for Altitude
|
visad.DisplayRealType |
getDisplayAltitudeType()
Accessor method for the DisplayAltitudeType
|
visad.CoordinateSystem |
getDisplayCoordinateSystem()
Get the display coordinate system that turns lat/lon/alt to
x/y/z
|
visad.DisplayRealType |
getDisplayLatitudeType()
Accessor method for the DisplayLatitudeType
|
visad.DisplayRealType |
getDisplayLongitudeType()
Accessor method for the DisplayLongitudeType
|
visad.DisplayTupleType |
getDisplayTupleType()
Accessor method for the DisplayTupleType.
|
visad.georef.EarthLocation |
getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
Get the earth location from the VisAD xyz coodinates
|
visad.Unit |
getHorizontalRangeUnit()
Get the Unit of the horizontal range
|
visad.Real |
getMaxDataDistance()
Set the maximum distance away from the transect for
data to be displayed.
|
visad.georef.EarthLocation[] |
getScaleEndPoints()
Get the scale end points
|
boolean |
getScalesVisible()
Get the box visibility.
|
visad.RealTuple |
getSpatialCoordinates(visad.georef.EarthLocation el)
Returns the spatial (XYZ) coordinates of the particular EarthLocation
|
double[] |
getSpatialCoordinates(visad.georef.EarthLocation el,
double[] xyz,
double altitude)
Returns the spatial (XYZ) coordinates of the particular EarthLocation
|
boolean |
getStereoAvailable()
Determine if this MapDisplay can do stereo.
|
protected visad.Gridded2DSet |
getTransect()
Get the transect for this display
|
double[] |
getVerticalRange()
Get the range of the vertical coordinate (Altitude)
|
double[][] |
getXAxisEndPoints()
Get the coordinates of the left and right ends of the the
horizontal axis.
|
double[][] |
getYAxisEndPoints()
Get the coordinates of the left and right ends of the the
horizontal axis.
|
protected void |
initializeClass()
Initialize the class.
|
static void |
main(java.lang.String[] args)
test by running java ucar.unidata.view.geoloc.NavigatedDisplay
|
protected void |
pointerMoved(int x,
int y)
Handles a change in the position of the mouse-pointer.
|
void |
removeVerticalMap(visad.RealType vertType)
Remove a new mapping of this type to the vertical coordinate
|
void |
setDisplayAspect(double[] aspect)
Override super method
|
void |
setGridLinesVisible(boolean on)
Set the visibility of the axis grid lines.
|
void |
setHorizontalRangeUnit(visad.Unit newUnit)
Set the Unit of the horizontal range
|
void |
setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
Set the map area to be displayed in the box.
|
void |
setMapProjection(visad.georef.MapProjection mapProjection)
Define the map projection using a MapProjection type CoordinateSystem.
|
void |
setMapRegion(visad.Gridded2DSet region)
Set the map region to be displayed.
|
void |
setMaxDataDistance(double distance)
Set the maximum distance away from the transect for
data to be displayed.
|
void |
setMaxDataDistance(visad.Real r)
Set the maximum distance away from the transect for
data to be displayed.
|
void |
setPerspectiveView(boolean perspective)
Set the view to perspective or parallel if this is a 3D display.
|
void |
setPressureLabels(java.lang.String[] labels)
Set the labels for the pressure axis
|
void |
setScaleFont(java.awt.Font f)
Set the fonts for the axis scales
|
void |
setTransect(visad.Gridded2DSet newLine)
Set the transect for this display
|
void |
setVerticalRange(double min,
double max)
Set the range of the vertical coordinate
|
void |
setVerticalRangeUnit(visad.Unit newUnit)
Set the Unit of the vertical range
|
void |
setView(int view)
Set the view for 3D.
|
animateMatrix, animateMatrix, animateMatrix, animateMatrix, applyRotation, center, center, center, center, centerAndZoom, centerAndZoom, destroy, enableRubberBanding, getAnimationStringOn, getAutoRotate, getBottomViewName, getBoxVisible, getCenterPoint, getClipDistanceBack, getClipDistanceFront, getCursorAltitude, getCursorLatitude, getCursorLongitude, getDisplayMode, getEarthLocation, getEarthLocation, getEarthLocation, getEastViewName, getIsAnimating, getLatLonBox, getLatLonBox, getLatLonRect, getNavigationToolBar, getNavigationToolBar, getNorthViewName, getRay, getRayDirection, getRayPositionAtZ, getRotation, getRubberBandBox, getScaledValue, getScreenCenter, getScreenCenterBottom, getScreenCenterLeft, getScreenCenterRight, getScreenCenterTop, getScreenCoordinates, getScreenCoordinates, getScreenLowerLeft, getScreenLowerRight, getScreenSidesCoordinates, getScreenUpperLeft, getScreenUpperRight, getSouthViewName, getSpatialCoordinates, getSpatialCoordinatesFromScreen, getSpatialCoordinatesFromScreen, getTopViewName, getVerticalRangeUnit, getVerticalRangeVisible, getView, getVisadBox, getWestViewName, init, isClippingEnabled, isPerspectiveView, moveToScreen, moveToScreen, moveToScreen, resetClipDistance, resetScaleTranslate, rotateFaster, rotateSlower, rotateView, rotateView, screenToEarthLocation, setAnimationStringOn, setAutoRotate, setBoxVisible, setClipDistanceBack, setClipDistanceFront, setCursorAltitude, setCursorLatitude, setCursorLongitude, setCursorStringOn, setForeground, setMapProjection, setPolygonOffset, setPolygonOffsetFactor, setRotateDelay, setRotationMultiplierMatrix, setRubberBandBox, setScalesVisible, setVerticalMapUnit, setVerticalRangeVisible, setView, updateLocation
addDisplayable, addDisplayListener, addPropertyChangeListener, addPropertyChangeListener, addScalarMap, addScalarMaps, addVetoableChangeListener, addVetoableChangeListener, buildAnimationSet, dataChange, draw, ensureInactive, equals, finalize, firePropertyChange, firePropertyChange, getAnimationSetFromDisplayables, getAnimationStringVisible, getBackground, getComponent, getDestroyed, getDisplay, getDisplayableCount, getDisplayables, getDisplayables, getDisplayAspect, getDisplayComponent, getDisplayScale, getForeground, getImage, getMouseBehavior, getMouseFunctionMap, getOffscreenDimension, getProjectionMatrix, getSavedProjectionMatrix, getScale, getScreenBounds, getWaitMessageVisible, handleMouseWheelMoved, hashCode, indexOf, init, is3D, isActive, isPointMode, printMatrix, printMe, rebuild, rebuildDisplay, reDisplayAll, removeDisplayable, removeDisplayables, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, removeScalarMaps, removeVetoableChangeListener, removeVetoableChangeListener, replaceScalarMap, reScale, resetMouseFunctions, resetProjection, rotate, rotateX, rotateY, rotateZ, saveCurrentDisplay, saveCurrentDisplay, saveCurrentDisplay, saveProjection, setActive, setAnimation, setAnimationStringVisible, setBackground, setDefaultMouseFunctions, setDisplayables, setDisplayables, setDisplayActive, setDisplayInactive, setEyePosition, setKeyboardBehavior, setKeyboardEventMap, setKeyboardEventMap, setMouseFunctions, setOffscreenDimension, setPointMode, setProjectionMatrix, setRebuildNecessary, setWaitMessageVisible, setWheelEventMap, translate, zoom, zoom
public static final float DEFAULT_Z
public static java.lang.String[] DEFAULT_PRESSURE_LABELS
public TransectDisplay() throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectpublic TransectDisplay(visad.Gridded2DSet line) throws visad.VisADException, java.rmi.RemoteException
line
- the lat/lon transect linevisad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectpublic TransectDisplay(visad.Gridded2DSet line, boolean offscreen, java.awt.Dimension dimension) throws visad.VisADException, java.rmi.RemoteException
line
- the lat/lon transect lineoffscreen
- true if offscreendimension
- Dimension of the screenvisad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectprotected void initializeClass() throws visad.VisADException, java.rmi.RemoteException
initializeClass
in class NavigatedDisplay
java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic visad.georef.EarthLocation[] getScaleEndPoints()
public void addKeyboardBehavior(visad.KeyboardBehavior behavior)
addKeyboardBehavior
in class DisplayMaster
behavior
- behavior to addpublic void displayChanged(visad.DisplayEvent event) throws visad.VisADException, java.rmi.RemoteException
displayChanged
in interface visad.DisplayListener
event
- event to handlejava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void controlChanged(visad.ControlEvent ce)
controlChanged
in interface visad.ControlListener
ce
- ControlEventprotected void cursorMoved() throws visad.VisADException, java.rmi.RemoteException
cursorMoved
in class NavigatedDisplay
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected void pointerMoved(int x, int y) throws visad.UnitException, visad.VisADException, java.rmi.RemoteException
pointerMoved
in class NavigatedDisplay
x
- x mouse positiony
- y mouse positionjava.rmi.RemoteException
- Java RMI problemvisad.UnitException
- Unit conversion problemvisad.VisADException
- VisAD problempublic void addVerticalMap(visad.RealType newVertType) throws visad.VisADException, java.rmi.RemoteException
addVerticalMap
in class NavigatedDisplay
newVertType
- RealType of mapjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void removeVerticalMap(visad.RealType vertType) throws visad.VisADException, java.rmi.RemoteException
removeVerticalMap
in class NavigatedDisplay
vertType
- RealType of mapjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void setVerticalRangeUnit(visad.Unit newUnit) throws visad.VisADException, java.rmi.RemoteException
setVerticalRangeUnit
in class NavigatedDisplay
newUnit
- unit of rangejava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void setVerticalRange(double min, double max) throws visad.VisADException, java.rmi.RemoteException
setVerticalRange
in class NavigatedDisplay
min
- minimum value for vertical axismax
- maximum value for vertical axisjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic double[] getVerticalRange()
getVerticalRange
in class NavigatedDisplay
public void setHorizontalRangeUnit(visad.Unit newUnit) throws visad.VisADException, java.rmi.RemoteException
newUnit
- unit of rangejava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic visad.Unit getHorizontalRangeUnit()
public void setMaxDataDistance(visad.Real r) throws visad.VisADException
r
- value of distancevisad.VisADException
- incompatible unitpublic void setMaxDataDistance(double distance) throws visad.VisADException
distance
- distance in horizontal range unitsvisad.VisADException
- unable to create the VisAD object or
incompatible units.public visad.Real getMaxDataDistance()
public void setGridLinesVisible(boolean on) throws visad.VisADException, java.rmi.RemoteException
on
- true if the grid lines should be visiblevisad.VisADException
- Couldn't create the necessary VisAD objectjava.rmi.RemoteException
- If there was a problem making this
change in a remote collaborative display.public boolean getScalesVisible()
getScalesVisible
in class NavigatedDisplay
public void setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea) throws visad.VisADException, java.rmi.RemoteException
setMapArea
in class NavigatedDisplay
mapArea
- ProjectionRect describing the map area to be displayedvisad.VisADException
- invalid navigation or VisAD errorjava.rmi.RemoteException
- Couldn't create a remote objectpublic void setMapRegion(visad.Gridded2DSet region) throws visad.VisADException, java.rmi.RemoteException
region
- Gridded2DSet containing the range of for the axis.visad.VisADException
- invalid domain or null setjava.rmi.RemoteException
- Couldn't create a remote objectpublic void setMapProjection(visad.georef.MapProjection mapProjection) throws visad.VisADException, java.rmi.RemoteException
setMapProjection
in class NavigatedDisplay
mapProjection
- map projection coordinate systemvisad.VisADException
- Unable to set projectionjava.rmi.RemoteException
- Couldn't create a remote objectpublic visad.DisplayRealType getDisplayLatitudeType()
getDisplayLatitudeType
in class NavigatedDisplay
public visad.DisplayRealType getDisplayLongitudeType()
getDisplayLongitudeType
in class NavigatedDisplay
public visad.DisplayRealType getDisplayAltitudeType()
getDisplayAltitudeType
in class NavigatedDisplay
public visad.DisplayTupleType getDisplayTupleType()
protected visad.ScalarMap getAltitudeMap()
getAltitudeMap
in class NavigatedDisplay
protected visad.Gridded2DSet getTransect()
public void setTransect(visad.Gridded2DSet newLine) throws visad.VisADException, java.rmi.RemoteException
newLine
- the transect as a rectanglevisad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected void cursorChange() throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.public void setView(int view)
NORTH _________ W | | E E | TOP | A S | MOTTOB| S T |_______| T SOUTH
setView
in class NavigatedDisplay
view
- one of the static view fields (NORTH_VIEW, SOUTH_VIEW, ..
etc). In this display, NORTH is the Western Hemisphere,
SOUTH is the Eastern Hemisphere, EAST is the Pacific
region and WEST is the Atlantic Regionpublic void enableClipping(boolean clip)
enableClipping
in class NavigatedDisplay
clip
- true to turn clipping on, otherwise offpublic double[][] getXAxisEndPoints()
public double[][] getYAxisEndPoints()
public void setDisplayAspect(double[] aspect) throws visad.VisADException, java.rmi.RemoteException
setDisplayAspect
in class DisplayMaster
aspect
- the new aspectjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void setPerspectiveView(boolean perspective)
setPerspectiveView
in class NavigatedDisplay
perspective
- true for perspective viewpublic visad.georef.EarthLocation getEarthLocation(double x, double y, double z, boolean setZToZeroIfOverhead)
getEarthLocation
in class NavigatedDisplay
x
- xy
- yz
- zsetZToZeroIfOverhead
- If in the overhead view then set Z to 0public visad.RealTuple getSpatialCoordinates(visad.georef.EarthLocation el)
getSpatialCoordinates
in class NavigatedDisplay
el
- earth location to transformpublic double[] getSpatialCoordinates(visad.georef.EarthLocation el, double[] xyz, double altitude) throws visad.VisADException, java.rmi.RemoteException
getSpatialCoordinates
in class NavigatedDisplay
el
- earth location to transformxyz
- The in value to set. May be null.altitude
- _more_java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic boolean getStereoAvailable()
getStereoAvailable
in class DisplayMaster
public visad.CoordinateSystem getDisplayCoordinateSystem()
getDisplayCoordinateSystem
in class NavigatedDisplay
public void setScaleFont(java.awt.Font f)
f
- Font to usepublic void extendTransect(double amount)
amount
- (%) to extend or contract > 1 to expand, < 1 to contractpublic void extendVerticalRange(double amount)
amount
- (%) to extend or contract > 1 to expand, < 1 to contractpublic void setPressureLabels(java.lang.String[] labels) throws visad.VisADException
labels
- array of labelsvisad.VisADException
- unable to set the labels on the Axispublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- not usedjava.lang.Exception
- problem creating the display