org.gvsig.fmap.geom.handler
Class AbstractHandler

java.lang.Object
  extended by 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:
Handler

Field Summary
protected  int index
          Identifies each handler of a geometry.
protected  Point2D point
          Position of this handler.
 
Constructor Summary
AbstractHandler()
           
 
Method Summary
 boolean equalsPoint(Object obj)
          Returns true if the object is a Handler and has the same coordinates as this one.
 Point2D getPoint()
          Generic method of getting the 2D point that represents a handler of a geometry.
 boolean isSelected()
          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 Detail

index

protected int index
Identifies each handler of a geometry.


point

protected Point2D point
Position of this handler.

See Also:
getPoint(), Handler.set(double, double), Handler.move(double, double)
Constructor Detail

AbstractHandler

public AbstractHandler()
Method Detail

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:
Handler.set(double, double), Handler.move(double, double)

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()

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:
select(boolean)

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:
Handler.getPoint()


Copyright © 2004-2012 gvSIG. All Rights Reserved.