org.graffiti.plugin.view
Interface NodeShape

All Superinterfaces:
GraffitiShape, GraphElementShape, Shape

public interface NodeShape
extends GraphElementShape

Interface extending GraphElementShape. Classes implementing this interface are shapes that are displayed for nodes. They must implement a method returning the intersection between themselves and a Line2D so that the clipping between the node and incoming / outgoing edges can be calculated.


Method Summary
 void buildShape(NodeGraphicAttribute graphics)
          Shapes itself according to the graphics attribute found in the CollectionAttribute graphics
 Point2D getIntersection(Line2D line)
          Calculates the intersection point between this node shape and a line.
 
Methods inherited from interface org.graffiti.plugin.view.GraphElementShape
getRealBounds2D
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects
 

Method Detail

getIntersection

Point2D getIntersection(Line2D line)
Calculates the intersection point between this node shape and a line. For irregularly shaped objects, the intersection that is nearest to the end point of the line is returned.

Parameters:
line - the line with which the intersection should be calculated.
Returns:
the intersection point between this node shape and the line.

buildShape

void buildShape(NodeGraphicAttribute graphics)
                throws ShapeNotFoundException
Shapes itself according to the graphics attribute found in the CollectionAttribute graphics

Parameters:
graphics - the CollectionAttribute accoring to which this shape is constructed.
Throws:
ShapeNotFoundException


Generated at 2012-05-30 11:00:36 PM CEST