Class StraightLineEdgeShape
java.lang.Object
org.graffiti.plugins.views.defaults.LineEdgeShape
org.graffiti.plugins.views.defaults.StraightLineEdgeShape
- All Implemented Interfaces:
Shape
,EdgeShape
,GraffitiShape
,GraphElementShape
public class StraightLineEdgeShape extends LineEdgeShape
Concrete class representing an edge as one straight line.
- Version:
- $Revision: 1.15 $
-
Field Summary
Fields inherited from class org.graffiti.plugins.views.defaults.LineEdgeShape
hollowSourceArrowShape, hollowTargetArrowShape
Fields inherited from interface org.graffiti.plugin.view.EdgeShape
CLICK_TOLERANCE
-
Constructor Summary
Constructors Constructor Description StraightLineEdgeShape()
-
Method Summary
Modifier and Type Method Description void
buildShape(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape, NodeShape targetShape)
This method sets all necessary properties of an edge using the values contained within theCollectionAttribute
(like coordinates etc.).boolean
contains(double x, double y)
Decides whether or not a point lies within this shape.PathIterator
getPathIterator(AffineTransform t)
DOCUMENT ME!PathIterator
getPathIterator(AffineTransform t, double d)
DOCUMENT ME!double
getXexcess()
double
getYexcess()
void
setCoordinateSystem(CoordinateSystem coordinates)
Methods inherited from class org.graffiti.plugins.views.defaults.LineEdgeShape
contains, contains, contains, getBounds, getBounds2D, getHeadArrow, getRealBounds2D, getTailArrow, intersects, intersects, lineContains
-
Constructor Details
-
StraightLineEdgeShape
public StraightLineEdgeShape()
-
-
Method Details
-
getPathIterator
Description copied from class:LineEdgeShape
DOCUMENT ME!- Specified by:
getPathIterator
in interfaceShape
- Overrides:
getPathIterator
in classLineEdgeShape
- Parameters:
t
- DOCUMENT ME!d
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPathIterator
DOCUMENT ME!- Specified by:
getPathIterator
in interfaceShape
- Overrides:
getPathIterator
in classLineEdgeShape
- Parameters:
t
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
buildShape
public void buildShape(EdgeGraphicAttribute edgeAttr, NodeShape sourceShape, NodeShape targetShape) throws ShapeNotFoundExceptionThis method sets all necessary properties of an edge using the values contained within theCollectionAttribute
(like coordinates etc.). It also uses information about ports. It attaches arrows if there are any.- Specified by:
buildShape
in interfaceEdgeShape
- Specified by:
buildShape
in classLineEdgeShape
- Parameters:
edgeAttr
- the attribute that contains all necessary information to construct a line.sourceShape
- DOCUMENT ME!targetShape
- DOCUMENT ME!- Throws:
ShapeNotFoundException
- DOCUMENT ME!
-
contains
public boolean contains(double x, double y)Decides whether or not a point lies within this shape.- Specified by:
contains
in interfaceShape
- Specified by:
contains
in classLineEdgeShape
- Parameters:
x
- the x-coordinate of the point to check.y
- the y-coordinate of the point to check.- Returns:
- true if the point lies within this shape.
-
setCoordinateSystem
-
getXexcess
public double getXexcess() -
getYexcess
public double getYexcess()
-