Package org.eclipse.draw2d
Class RelativeBendpoint
java.lang.Object
org.eclipse.draw2d.RelativeBendpoint
- All Implemented Interfaces:
- Bendpoint
RelativeBendpoint is a Bendpoint that calculates its location based on its
 distance from the start and end points of the 
Connection, as well as
 its weight. See setWeight(float) for a description of what behavior
 different weights will provide.- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a new RelativeBendpoint.RelativeBendpoint(Connection conn) Constructs a new RelativeBendpoint and associates it with the given Connection.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ConnectionReturns the Connection this Bendpoint is associated with.Calculates and returns this Bendpoint's new location.voidsetConnection(Connection conn) Sets the Connection this bendpoint should be associated with.voidsetRelativeDimensions(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.voidsetWeight(float w) Sets the weight this Bendpoint should use to calculate its location.
- 
Constructor Details- 
RelativeBendpointpublic RelativeBendpoint()Constructs a new RelativeBendpoint.- Since:
- 2.0
 
- 
RelativeBendpointConstructs a new RelativeBendpoint and associates it with the given Connection.- Parameters:
- conn- The Connection this Bendpoint is associated with
- Since:
- 2.0
 
 
- 
- 
Method Details- 
getConnectionReturns the Connection this Bendpoint is associated with.- Returns:
- The Connection this Bendpoint is associated with
- Since:
- 2.0
 
- 
getLocationCalculates and returns this Bendpoint's new location.- Specified by:
- getLocationin interface- Bendpoint
- Returns:
- This Bendpoint's new location
- Since:
- 2.0
 
- 
setConnectionSets the Connection this bendpoint should be associated with.- Parameters:
- conn- The Connection this bendpoint should be associated with
- Since:
- 2.0
 
- 
setRelativeDimensionsSets the Dimensions representing the X and Y distances this Bendpoint is from the start and end points of the Connection. These Dimensions are generally set once and are used in calculating the Bendpoint's location.- Parameters:
- dim1- The X and Y distances this Bendpoint is from the start of the Connection
- dim2- The X and Y distances this Bendpoint is from the end of the Connection
- Since:
- 2.0
 
- 
setWeightpublic void setWeight(float w) Sets the weight this Bendpoint should use to calculate its location. The weight should be between 0.0 and 1.0. A weight of 0.0 will cause the Bendpoint to follow the start point, while a weight of 1.0 will cause the Bendpoint to follow the end point. A weight of 0.5 (the default) will cause the Bendpoint to maintain its original aspect ratio between the start and end points.- Parameters:
- w- The weight
- Since:
- 2.0
 
 
-