Class AbstractHandler

java.lang.Object
org.gvsig.fmap.geom.handler.AbstractHandler
All Implemented Interfaces:
Handler

public abstract class AbstractHandler extends Object implements Handler
This class expands the Handler interface adding support for selection, and identifying a handler of a geometry.
Author:
Vicente Caballero Navarro
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    Identifies each handler of a geometry.
    protected Point2D
    Position of this handler.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the object is a Handler and has the same coordinates as this one.
    Generic method of getting the 2D point that represents a handler of a geometry.
    boolean
    Returns the state of the handler.
    void
    select(boolean b)
    Sets the state of the handler.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gvsig.fmap.geom.handler.Handler

    move, set
  • Field Details

  • Constructor Details

    • AbstractHandler

      public AbstractHandler()
  • Method Details

    • getPoint

      public Point2D getPoint()
      Description copied from interface: Handler

      Generic method of getting the 2D point that represents a handler of a geometry.

      Each handler of each geometry adapts this method to its own behavior in that geometry, that implies that could not be implemented.

      Specified by:
      getPoint in interface Handler
      Returns:
      point 2D that represents this handler of geometry
      See Also:
    • select

      public void select(boolean b)
      Sets the state of the handler. True if is selected, false if it's not.
      Parameters:
      b - true if the handler is selected, false otherwise
      See Also:
    • isSelected

      public boolean isSelected()
      Returns the state of the handler. True if is selected, false if it's not.
      Returns:
      true if the handler is selected,false otherwise
      See Also:
    • equalsPoint

      public boolean equalsPoint(Object obj)
      Description copied from interface: Handler

      Returns true if the object is a Handler and has the same coordinates as this one.

      Specified by:
      equalsPoint in interface Handler
      Parameters:
      obj - the reference object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise
      See Also: