|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.display.DisplayMaster
ucar.unidata.view.geoloc.NavigatedDisplay
ucar.unidata.view.geoloc.TransectDisplay
public class TransectDisplay
Provides a navigated globe for displaying meteorological data. Any displayable data must be able to map to RealType.Latitude, RealType.Longitude and/or RealType.Altitude.
| Nested Class Summary | |
|---|---|
protected class |
TransectDisplay.TransectCoordinateSystem
Class for converting from lat/lon/alt to xyz |
| Nested classes/interfaces inherited from class ucar.unidata.view.geoloc.NavigatedDisplay |
|---|
NavigatedDisplay.VerticalMapSet |
| Field Summary | |
|---|---|
static String[] |
DEFAULT_PRESSURE_LABELS
default pressure labels |
static float |
DEFAULT_Z
default z value |
| Fields inherited from class ucar.unidata.view.geoloc.NavigatedDisplay |
|---|
BOTTOM_VIEW, BOTTOM_VIEW_NAME, CURSOR_ALTITUDE, CURSOR_LATITUDE, CURSOR_LONGITUDE, 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 |
| Fields inherited from class ucar.visad.display.DisplayMaster |
|---|
behavior, defaultMouseFunctions, log_, POINT_MODE |
| Constructor Summary | |
|---|---|
TransectDisplay()
Constructs a new TransectDisplay to display data as an XY plot along a lat/lon transect. |
|
TransectDisplay(Gridded2DSet line)
Constructs a new TransectDisplay to display data as an XY plot along a lat/lon transect. |
|
TransectDisplay(Gridded2DSet line,
boolean offscreen,
Dimension dimension)
Constructs a new TransectDisplay to display data as an XY plot along a lat/lon transect. |
|
| Method Summary | |
|---|---|
void |
addKeyboardBehavior(KeyboardBehavior behavior)
Add a keyboard behavior for this display |
void |
addVerticalMap(RealType newVertType)
Add a new mapping of this type to the vertical coordinate |
void |
controlChanged(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(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 ScalarMap |
getAltitudeMap()
Accessor method for the ScalarMap for Altitude |
DisplayRealType |
getDisplayAltitudeType()
Accessor method for the DisplayAltitudeType |
CoordinateSystem |
getDisplayCoordinateSystem()
Get the display coordinate system that turns lat/lon/alt to x/y/z |
DisplayRealType |
getDisplayLatitudeType()
Accessor method for the DisplayLatitudeType |
DisplayRealType |
getDisplayLongitudeType()
Accessor method for the DisplayLongitudeType |
DisplayTupleType |
getDisplayTupleType()
Accessor method for the DisplayTupleType. |
EarthLocation |
getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
Get the earth location from the VisAD xyz coodinates |
Unit |
getHorizontalRangeUnit()
Get the Unit of the horizontal range |
Real |
getMaxDataDistance()
Set the maximum distance away from the transect for data to be displayed. |
EarthLocation[] |
getScaleEndPoints()
Get the scale end points |
boolean |
getScalesVisible()
Get the box visibility. |
RealTuple |
getSpatialCoordinates(EarthLocation el)
Returns the spatial (XYZ) coordinates of the particular EarthLocation |
double[] |
getSpatialCoordinates(EarthLocation el,
double[] xyz)
Returns the spatial (XYZ) coordinates of the particular EarthLocation |
boolean |
getStereoAvailable()
Determine if this MapDisplay can do stereo. |
protected 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(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(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(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(MapProjection mapProjection)
Define the map projection using a MapProjection type CoordinateSystem. |
void |
setMapRegion(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(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(String[] labels)
Set the labels for the pressure axis |
void |
setScaleFont(Font f)
Set the fonts for the axis scales |
void |
setTransect(Gridded2DSet newLine)
Set the transect for this display |
void |
setVerticalRange(double min,
double max)
Set the range of the vertical coordinate |
void |
setVerticalRangeUnit(Unit newUnit)
Set the Unit of the vertical range |
void |
setView(int view)
Set the view for 3D. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float DEFAULT_Z
public static String[] DEFAULT_PRESSURE_LABELS
| Constructor Detail |
|---|
public TransectDisplay()
throws VisADException,
RemoteException
VisADException - Couldn't create necessary VisAD object
RemoteException - Couldn't create a remote object
public TransectDisplay(Gridded2DSet line)
throws VisADException,
RemoteException
line - the lat/lon transect line
VisADException - Couldn't create necessary VisAD object
RemoteException - Couldn't create a remote object
public TransectDisplay(Gridded2DSet line,
boolean offscreen,
Dimension dimension)
throws VisADException,
RemoteException
line - the lat/lon transect lineoffscreen - true if offscreendimension - Dimension of the screen
VisADException - Couldn't create necessary VisAD object
RemoteException - Couldn't create a remote object| Method Detail |
|---|
protected void initializeClass()
throws VisADException,
RemoteException
initializeClass in class NavigatedDisplayRemoteException - Java RMI problem
VisADException - VisAD problempublic EarthLocation[] getScaleEndPoints()
public void addKeyboardBehavior(KeyboardBehavior behavior)
addKeyboardBehavior in class DisplayMasterbehavior - behavior to add
public void displayChanged(DisplayEvent event)
throws VisADException,
RemoteException
displayChanged in interface DisplayListenerevent - event to handle
RemoteException - Java RMI problem
VisADException - VisAD problempublic void controlChanged(ControlEvent ce)
controlChanged in interface ControlListenerce - ControlEvent
protected void cursorMoved()
throws VisADException,
RemoteException
cursorMoved in class NavigatedDisplayVisADException - VisAD failure.
RemoteException - Java RMI failure.
protected void pointerMoved(int x,
int y)
throws UnitException,
VisADException,
RemoteException
pointerMoved in class NavigatedDisplayx - x mouse positiony - y mouse position
RemoteException - Java RMI problem
UnitException - Unit conversion problem
VisADException - VisAD problem
public void addVerticalMap(RealType newVertType)
throws VisADException,
RemoteException
addVerticalMap in class NavigatedDisplaynewVertType - RealType of map
RemoteException - Java RMI problem
VisADException - VisAD problem
public void removeVerticalMap(RealType vertType)
throws VisADException,
RemoteException
removeVerticalMap in class NavigatedDisplayvertType - RealType of map
RemoteException - Java RMI problem
VisADException - VisAD problem
public void setVerticalRangeUnit(Unit newUnit)
throws VisADException,
RemoteException
setVerticalRangeUnit in class NavigatedDisplaynewUnit - unit of range
RemoteException - Java RMI problem
VisADException - VisAD problem
public void setVerticalRange(double min,
double max)
throws VisADException,
RemoteException
setVerticalRange in class NavigatedDisplaymin - minimum value for vertical axismax - maximum value for vertical axis
RemoteException - Java RMI problem
VisADException - VisAD problempublic double[] getVerticalRange()
getVerticalRange in class NavigatedDisplay
public void setHorizontalRangeUnit(Unit newUnit)
throws VisADException,
RemoteException
newUnit - unit of range
RemoteException - Java RMI problem
VisADException - VisAD problempublic Unit getHorizontalRangeUnit()
public void setMaxDataDistance(Real r)
throws VisADException
r - value of distance
VisADException - incompatible unit
public void setMaxDataDistance(double distance)
throws VisADException
distance - distance in horizontal range units
VisADException - unable to create the VisAD object or
incompatible units.public Real getMaxDataDistance()
public void setGridLinesVisible(boolean on)
throws VisADException,
RemoteException
on - true if the grid lines should be visible
VisADException - Couldn't create the necessary VisAD object
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 VisADException,
RemoteException
setMapArea in class NavigatedDisplaymapArea - ProjectionRect describing the map area to be displayed
VisADException - invalid navigation or VisAD error
RemoteException - Couldn't create a remote object
public void setMapRegion(Gridded2DSet region)
throws VisADException,
RemoteException
region - Gridded2DSet containing the range of for the axis.
VisADException - invalid domain or null set
RemoteException - Couldn't create a remote object
public void setMapProjection(MapProjection mapProjection)
throws VisADException,
RemoteException
setMapProjection in class NavigatedDisplaymapProjection - map projection coordinate system
VisADException - Unable to set projection
RemoteException - Couldn't create a remote objectpublic DisplayRealType getDisplayLatitudeType()
getDisplayLatitudeType in class NavigatedDisplaypublic DisplayRealType getDisplayLongitudeType()
getDisplayLongitudeType in class NavigatedDisplaypublic DisplayRealType getDisplayAltitudeType()
getDisplayAltitudeType in class NavigatedDisplaypublic DisplayTupleType getDisplayTupleType()
protected ScalarMap getAltitudeMap()
getAltitudeMap in class NavigatedDisplayprotected Gridded2DSet getTransect()
public void setTransect(Gridded2DSet newLine)
throws VisADException,
RemoteException
newLine - the transect as a rectangle
VisADException - VisAD failure.
RemoteException - Java RMI failure.
protected void cursorChange()
throws VisADException,
RemoteException
VisADException - VisAD failure.
RemoteException - Java RMI failure.public void setView(int view)
NORTH
_________
W | | E
E | TOP | A
S | MOTTOB| S
T |_______| T
SOUTH
setView in class NavigatedDisplayview - 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 NavigatedDisplayclip - true to turn clipping on, otherwise offpublic double[][] getXAxisEndPoints()
public double[][] getYAxisEndPoints()
public void setDisplayAspect(double[] aspect)
throws VisADException,
RemoteException
setDisplayAspect in class DisplayMasteraspect - the new aspect
RemoteException - Java RMI problem
VisADException - VisAD problempublic void setPerspectiveView(boolean perspective)
setPerspectiveView in class NavigatedDisplayperspective - true for perspective view
public EarthLocation getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
getEarthLocation in class NavigatedDisplayx - xy - yz - zsetZToZeroIfOverhead - If in the overhead view then set Z to 0
public RealTuple getSpatialCoordinates(EarthLocation el)
getSpatialCoordinates in class NavigatedDisplayel - earth location to transform
public double[] getSpatialCoordinates(EarthLocation el,
double[] xyz)
throws VisADException,
RemoteException
getSpatialCoordinates in class NavigatedDisplayel - earth location to transformxyz - The in value to set. May be null.
RemoteException - Java RMI problem
VisADException - VisAD problempublic boolean getStereoAvailable()
getStereoAvailable in class DisplayMasterpublic CoordinateSystem getDisplayCoordinateSystem()
getDisplayCoordinateSystem in class NavigatedDisplaypublic void setScaleFont(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 contract
public void setPressureLabels(String[] labels)
throws VisADException
labels - array of labels
VisADException - unable to set the labels on the Axis
public static void main(String[] args)
throws Exception
args - not used
Exception - problem creating the display
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||