|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
ilog.views.maps.beans.IlvCoordinateViewer
public class IlvCoordinateViewer
This class defines an AWT Component that can display
the coordinates of the mouse when it is on top of an IlvManagerView
displaying a map.
The coordinates can be displayed in two modes:
CARTESIAN_MODE: The coordinates are displayed in the
projection coordinate system of the manager.
DMS_MODE: The coordinates are displayed in degrees,
minutes and seconds as in a geographic coordinate system. This mode works only
if the manager of the view that controls the coordinate viewer has an
IlvCoordinateSystemProperty. The coordinate viewer will then
use this property to convert the mouse coordinates in the geographic
coordinate system, if the conversion is possible.
IlvProjectionProperty. As of JViews 5.0,
IlvCoordinateSystemProperty must be used, and this class
continues to work with an IlvProjectionProperty. This
compatibility will be removed in the next version.
IlvProjectionProperty,
IlvCoordinateSystemProperty,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
CARTESIAN_MODE
The mode used to display the mouse coordinates in the manager coordinate system. |
static int |
DMS_MODE
The mode used to display the mouse coordinates in degrees, minutes and seconds. |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IlvCoordinateViewer()
Creates a new coordinate viewer. |
|
| Method Summary | |
|---|---|
String |
getEastingLabel()
Returns the prompt string to be displayed before the easting value of the mouse coordinates. |
IlvGeographicCoordinateSystem |
getGeographicCoordinateSystem()
Returns the geographic coordinate system used by this coordinate viewer. |
Dimension |
getMinimumSize()
Returns the minimum size of the component. |
int |
getMode()
Returns the display mode of the mouse coordinates. |
String |
getNoProjectionMessage()
Returns the message to be displayed if the coordinate viewer is used in DMS mode on a manager that has no IlvCoordinateSystem that can be
converted to georeferenced coordinates. |
String |
getNorthingLabel()
Returns the prompt string to be displayed before the northing value of the mouse coordinates. |
Dimension |
getPreferredSize()
Returns the preferred size of the component. |
IlvManagerView |
getView()
Returns the IlvManagerView view that controls the coordinate viewer. |
boolean |
isDisplayEasting()
Returns true if this coordinate viewer displays the easting value of the mouse coordinates. |
boolean |
isDisplayNorthing()
Returns true if this coordinate viewer displays the northing value of the mouse coordinates. |
boolean |
isVertical()
Returns the orientation of the display. |
void |
paint(Graphics g)
Draws the component. |
void |
setDisplayEasting(boolean displayEasting)
Specifies whether the coordinate viewer should display the easting value of the mouse coordinates. |
void |
setDisplayNorthing(boolean displayNorthing)
Specifies whether the coordinate viewer should display the northing value of the mouse coordinates. |
void |
setEastingLabel(String label)
Sets the prompt string to be displayed before the easting value of the mouse coordinates. |
void |
setGeographicCoordinateSystem(IlvGeographicCoordinateSystem gcs)
Sets a geographic coordinate system on the coordinate viewer. |
void |
setMode(int mode)
Specifies the display mode of the mouse coordinates. |
void |
setNoProjectionMessage(String message)
Sets the message to be displayed if the coordinate viewer is used in DMS mode on a manager that has no IlvCoordinateSystem that can be
converted to georeferenced coordinates. |
void |
setNorthingLabel(String label)
Sets the prompt string to be displayed before the northing value of the mouse coordinates. |
void |
setVertical(boolean vertical)
Sets the orientation of the display. |
void |
setView(IlvManagerView view)
Sets the view for which coordinates are to be displayed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CARTESIAN_MODE
public static final int DMS_MODE
| Constructor Detail |
|---|
public IlvCoordinateViewer()
IlvManagerView view.
setView(ilog.views.IlvManagerView)| Method Detail |
|---|
public void setNoProjectionMessage(String message)
IlvCoordinateSystem that can be
converted to georeferenced coordinates.
message - The message to be displayed.public String getNoProjectionMessage()
IlvCoordinateSystem that can be
converted to georeferenced coordinates.
public void setEastingLabel(String label)
"X = ".
label - The easting label.public String getEastingLabel()
public void setNorthingLabel(String label)
"Y = ".
label - The northing label.public String getNorthingLabel()
public void setDisplayEasting(boolean displayEasting)
displayEasting - If true, easting is displayed.public boolean isDisplayEasting()
true if this coordinate viewer displays the easting value of the mouse coordinates.
public void setDisplayNorthing(boolean displayNorthing)
displayNorthing - If true, northing is displayed.public boolean isDisplayNorthing()
true if this coordinate viewer displays the northing value of the mouse coordinates.
public void setMode(int mode)
mode - The display mode.IlvJCoordinateViewer.CARTESIAN_MODE,
IlvJCoordinateViewer.DMS_MODEpublic int getMode()
public void setView(IlvManagerView view)
public IlvManagerView getView()
IlvManagerView view that controls the coordinate viewer.
public Dimension getPreferredSize()
getPreferredSize in class Componentpublic Dimension getMinimumSize()
getMinimumSize in class Componentpublic void setGeographicCoordinateSystem(IlvGeographicCoordinateSystem gcs)
gcs - The geographic coordinate system.public IlvGeographicCoordinateSystem getGeographicCoordinateSystem()
IlvGeographicCoordinateSystem.KERNEL.
IlvJCoordinateViewer.setGeographicCoordinateSystem(ilog.views.maps.srs.coordsys.IlvGeographicCoordinateSystem)public void setVertical(boolean vertical)
vertical - If set to true the northing value is displayed
under the easting value. If set to false, the northing value is
displayed to the right of the easting value.public boolean isVertical()
setVertical(boolean)public void paint(Graphics g)
paint in class Component
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||