|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.draw2d.Shape
org.eclipse.draw2d.AbstractPointListShape
org.eclipse.draw2d.Polyline
org.eclipse.draw2d.PolylineConnection
org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx
de.cau.cs.kieler.core.model.gmf.figures.SplineConnection
public class SplineConnection
A connection figure that is able to draw polylines as well as real splines or approximated splines. In these cases the bend points are interpreted as spline control points.
Nested Class Summary | |
---|---|
static class |
SplineConnection.ArrowLocatorEx
An extension of the ArrowLocator that is capable of using spline points as references. |
Nested classes/interfaces inherited from class org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx |
---|
PolylineConnectionEx.JumpLink, PolylineConnectionEx.JumpLinkSet |
Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure |
---|
Figure.FigureIterator, Figure.IdentitySearch |
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure |
---|
IFigure.NoInsets |
Field Summary | |
---|---|
static String |
PREF_SPLINE_MODE
Temporary preference key. |
static int |
SPLINE_CUBIC
Draw cubic spline segments. |
static int |
SPLINE_CUBIC_APPROX
Approximate cubic spline segments. |
static int |
SPLINE_OFF
Don't draw splines. |
Fields inherited from class org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx |
---|
JUMPLINK_FLAG_ABOVE, JUMPLINK_FLAG_ALL, JUMPLINK_FLAG_BELOW, SMOOTH_LESS, SMOOTH_MORE, SMOOTH_NONE, SMOOTH_NORMAL |
Fields inherited from class org.eclipse.draw2d.Shape |
---|
lineStyle, lineWidth |
Fields inherited from class org.eclipse.draw2d.Figure |
---|
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
Fields inherited from interface org.eclipse.draw2d.Connection |
---|
PROPERTY_CONNECTION_ROUTER, PROPERTY_POINTS |
Fields inherited from interface org.eclipse.draw2d.IFigure |
---|
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
Constructor Summary | |
---|---|
SplineConnection()
|
Method Summary | |
---|---|
protected int |
calculateTolerance(boolean isFeedbackLayer)
Calculate and store the tolerance value for determining whether the line contains a point or not. |
boolean |
containsPoint(int x,
int y)
|
IFigure |
getJoinPointDecoration()
Get the current join point decoration. |
PointList |
getRoundedCornersPoints(boolean calculateAppoxPoints)
|
int |
getSplineMode()
Gets the spline mode for this connection. |
protected boolean |
isFeedbackLayer()
This method checks if we are on a feedback layer by comparing the value of a Dimension with the value after translating it into relative coordinates. |
boolean |
isRoundingBendpoints()
Checks if edge corners should be rounded. |
protected boolean |
lineContainsPoint(int x1,
int y1,
int x2,
int y2,
int px,
int py,
boolean isFeedbackLayer)
Checks whether a point is near a line or not. |
void |
outlineShape(Graphics g)
|
void |
setJoinPointDecoration(IFigure dec)
Set a join point decoration. |
void |
setSourceDecoration(RotatableDecoration dec)
|
void |
setSplineMode(int mode)
Set spline mode for this connection. |
void |
setTargetDecoration(RotatableDecoration dec)
|
Methods inherited from class org.eclipse.draw2d.PolylineConnection |
---|
addNotify, addRoutingListener, anchorMoved, getConnectionRouter, getRoutingConstraint, getSourceAnchor, getTargetAnchor, layout, removeNotify, removeRoutingListener, revalidate, setConnectionRouter, setRoutingConstraint, setSourceAnchor, setTargetAnchor |
Methods inherited from class org.eclipse.draw2d.Polyline |
---|
fillShape, isOpaque, primTranslate, removeAllPoints, repaint, setTolerance, shapeContainsPoint |
Methods inherited from class org.eclipse.draw2d.AbstractPointListShape |
---|
childrenContainsPoint, getEnd, getPoints, getStart, removePoint, setEnd, setEndpoints, setPoint, setStart |
Methods inherited from class org.eclipse.draw2d.Shape |
---|
getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidthFloat, setOutline, setOutlineXOR, setXOR |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.draw2d.Connection |
---|
getPoints |
Field Detail |
---|
public static final int SPLINE_OFF
public static final int SPLINE_CUBIC
public static final int SPLINE_CUBIC_APPROX
public static final String PREF_SPLINE_MODE
Constructor Detail |
---|
public SplineConnection()
Method Detail |
---|
public boolean containsPoint(int x, int y)
containsPoint
in interface IFigure
containsPoint
in class PolylineConnectionEx
protected boolean isFeedbackLayer()
public boolean isRoundingBendpoints()
isRoundingBendpoints
in class PolylineConnectionEx
true
if edge corners should be rounded.protected int calculateTolerance(boolean isFeedbackLayer)
isFeedbackLayer
- see the isFeedbackLayer() method
protected boolean lineContainsPoint(int x1, int y1, int x2, int y2, int px, int py, boolean isFeedbackLayer)
x1
- line starty1
- line startx2
- line endy2
- line endpx
- pointpy
- pointisFeedbackLayer
- whether we're on a feedback layer or not
public void setSplineMode(int mode)
mode
- spline modepublic int getSplineMode()
public void outlineShape(Graphics g)
outlineShape
in class PolylineConnectionEx
public PointList getRoundedCornersPoints(boolean calculateAppoxPoints)
getRoundedCornersPoints
in class PolylineConnectionEx
public IFigure getJoinPointDecoration()
public void setJoinPointDecoration(IFigure dec)
dec
- the new join point decorationpublic void setTargetDecoration(RotatableDecoration dec)
setTargetDecoration
in class PolylineConnectionEx
public void setSourceDecoration(RotatableDecoration dec)
setSourceDecoration
in class PolylineConnectionEx
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |