|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
ilog.views.maps.beans.IlvJCoordinateViewer
public class IlvJCoordinateViewer
This class defines a Swing text field 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
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 javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| 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 javax.swing.JLabel |
|---|
labelFor |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IlvJCoordinateViewer()
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. |
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 geographic coordinates. |
String |
getNorthingLabel()
Returns the prompt string to be displayed before the northing value of the mouse coordinates. |
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 |
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 |
setText(String str)
This method has been overridden in order to handle vertical orientation. |
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 IlvJCoordinateViewer()
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 geographic 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.CARTESIAN_MODE,
DMS_MODEpublic int getMode()
public void setGeographicCoordinateSystem(IlvGeographicCoordinateSystem gcs)
gcs - The geographic coordinate system.public IlvGeographicCoordinateSystem getGeographicCoordinateSystem()
IlvGeographicCoordinateSystem.KERNEL.
setGeographicCoordinateSystem(ilog.views.maps.srs.coordsys.IlvGeographicCoordinateSystem)public void setView(IlvManagerView view)
public IlvManagerView getView()
IlvManagerView view that controls the coordinate viewer.
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 setText(String str)
str String passed
as argument is transformed into an HTML text to show the text
on two lines.
setText in class JLabel
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||