|
Eclipse Draw2d 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.draw2d.AbstractLocator
org.eclipse.draw2d.ConnectionLocator
public class ConnectionLocator
Repositions a Figure attached to a Connection when the
Connection is moved. Provides for alignment at the start (source), middle, or
end (target) of the Connection.
| Field Summary | |
|---|---|
static int |
END
Deprecated. Use TARGET |
static int |
MIDDLE
The middle of the Connection |
static int |
MIDPOINT
Deprecated. Use MIDDLE instead, since the location is not the
midpoint of a line-segment, but the middle of a polyline. |
static int |
SOURCE
The start (or source) of the Connection |
static int |
START
Deprecated. Use SOURCE |
static int |
TARGET
The end (or target) of the Connection |
| Constructor Summary | |
|---|---|
ConnectionLocator(Connection connection)
Constructs a ConnectionLocator with the passed connection and MIDDLE alignment. |
|
ConnectionLocator(Connection connection,
int align)
Constructs a ConnectionLocator with the passed Connection and alignment. |
|
| Method Summary | |
|---|---|
int |
getAlignment()
Returns the alignment of ConnectionLocator. |
protected Connection |
getConnection()
Returns connection associated with ConnectionLocator. |
protected Point |
getLocation(PointList points)
Returns a point from the passed PointList, dependent on ConnectionLocator's alignment. |
protected Point |
getReferencePoint()
Returns ConnectionLocator's reference point in absolute coordinates. |
protected void |
setAlignment(int align)
Sets the alignment. |
protected void |
setConnection(Connection connection)
Sets the Connection to be associated with this ConnectionLocator. |
| Methods inherited from class org.eclipse.draw2d.AbstractLocator |
|---|
getGap, getNewBounds, getRelativePosition, relocate, setGap, setRelativePosition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int START
SOURCEpublic static final int SOURCE
public static final int END
TARGETpublic static final int TARGET
public static final int MIDPOINT
MIDDLE instead, since the location is not the
midpoint of a line-segment, but the middle of a polyline.public static final int MIDDLE
| Constructor Detail |
|---|
public ConnectionLocator(Connection connection)
MIDDLE alignment.
connection - The Connection
public ConnectionLocator(Connection connection,
int align)
SOURCE,
MIDDLE, and TARGET.
connection - The Connectionalign - The alignment| Method Detail |
|---|
public int getAlignment()
protected Connection getConnection()
protected Point getReferencePoint()
getReferencePoint in class AbstractLocatorprotected Point getLocation(PointList points)
SOURCE, it
returns the first point in points. If TARGET, it returns
the last point in points. If MIDDLE, it returns the
middle of line represented by points.
points - The points in the Connection
protected void setAlignment(int align)
SOURCE, MIDDLE,
and TARGET.
align - The alignmentprotected void setConnection(Connection connection)
connection - The Connection
|
Eclipse Draw2d 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||