org.estouro.theme
Interface Handler

All Known Implementing Classes:
AbstractHandler, MultilineHandler, MultiPolygonHandler, PointHandler, PolygonHandler

public interface Handler

Implementations of this interface represents the handlers of the geometries that operate on the geometry they belong when moved by the user

Author:
Fernando González Cortés

Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.Color color, EditionContext ec)
          Draws the handler on the Graphics2d argument
 java.awt.geom.Point2D getPoint()
          Gets the real world coordinates of the handler
 int getPrimitiveIndex()
          Returns the index of the geometry in the theme it belongs
 com.hardcode.gdbms.engine.spatial.Geometry moveTo(double x, double y)
          Moves the handler to the real world coordinates passed as arguments and returns a new Geometry reflecting the change
 com.hardcode.gdbms.engine.spatial.Geometry remove()
          Removes the vertex handled by this handler and returns a new Geometry reflecting the changes
 

Method Detail

getPoint

java.awt.geom.Point2D getPoint()
Gets the real world coordinates of the handler

Returns:

moveTo

com.hardcode.gdbms.engine.spatial.Geometry moveTo(double x,
                                                  double y)
                                                  throws CannotChangeGeometryException
Moves the handler to the real world coordinates passed as arguments and returns a new Geometry reflecting the change

Parameters:
x -
y -
Returns:
Geometry
Throws:
CannotChangeGeometryException

draw

void draw(java.awt.Graphics2D g2,
          java.awt.Color color,
          EditionContext ec)
Draws the handler on the Graphics2d argument

Parameters:
g2 -
color -
ec - TODO

getPrimitiveIndex

int getPrimitiveIndex()
Returns the index of the geometry in the theme it belongs

Returns:

remove

com.hardcode.gdbms.engine.spatial.Geometry remove()
                                                  throws CannotChangeGeometryException
Removes the vertex handled by this handler and returns a new Geometry reflecting the changes

Returns:
Throws:
CannotChangeGeometryException - If the vertex cannot be removed due to geometrical constraints (i.e. a line must have at least two points, ...)


Copyright © 2005-2006 Fernando González Cortés. All Rights Reserved.