|
||||||||||
| 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
public abstract class NavigatedDisplay
Provides support for a navigated VisAD DisplayImplJ3D for meteorological data.
Any displayable data must be able to map to RealType.Latitude, RealType.Longitude and/or RealType.Altitude.
| Nested Class Summary | |
|---|---|
protected class |
NavigatedDisplay.VerticalMapSet
A specialized ScalarMapSet for the set of Vertical maps |
| Field Summary | |
|---|---|
static int |
BOTTOM_VIEW
Bottom View |
static String |
BOTTOM_VIEW_NAME
Bottom View name |
static String |
CURSOR_ALTITUDE
The name of the altitude property. |
static String |
CURSOR_LATITUDE
The name of the latitude property. |
static String |
CURSOR_LONGITUDE
The name of the longitude property. |
static int |
EAST_VIEW
East View |
static String |
EAST_VIEW_NAME
East View name |
static int |
MODE_2D
Field for a 2D mode in Java2D |
static int |
MODE_2Din3D
Field for a 2D mode in Java3D |
static int |
MODE_3D
Field for a 3D mode |
static int |
NORTH_VIEW
North View |
static String |
NORTH_VIEW_NAME
North View name |
static int |
SOUTH_VIEW
South View |
static String |
SOUTH_VIEW_NAME
South View name |
static int |
TOP_VIEW
Top View |
static String |
TOP_VIEW_NAME
Top View name |
static int |
WEST_VIEW
West View |
static String |
WEST_VIEW_NAME
West View name |
| Fields inherited from class ucar.visad.display.DisplayMaster |
|---|
behavior, defaultMouseFunctions, log_, POINT_MODE |
| Constructor Summary | |
|---|---|
protected |
NavigatedDisplay()
Default Constructor |
protected |
NavigatedDisplay(DisplayImpl display)
Construct a NavigatedDisplay with the specified VisAD display |
| Method Summary | |
|---|---|
void |
addVerticalMap(RealType verticalType)
Method to add a new ScalarMap to the vertical coordinate (i.e., getDisplayAltitudeType is mapped to).. |
void |
animateMatrix(int myTimeStamp,
double[] from,
double[] to,
EarthLocation finalLocation)
Animate the matrix changes. |
void |
center(double x,
double y)
Center to x y |
void |
center(double x,
double y,
boolean animated)
Center to x y |
void |
center(EarthLocation el)
Move the center to the given earth location |
void |
center(EarthLocation el,
boolean animated)
Move the center to the given earth location |
void |
centerAndZoom(EarthLocation el,
boolean animated,
double zoomFactor)
Move the center to the given earth location and zoom in |
void |
centerAndZoomTo(EarthLocation el,
Real altitude,
boolean animated)
Center and zoom to |
protected void |
cursorMoved()
Does nothing when the cursor changes. |
void |
enableClipping(boolean clip)
Enable clipping of data at the box edges. |
void |
enableRubberBanding(boolean on)
Toggle the use of RubberBandBoxing. |
void |
flythrough(float[][] pts)
tmp |
protected abstract ScalarMap |
getAltitudeMap()
Accessor method for the altitude ScalarMap (i.e., (RealType.Altitude -> getDisplayAltitudeType). |
boolean |
getAnimationStringOn()
Deprecated. use #getAnimationStringVisible() |
boolean |
getAutoRotate()
Get the autorotation. |
String |
getBottomViewName()
Accessor method. |
boolean |
getBoxVisible()
Get the box visibility. |
EarthLocation |
getCenterPoint()
Get the center lat/lon/alt of the projection. |
Real |
getCursorAltitude()
Gets the cursor altitude property. |
Real |
getCursorLatitude()
Gets the cursor latitude property. |
Real |
getCursorLongitude()
Gets the cursor longitude property. |
abstract DisplayRealType |
getDisplayAltitudeType()
Accessor method for the DisplayAltitudeType (i.e., what RealType.Altitude is mapped to).. |
CoordinateSystem |
getDisplayCoordinateSystem()
Get the display coordinate system that turns lat/lon/alt to x/y/z |
abstract DisplayRealType |
getDisplayLatitudeType()
Accessor method for the DisplayLatitudeType (i.e., what RealType.Latitude is mapped to).. |
abstract DisplayRealType |
getDisplayLongitudeType()
Accessor method for the DisplayLongitudeType (i.e., what RealType.Longitude is mapped to).. |
int |
getDisplayMode()
See if this is a 2D or 3D display. |
EarthLocation |
getEarthLocation(double[] xyz)
Get the EarthLocation of a point in XYZ space |
EarthLocation |
getEarthLocation(double x,
double y,
double z)
Get the EarthLocation of a point in XYZ space |
abstract EarthLocation |
getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
Get the EarthLocation of a point in XYZ space |
EarthLocation |
getEarthLocation(RealTuple xyz)
Get the EarthLocation of a point in XYZ space |
String |
getEastViewName()
Accessor method. |
boolean |
getIsAnimating()
See if this display is animating. |
Rectangle2D.Double |
getLatLonBox()
Get the latlon box of the displayed area |
ucar.unidata.geoloc.LatLonRect |
getLatLonRect()
Get the latlon box of the displayed area |
NavigatedDisplayToolBar |
getNavigationToolBar()
Return a toolbar that can be used to move around in the display (zoom, pan, reset). |
String |
getNorthViewName()
Accessor method. |
VisADRay |
getRay(int screenX,
int screenY)
Convert the screen coordinates to the ray |
double[] |
getRayDirection(int screenX,
int screenY)
Convert the screen coordinates to the direction |
double[] |
getRayPositionAtZ(VisADRay ray,
double zValue)
Get the position of the ray at a particular Z value. |
RubberBandBox |
getRubberBandBox()
Retrieve the RubberBandBox being used in this component. |
protected float |
getScaledValue(ScalarMap map,
float value)
Return the real altitude from a ZAxis (or displayAltitudeType) value |
boolean |
getScalesVisible()
Get the box visibility. |
double[] |
getScreenCenter()
Get the x/y position of the center of the screen |
List<TwoFacedObject> |
getScreenCoordinates()
|
int[] |
getScreenCoordinates(double[] position)
Get the screen coordinates for the xyz location |
double[] |
getScreenLowerLeft()
Get the x/y position of the right/center of the screen |
double[] |
getScreenLowerRight()
Get the x/y position of the right/center of the screen |
double[] |
getScreenUpperLeft()
Get the x/y position of the left/center of the screen |
double[] |
getScreenUpperRight()
Get the x/y position of the right/center of the screen |
String |
getSouthViewName()
Accessor method. |
abstract RealTuple |
getSpatialCoordinates(EarthLocation el)
Returns the spatial (XYZ) coordinates of the particular EarthLocation |
abstract double[] |
getSpatialCoordinates(EarthLocation el,
double[] xyz)
Returns the spatial (XYZ) coordinates of the particular EarthLocation |
double[] |
getSpatialCoordinatesFromScreen(int screenX,
int screenY)
Convert the screen coordinates to visad coordinates at the given depth. |
double[] |
getSpatialCoordinatesFromScreen(int screenX,
int screenY,
double zDepth)
Convert the screen coordinates to visad coordinates. |
String |
getTopViewName()
Accessor method. |
double[] |
getVerticalRange()
Get the range of the vertical coordinate (Altitude) |
Unit |
getVerticalRangeUnit()
Get the Unit of the vertical range |
Rectangle2D.Double |
getVisadBox()
Get the visad box of the displayed area |
String |
getWestViewName()
Accessor method. |
protected void |
init(DisplayImpl display)
Construct a NavigatedDisplay with the specified VisAD display |
protected void |
initializeClass()
Set up the display. |
boolean |
isClippingEnabled()
Check to see if clipping is enabled.. |
boolean |
isPerspectiveView()
Get the view to perspective or parallel.. |
void |
moveToScreen(double x,
double y,
int sx,
int sy)
Move the x/y point to the x/y point of the the given screen coords |
void |
moveToScreen(double x,
double y,
int sx,
int sy,
boolean animated)
Move the x/y point to the x/y point of the the given screen coords |
void |
moveToScreen(double x,
double y,
int sx,
int sy,
int times)
Deprecated. dropped the times parameter. |
protected void |
pointerMoved(int x,
int y)
Does nothing when the pointer moves. |
void |
removeVerticalMap(RealType verticalType)
Method to remove a new ScalarMap to the vertical coordinate (i.e., getDisplayAltitudeType is mapped to).. |
void |
rotateView(double[] matrix,
double azimuth,
double decAngle)
Change point of view of a 3D display from the matrix supplied, using input angles (unit = degree): For example, a view from the southwest has azimuth of 225 and decAngle say 20 to 70 or so. |
void |
rotateView(double azimuth,
double decAngle)
Change point of view of a 3D VisAD display, using input angles (unit = degree): For example, a view from the southwest has azimuth of 225 and decAngle say 20 to 70 or so. |
void |
setAnimationStringOn(boolean visible)
Deprecated. use #setAnimationStringVisible(boolean) |
void |
setAutoRotate(boolean rotate)
Set the autorotation. |
void |
setBoxVisible(boolean on)
Set the visibility of a surrounding box. |
protected void |
setCursorAltitude(Real altitude)
Sets the cursor altitude property. |
protected void |
setCursorLatitude(Real latitude)
Sets the cursor latitude property. |
protected void |
setCursorLongitude(Real longitude)
Sets the cursor longitude property. |
void |
setCursorStringOn(boolean on)
Toggle the cursor display readout on/off. |
void |
setForeground(Color color)
Local implementation to set rubber band box color also |
void |
setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
Set the map area to be displayed in the box. |
abstract void |
setMapProjection(MapProjection mapProjection)
Define the map projection using a MapProjection type CoordinateSystem. |
void |
setMapProjection(ucar.unidata.geoloc.ProjectionImpl projection)
Define the map projection using a Projection interface |
void |
setPerspectiveView(boolean perspective)
Set the view to perspective or parallel if this is a 3D display.. |
void |
setRotateDelay(long millis)
Set the rotation delay |
protected void |
setRubberBandBox(RubberBandBox box)
Set the RubberBandBox being used in this component. |
void |
setScalesVisible(boolean on)
Set the visibility of the axis scales. |
protected void |
setVerticalMapUnit(ScalarMap vertMap,
Unit u)
Set the vertical map unit |
void |
setVerticalRange(double min,
double max)
Set the range of the vertical coordinate |
void |
setVerticalRangeUnit(Unit newUnit)
Set the Unit of the vertical range |
abstract void |
setView(int view)
Set the view for 3D. |
protected void |
updateLocation(EarthLocation el)
Update lat/lon/alt properties with the EarthLocation. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CURSOR_LATITUDE
public static final String CURSOR_LONGITUDE
public static final String CURSOR_ALTITUDE
public static final int MODE_3D
public static final int MODE_2D
public static final int MODE_2Din3D
public static final int BOTTOM_VIEW
public static String BOTTOM_VIEW_NAME
public static final int NORTH_VIEW
public static String NORTH_VIEW_NAME
public static final int EAST_VIEW
public static String EAST_VIEW_NAME
public static final int TOP_VIEW
public static String TOP_VIEW_NAME
public static final int SOUTH_VIEW
public static String SOUTH_VIEW_NAME
public static final int WEST_VIEW
public static String WEST_VIEW_NAME
| Constructor Detail |
|---|
protected NavigatedDisplay()
protected NavigatedDisplay(DisplayImpl display)
throws VisADException,
RemoteException
display - VisAD display for this NavigatedDisplay
VisADException - VisAD error
RemoteException - remote error| Method Detail |
|---|
protected void init(DisplayImpl display)
throws VisADException,
RemoteException
display - VisAD display for this NavigatedDisplay
VisADException - VisAD error
RemoteException - remote error
protected void initializeClass()
throws VisADException,
RemoteException
RemoteException - Java RMI problem
VisADException - Unable to create the displaypublic String getTopViewName()
public String getBottomViewName()
public String getNorthViewName()
public String getEastViewName()
public String getSouthViewName()
public String getWestViewName()
public double[] getSpatialCoordinatesFromScreen(int screenX,
int screenY)
screenX - Screen x coordinatescreenY - Screen y coordinate
public double[] getSpatialCoordinatesFromScreen(int screenX,
int screenY,
double zDepth)
screenX - Screen x coordinatescreenY - Screen y coordinatezDepth - depth in the zbox
public double[] getRayDirection(int screenX,
int screenY)
screenX - Screen x coordinatescreenY - Screen y coordinate
public VisADRay getRay(int screenX,
int screenY)
screenX - Screen x coordinatescreenY - Screen y coordinate
public int[] getScreenCoordinates(double[] position)
position - xyz location
public int getDisplayMode()
public void setCursorStringOn(boolean on)
on - true will display cursor position on the VisAD display
(might be useful for debugging).NavigatedDisplayCursorReadoutpublic void setAnimationStringOn(boolean visible)
visible - true to make it visiblepublic boolean getAnimationStringOn()
public abstract DisplayRealType getDisplayLatitudeType()
public abstract DisplayRealType getDisplayLongitudeType()
public abstract DisplayRealType getDisplayAltitudeType()
public void enableClipping(boolean clip)
clip - true to turn clipping on, otherwise offpublic boolean isClippingEnabled()
public void setMapProjection(ucar.unidata.geoloc.ProjectionImpl projection)
throws VisADException,
RemoteException
projection - Projection to use
VisADException - Couldn't create necessary VisAD object
RemoteException - Couldn't create a remote object
public abstract void setMapProjection(MapProjection mapProjection)
throws VisADException,
RemoteException
mapProjection - map projection coordinate system
VisADException - Couldn't create necessary VisAD object
RemoteException - Couldn't create a remote object
public void setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
throws VisADException,
RemoteException
mapArea - ProjectionRect describing the map area to be displayed.
VisADException - invalid navigation or VisAD error
RemoteException - Couldn't create a remote objectprotected abstract ScalarMap getAltitudeMap()
public void addVerticalMap(RealType verticalType)
throws VisADException,
RemoteException
verticalType - RealType of the new vertical map
RemoteException - Java RMI problem
VisADException - VisAD problem
public void removeVerticalMap(RealType verticalType)
throws VisADException,
RemoteException
verticalType - RealType of the new vertical map
RemoteException - Java RMI problem
VisADException - VisAD problempublic abstract void setView(int view)
view - one of the static view fields (NORTH_VIEW, SOUTH_VIEW, ..
etc).public void setPerspectiveView(boolean perspective)
perspective - true for perspective viewpublic boolean isPerspectiveView()
protected void setRubberBandBox(RubberBandBox box)
box - RubberBandBox to usepublic RubberBandBox getRubberBandBox()
public void enableRubberBanding(boolean on)
throws VisADException,
RemoteException
on - true to enable rubberbanding (on by default);
RemoteException - Java RMI problem
VisADException - unable to toggle the rubber banding function
public void setVerticalRangeUnit(Unit newUnit)
throws VisADException,
RemoteException
newUnit - unit of range
RemoteException - Java RMI problem
VisADException - VisAD problempublic Unit getVerticalRangeUnit()
public void setVerticalRange(double min,
double max)
throws VisADException,
RemoteException
min - minimum value for vertical axismax - maximum value for vertical axis
RemoteException - Java RMI problem
VisADException - Unable to create the displaypublic double[] getVerticalRange()
public void setForeground(Color color)
setForeground in class DisplayMastercolor - color for foreground
public void setBoxVisible(boolean on)
throws VisADException,
RemoteException
on - true if the box 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 getBoxVisible()
public void setScalesVisible(boolean on)
throws VisADException,
RemoteException
on - true if the box 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()
public EarthLocation getCenterPoint()
public EarthLocation getEarthLocation(RealTuple xyz)
xyz - RealTuple with MathType
RealTupleType.SpatialCartesian3DTuple)
public EarthLocation getEarthLocation(double[] xyz)
xyz - double[3] of x,y,z coords.
public EarthLocation getEarthLocation(double x,
double y,
double z)
x - x coord.y - y coord.z - z coord.
public abstract EarthLocation getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
x - x coord.y - y coord.z - z coord.setZToZeroIfOverhead - If in the overhead view then set Z to 0
public abstract RealTuple getSpatialCoordinates(EarthLocation el)
el - earth location to translate
public abstract double[] getSpatialCoordinates(EarthLocation el,
double[] xyz)
throws VisADException,
RemoteException
el - earth location to translatexyz - buffer to put value in
RemoteException - If there was a problem making this
change in a remote collaborative display.
VisADException - Couldn't create the necessary VisAD object
protected float getScaledValue(ScalarMap map,
float value)
map - map for scalingvalue - value to scale
protected void setCursorLatitude(Real latitude)
throws VisADException,
RemoteException
latitude - The cursor latitude.
RemoteException - Java RMI problem
VisADException - VisAD problempublic Real getCursorLatitude()
null.
protected void setCursorLongitude(Real longitude)
throws VisADException,
RemoteException
longitude - The cursor longitude.
RemoteException - Java RMI problem
VisADException - VisAD problempublic Real getCursorLongitude()
null.
protected void setCursorAltitude(Real altitude)
throws VisADException,
RemoteException
altitude - The cursor altitude.
RemoteException - Java RMI problem
VisADException - VisAD problempublic Real getCursorAltitude()
null.public boolean getIsAnimating()
public void animateMatrix(int myTimeStamp,
double[] from,
double[] to,
EarthLocation finalLocation)
myTimeStamp - So we only have one runningfrom - The original matrixto - The dest matrixfinalLocation - final location to animate to
public double[] getScreenCenter()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public List<TwoFacedObject> getScreenCoordinates()
throws VisADException,
RemoteException
VisADException
RemoteException
public double[] getScreenUpperLeft()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public double[] getScreenUpperRight()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public double[] getScreenLowerLeft()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public double[] getScreenLowerRight()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public Rectangle2D.Double getLatLonBox()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public ucar.unidata.geoloc.LatLonRect getLatLonRect()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public Rectangle2D.Double getVisadBox()
throws VisADException,
RemoteException
RemoteException - On badness
VisADException - On badness
public void center(double x,
double y)
x - Xy - Y
public void center(double x,
double y,
boolean animated)
x - Xy - Yanimated - Should animate the move
public void moveToScreen(double x,
double y,
int sx,
int sy,
int times)