org.gvsig.fmap.geom.handler
Interface Handler

All Known Subinterfaces:
CenterHandler, CuadrantHandler, FinalHandler
All Known Implementing Classes:
AbstractHandler

public interface Handler

In a FMap graphic layer, each geometry drawn has control points named handlers that allow user to move, modify, set, ... that geometry.

Each geometry will have its own handlers, and each one can have different behavior according its nature.

The Handler interface defines the least set of common methods for all geometry handlers.


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.
 void move(double x, double y)
          Generic method of moving in 2D a handler of a geometry using two numbers that represent the 2D coordinates.
 void set(double x, double y)
          Generic method of situating in 2D a handler of a geometry using two numbers that represent the 2D coordinates.
 

Method Detail

move

void move(double x,
          double y)

Generic method of moving in 2D a handler of a geometry using two numbers that represent the 2D coordinates.

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

Parameters:
x - first dimension coordinate
y - second dimension coordinate
See Also:
set(double, double)

set

void set(double x,
         double y)

Generic method of situating in 2D a handler of a geometry using two numbers that represent the 2D coordinates.

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

Parameters:
x - first dimension coordinate
y - second dimension coordinate
See Also:
move(double, double), getPoint()

getPoint

Point2D getPoint()

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.

Returns:
point 2D that represents this handler of geometry
See Also:
set(double, double), move(double, double)

equalsPoint

boolean equalsPoint(Object obj)

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

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


Copyright © 2004-2012 gvSIG. All Rights Reserved.