public class IlvJCoordinateViewer extends JLabel
IlvManagerView
displaying a map.
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.
JLabel.AccessibleJLabel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.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.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvJCoordinateViewer()
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.
|
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.
|
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int CARTESIAN_MODE
public static final int DMS_MODE
public IlvJCoordinateViewer()
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 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_MODE
public 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.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.