A port location model that places the port on a specified segment and at a specified ratio of an edge.
Implements
- I
Members
No filters for this type
Methods
Factory method that creates a parameter for the given owner that tries to match the provided location in absolute world coordinates.
Factory method that creates a parameter for the given
owner that tries to match the provided location in absolute world coordinates.final
Parameters
- owner: IPortOwner
- The port owner that will own the port for which the parameter shall be created.
- location: Point
- The location in the world coordinate system that should be matched as best as possible.
Return Value
- IPortLocationModelParameter
- A new instance that can be used to describe the location of an IPort at the given
owner.
Implements
IPortLocationModel.createParametercreateParameterFromSource
(segmentIndex: number, ratio: number): EdgeSegmentPortLocationModelParameterCreates a parameter that describes the provided segment index and ratio from the source side of the edge path.
createParameterFromSource
(segmentIndex: number, ratio: number): EdgeSegmentPortLocationModelParameterCreates a parameter that describes the provided segment index and ratio from the source side of the edge path.
final
Parameters
- segmentIndex: number
- The zero-based index of the segment beginning from the source side.
- ratio: number
- The ratio at which to place the port at the segment. A ratio of
0.0places the port at the source side of the segment, a ratio of1.0at the target side.
Return Value
- EdgeSegmentPortLocationModelParameter
- A parameter for the given ratio and segment.
createParameterFromTarget
(segmentIndex: number, ratio: number): EdgeSegmentPortLocationModelParameterCreates a parameter that describes the provided segment index and ratio from the target side of the edge path.
createParameterFromTarget
(segmentIndex: number, ratio: number): EdgeSegmentPortLocationModelParameterCreates a parameter that describes the provided segment index and ratio from the target side of the edge path.
final
Parameters
- segmentIndex: number
- The zero-based index of the segment beginning from the target side.
- ratio: number
- The ratio at which to place the port at the segment. A ratio of
0.0places the port at the target side of the segment, a ratio of1.0at the source side.
Return Value
- EdgeSegmentPortLocationModelParameter
- A parameter for the given ratio and segment.
Provides a lookup context for the given port.
Provides a lookup context for the given port.
final
Parameters
- port: IPort
- The port to use in the context.
Return Value
- ILookup
- An implementation of the ILookup interface that can be used to query additional aspects of the port.
Implements
IPortLocationModel.getContextDetermines the location of the port for the given parameter.
Determines the location of the port for the given parameter.
final
Parameters
- port: IPort
- The port to determine the location for.
- locationParameter: IPortLocationModelParameter
- The parameter to use. The parameter can be expected to be created by this instance having the model property set to this instance.
Return Value
- Point
- The calculated location of the port.
Implements
IPortLocationModel.getLocationConstants
A static, immutable global instance of this class.
A static, immutable global instance of this class.