Package com.luciad.view.map
Class TLcdMapGridRefLocation
java.lang.Object
java.awt.Component
com.luciad.view.map.TLcdMapGridRefLocation
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
This is a util class to get the geographical location
expressed in grid coordinates of some
ILcdGridReference
of
a (x,y) position on a map ILcdGXYView
.
The ILcdGXYView
must
have an ILcdGridReference
as XYWorldReference property.
This class can be used as MouseMotionListener
(mouseMoved),
MouseListener(mousePressed)
, or at will ( updateWithLocation(x,y)
).
The location is expressed in Easting (X) and Northing (Y) .- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields inherited from class java.awt.Component
accessibleContext, 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
-
Method Summary
Modifier and TypeMethodDescriptionint
The property of alignment determines whether to center, left or right align the location information.double
Returns the GXYview property.double
void
MouseEvent
me is ignored.void
MouseEvent
me is ignored.void
MouseEvent
me is ignored.void
MouseEvent
me is ignored.void
mouseMoved
(MouseEvent me) TheMouseEvent
me causes the properties of importance to the current mode to be updated.void
TheMouseEvent
me causes the properties of importance to the current mode to be updated.void
MouseEvent
me is ignored.void
protected void
TheMouseEvent
me causes the properties of importance to the current mode to be updated.void
setAlignment
(int newAlignment) The property of alignment determines whether to center, left or right align the location information.void
setGridReference
(ILcdGridReference aGridReference) void
setGXYView
(ILcdGXYView aGXYView) Sets the GXYView property to newGXYView.protected void
updateWithLocation
(int aX, int aY) Methods inherited from class java.awt.Component
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, 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, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
-
Field Details
-
LEFT
public static final int LEFT- See Also:
-
CENTER
public static final int CENTER- See Also:
-
RIGHT
public static final int RIGHT- See Also:
-
-
Constructor Details
-
TLcdMapGridRefLocation
public TLcdMapGridRefLocation()
-
-
Method Details
-
getMinimumSize
- Overrides:
getMinimumSize
in classComponent
-
getPreferredSize
- Overrides:
getPreferredSize
in classComponent
-
valueAsString
- Returns:
- the information pertaining the current mode and GXYView as a String.
-
getEasting
public double getEasting()- Returns:
- the easting of the (x,y) position in the
ILcdGXYView
.
-
getNorthing
public double getNorthing()- Returns:
- the northing of the (x,y) position in the
ILcdGXYView
.
-
setGridReference
-
getGridReference
-
setAlignment
public void setAlignment(int newAlignment) The property of alignment determines whether to center, left or right align the location information. This can be RIGHT, LEFT or CENTER. Sets the property of alignment to newAlignment. -
getAlignment
public int getAlignment()The property of alignment determines whether to center, left or right align the location information. Returns the property of alignment.- Returns:
- RIGHT, LEFT or CENTER.
-
setGXYView
Sets the GXYView property to newGXYView. -
getGXYView
Returns the GXYview property. -
updateWithLocation
protected void updateWithLocation(int aX, int aY) -
paint
-
processMouseEvent
TheMouseEvent
me causes the properties of importance to the current mode to be updated.- Overrides:
processMouseEvent
in classComponent
-
mouseMoved
TheMouseEvent
me causes the properties of importance to the current mode to be updated.- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseDragged
MouseEvent
me is ignored.- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
mousePressed
TheMouseEvent
me causes the properties of importance to the current mode to be updated.- Specified by:
mousePressed
in interfaceMouseListener
-
mouseClicked
MouseEvent
me is ignored.- Specified by:
mouseClicked
in interfaceMouseListener
-
mouseReleased
MouseEvent
me is ignored.- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
MouseEvent
me is ignored.- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
MouseEvent
me is ignored.- Specified by:
mouseExited
in interfaceMouseListener
-