Class TLcdMapGridRefLocation

java.lang.Object
java.awt.Component
com.luciad.view.map.TLcdMapGridRefLocation
All Implemented Interfaces:
MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener

public class TLcdMapGridRefLocation extends Component implements MouseListener, MouseMotionListener
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:
  • Field Details

  • Constructor Details

    • TLcdMapGridRefLocation

      public TLcdMapGridRefLocation()
  • Method Details

    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class Component
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class Component
    • valueAsString

      public String 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

      public void setGridReference(ILcdGridReference aGridReference)
    • getGridReference

      public ILcdGridReference 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

      public void setGXYView(ILcdGXYView aGXYView)
      Sets the GXYView property to newGXYView.
    • getGXYView

      public ILcdGXYView getGXYView()
      Returns the GXYview property.
    • updateWithLocation

      protected void updateWithLocation(int aX, int aY)
    • paint

      public void paint(Graphics aGraphics)
      Overrides:
      paint in class Component
    • processMouseEvent

      protected void processMouseEvent(MouseEvent me)
      The MouseEvent me causes the properties of importance to the current mode to be updated.
      Overrides:
      processMouseEvent in class Component
    • mouseMoved

      public void mouseMoved(MouseEvent me)
      The MouseEvent me causes the properties of importance to the current mode to be updated.
      Specified by:
      mouseMoved in interface MouseMotionListener
    • mouseDragged

      public void mouseDragged(MouseEvent me)
      MouseEvent me is ignored.
      Specified by:
      mouseDragged in interface MouseMotionListener
    • mousePressed

      public void mousePressed(MouseEvent me)
      The MouseEvent me causes the properties of importance to the current mode to be updated.
      Specified by:
      mousePressed in interface MouseListener
    • mouseClicked

      public void mouseClicked(MouseEvent me)
      MouseEvent me is ignored.
      Specified by:
      mouseClicked in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent me)
      MouseEvent me is ignored.
      Specified by:
      mouseReleased in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent me)
      MouseEvent me is ignored.
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent me)
      MouseEvent me is ignored.
      Specified by:
      mouseExited in interface MouseListener