public class ConnectionEndpointLocator extends java.lang.Object implements Locator
Connection
. uDistance
represents the distance from the
Connection's owner to the IFigure. vDistance
represents the
distance from the IFigure to the Connection itself.Modifier and Type | Field and Description |
---|---|
protected Transposer |
transposer
Transposes the location if the connection point is along the top or
bottom of its owner figure.
|
Constructor and Description |
---|
ConnectionEndpointLocator(Connection c,
boolean isEnd)
Constructs a ConnectionEndpointLocator using the given
Connection
. |
Modifier and Type | Method and Description |
---|---|
int |
getUDistance()
Returns the distance in pixels from the anchor's owner.
|
int |
getVDistance()
Returns the distance in pixels from the connection
|
void |
relocate(IFigure figure)
Relocates the given IFigure at either the source or target end of the
Connection, based on the
boolean given in the constructor
ConnectionEndpointLocator(Connection, boolean) . |
void |
setUDistance(int distance)
Sets the distance in pixels from the Connection's owner.
|
void |
setVDistance(int distance)
Sets the distance in pixels from the Connection.
|
protected Transposer transposer
public ConnectionEndpointLocator(Connection c, boolean isEnd)
Connection
. If isEnd is true
, the location is relative to the
Connection's end (or target) point. If isEnd is false
, the location is relative to the Connection's start (or source) point.c
- The ConnectionisEnd
- true
is location is relative to end pointpublic int getUDistance()
public int getVDistance()
public void relocate(IFigure figure)
boolean
given in the constructor
ConnectionEndpointLocator(Connection, boolean)
.public void setUDistance(int distance)
distance
- Number of pixels to place the ConnectionEndpointLocator from
its owner.public void setVDistance(int distance)
distance
- Number of pixels to place the ConnectionEndpointLocator from
its Connection.Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.