|
Eclipse Draw2d 3.8.0.201206011245 |
|||||||||
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
public class PolylineConnection
An implementation of Connection
based on Polyline. PolylineConnection
adds the following additional features:
ConnectionRouter
may be provided which will be used to determine
the connections points.
DelegatingLayout
is set as the default layout. A delegating layout
allows children to position themselves via Locators
.
Nested Class Summary |
---|
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 |
---|
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 | |
---|---|
PolylineConnection()
|
Method Summary | |
---|---|
void |
addNotify()
Hooks the source and target anchors. |
void |
addRoutingListener(RoutingListener listener)
Appends the given routing listener to the list of listeners. |
void |
anchorMoved(ConnectionAnchor anchor)
Called by the anchors of this connection when they have moved, revalidating this polyline connection. |
Rectangle |
getBounds()
Returns the bounds which holds all the points in this polyline connection. |
ConnectionRouter |
getConnectionRouter()
Returns the ConnectionRouter used to layout this connection. |
Object |
getRoutingConstraint()
Returns this connection's routing constraint from its connection router. |
ConnectionAnchor |
getSourceAnchor()
Returns the ConnectionAnchor at the source end of this Connection. |
protected RotatableDecoration |
getSourceDecoration()
|
ConnectionAnchor |
getTargetAnchor()
Returns the ConnectionAnchor at the target end of this Connection. |
protected RotatableDecoration |
getTargetDecoration()
|
void |
layout()
Layouts this polyline. |
void |
removeNotify()
Called just before the receiver is being removed from its parent. |
void |
removeRoutingListener(RoutingListener listener)
Removes the first occurence of the given listener. |
void |
revalidate()
Invalidates this figure and revalidates() its parent. |
void |
setConnectionRouter(ConnectionRouter cr)
Sets the connection router which handles the layout of this polyline. |
void |
setRoutingConstraint(Object cons)
Sets the routing constraint for this connection. |
void |
setSourceAnchor(ConnectionAnchor anchor)
Sets the anchor to be used at the start of this polyline connection. |
void |
setSourceDecoration(RotatableDecoration dec)
Sets the decoration to be used at the start of the Connection . |
void |
setTargetAnchor(ConnectionAnchor anchor)
Sets the anchor to be used at the end of the polyline connection. |
void |
setTargetDecoration(RotatableDecoration dec)
Sets the decoration to be used at the end of the Connection . |
Methods inherited from class org.eclipse.draw2d.Polyline |
---|
containsPoint, fillShape, isOpaque, outlineShape, primTranslate, removeAllPoints, repaint, setLineWidth, setPoints, setTolerance, shapeContainsPoint |
Methods inherited from class org.eclipse.draw2d.AbstractPointListShape |
---|
addPoint, childrenContainsPoint, getEnd, getPoints, getStart, insertPoint, 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, setPoints |
Constructor Detail |
---|
public PolylineConnection()
Method Detail |
---|
public void addNotify()
addNotify
in interface IFigure
addNotify
in class Figure
Figure.addNotify()
public void addRoutingListener(RoutingListener listener)
listener
- the routing listenerpublic void anchorMoved(ConnectionAnchor anchor)
anchorMoved
in interface AnchorListener
anchor
- the anchor that movedpublic Rectangle getBounds()
getBounds
in interface IFigure
getBounds
in class Polyline
IFigure.getBounds()
public ConnectionRouter getConnectionRouter()
ConnectionRouter
used to layout this connection.
Will not return null
.
getConnectionRouter
in interface Connection
public Object getRoutingConstraint()
null
.
getRoutingConstraint
in interface Connection
public ConnectionAnchor getSourceAnchor()
Connection
getSourceAnchor
in interface Connection
protected RotatableDecoration getSourceDecoration()
public ConnectionAnchor getTargetAnchor()
Connection
getTargetAnchor
in interface Connection
protected RotatableDecoration getTargetDecoration()
public void layout()
layout
in class Figure
public void removeNotify()
removeNotify
in interface IFigure
removeNotify
in class Figure
public void removeRoutingListener(RoutingListener listener)
listener
- the listener being removedpublic void revalidate()
IFigure
revalidate
in interface IFigure
revalidate
in class Figure
IFigure.revalidate()
public void setConnectionRouter(ConnectionRouter cr)
setConnectionRouter
in interface Connection
cr
- the connection routerpublic void setRoutingConstraint(Object cons)
setRoutingConstraint
in interface Connection
cons
- the constraintpublic void setSourceAnchor(ConnectionAnchor anchor)
setSourceAnchor
in interface Connection
anchor
- the new source anchorpublic void setSourceDecoration(RotatableDecoration dec)
Connection
.
dec
- the new source decorationpublic void setTargetAnchor(ConnectionAnchor anchor)
setTargetAnchor
in interface Connection
anchor
- the new target anchorpublic void setTargetDecoration(RotatableDecoration dec)
Connection
.
dec
- the new target decoration
|
Eclipse Draw2d 3.8.0.201206011245 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |