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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe property of alignment determines whether to center, left or right align the location information.doubleReturns the GXYview property.doublevoidMouseEventme is ignored.voidMouseEventme is ignored.voidMouseEventme is ignored.voidMouseEventme is ignored.voidmouseMoved(MouseEvent me) TheMouseEventme causes the properties of importance to the current mode to be updated.voidTheMouseEventme causes the properties of importance to the current mode to be updated.voidMouseEventme is ignored.voidprotected voidTheMouseEventme causes the properties of importance to the current mode to be updated.voidsetAlignment(int newAlignment) The property of alignment determines whether to center, left or right align the location information.voidsetGridReference(ILcdGridReference aGridReference) voidsetGXYView(ILcdGXYView aGXYView) Sets the GXYView property to newGXYView.protected voidupdateWithLocation(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:
getMinimumSizein classComponent
-
getPreferredSize
- Overrides:
getPreferredSizein 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
TheMouseEventme causes the properties of importance to the current mode to be updated.- Overrides:
processMouseEventin classComponent
-
mouseMoved
TheMouseEventme causes the properties of importance to the current mode to be updated.- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseDragged
MouseEventme is ignored.- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mousePressed
TheMouseEventme causes the properties of importance to the current mode to be updated.- Specified by:
mousePressedin interfaceMouseListener
-
mouseClicked
MouseEventme is ignored.- Specified by:
mouseClickedin interfaceMouseListener
-
mouseReleased
MouseEventme is ignored.- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
MouseEventme is ignored.- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
MouseEventme is ignored.- Specified by:
mouseExitedin interfaceMouseListener
-