public class RelativeBendpoint extends java.lang.Object implements Bendpoint
Connection
, as well as
its weight. See setWeight(float)
for a description of what behavior
different weights will provide.Constructor and Description |
---|
RelativeBendpoint()
Constructs a new RelativeBendpoint.
|
RelativeBendpoint(Connection conn)
Constructs a new RelativeBendpoint and associates it with the given
Connection.
|
Modifier and Type | Method and Description |
---|---|
protected Connection |
getConnection()
Returns the Connection this Bendpoint is associated with.
|
Point |
getLocation()
Calculates and returns this Bendpoint's new location.
|
void |
setConnection(Connection conn)
Sets the Connection this bendpoint should be associated with.
|
void |
setRelativeDimensions(Dimension dim1,
Dimension dim2)
Sets the Dimensions representing the X and Y distances this Bendpoint is
from the start and end points of the Connection.
|
void |
setWeight(float w)
Sets the weight this Bendpoint should use to calculate its location.
|
public RelativeBendpoint()
public RelativeBendpoint(Connection conn)
conn
- The Connection this Bendpoint is associated withprotected Connection getConnection()
public Point getLocation()
getLocation
in interface Bendpoint
public void setConnection(Connection conn)
conn
- The Connection this bendpoint should be associated withpublic void setRelativeDimensions(Dimension dim1, Dimension dim2)
dim1
- The X and Y distances this Bendpoint is from the start of the
Connectiondim2
- The X and Y distances this Bendpoint is from the end of the
Connectionpublic void setWeight(float w)
w
- The weightCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.