public class IlvCoordinateViewer extends Component
IlvManagerView
displaying a map.
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 FormComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
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.
|
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvCoordinateViewer()
Creates a new coordinate viewer.
|
Modifier and Type | Method and Description |
---|---|
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.
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
public static final int CARTESIAN_MODE
public static final int DMS_MODE
public IlvCoordinateViewer()
IlvManagerView
view.setView(ilog.views.IlvManagerView)
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_MODE
public int getMode()
public void setView(IlvManagerView view)
public IlvManagerView getView()
IlvManagerView
view that controls the coordinate viewer.public Dimension getPreferredSize()
getPreferredSize
in class Component
public Dimension getMinimumSize()
getMinimumSize
in class Component
public void setGeographicCoordinateSystem(IlvGeographicCoordinateSystem gcs)
gcs
- The geographic coordinate system.public IlvGeographicCoordinateSystem getGeographicCoordinateSystem()
IlvGeographicCoordinateSystem.KERNEL
.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)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.