public class NodePairBasedSnapLine extends OrthogonalSnapLine
OrthogonalSnapLine
that stores two nodes
as additional information that can be used
for the visualization.getFirstNode()
,
getSecondNode()
GRID_LINE_FIXED_LINE_KEY, SNAP_LINE_BLANK_VARIABLE_LINE_KEY, SNAP_LINE_CENTER_BETWEEN_BOUNDS_KEY, SNAP_LINE_CENTER_BETWEEN_CENTERS_KEY, SNAP_LINE_EDGE_SEGMENT_KEY, SNAP_LINE_EQUAL_DISTANCE_BETWEEN_BOUNDS_KEY, SNAP_LINE_EQUAL_DISTANCE_BETWEEN_CENTERS_KEY, SNAP_LINE_EQUAL_HEIGHT_KEY, SNAP_LINE_EQUAL_WIDTH_KEY, SNAP_LINE_EXTENDED_VARIABLE_LINE_KEY, SNAP_LINE_FIXED_DISTANCE_KEY, SNAP_LINE_FIXED_LINE_KEY, SNAP_LINE_PEN_KEY, SNAP_LINE_VARIABLE_LINE_KEY, SNAP_TO_GRID_KEY
Constructor and Description |
---|
NodePairBasedSnapLine(INode firstNode,
INode secondNode,
SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
double from,
double to,
Object tag,
double weight)
Initializes a new instance of the
NodePairBasedSnapLine class. |
NodePairBasedSnapLine(INode firstNode,
INode secondNode,
SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
Object tag,
double weight)
Initializes a new instance of the
NodePairBasedSnapLine class. |
Modifier and Type | Method and Description |
---|---|
INode |
getFirstNode()
Gets the first node that is associated with this snap line.
|
INode |
getSecondNode()
Gets the second node that is associated with this snap line.
|
getOrientation
getCoordinates, getFrom, getResourceKey, getSnapType, getTag, getTo, getWeight, setFrom, setTo
public NodePairBasedSnapLine(INode firstNode, INode secondNode, SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, double from, double to, Object tag, double weight)
NodePairBasedSnapLine
class.firstNode
- The first node to assign to FirstNode
.secondNode
- The second node to assign to SecondNode
.orientation
- The orientation of the snap line. This is one of SnapLineOrientation.HORIZONTAL
or
SnapLineOrientation.VERTICAL
.snapType
- The type of the line that describes how other items will snap to this line. This is one of
SnapLineSnapTypes.TOP
, SnapLineSnapTypes.BOTTOM
, SnapLineSnapTypes.LEFT
,
SnapLineSnapTypes.RIGHT
, or SnapLineSnapTypes.CENTER
.resourceKey
- A resource key which determines the visual representation of this snap line.coordinates
- The coordinates of the center point of the snap line.tag
- A tag that is associated with this snap line - see Tag
for a
typical use of this value.weight
- The weight (importance) of this snap line. If more than one snap line is snapped to, the one with the greater weight
will be used.from
- The smaller value of the coordinate that delimits this snap line.to
- The greater value of the coordinate that delimits this snap line.public NodePairBasedSnapLine(INode firstNode, INode secondNode, SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, Object tag, double weight)
NodePairBasedSnapLine
class.firstNode
- The first node to assign to FirstNode
.secondNode
- The second node to assign to SecondNode
.orientation
- The orientation of the snap line. This is one of SnapLineOrientation.HORIZONTAL
or
SnapLineOrientation.VERTICAL
.snapType
- The type of the line that describes how other items will snap to this line. This is one of
SnapLineSnapTypes.TOP
, SnapLineSnapTypes.BOTTOM
, SnapLineSnapTypes.LEFT
,
SnapLineSnapTypes.RIGHT
, or SnapLineSnapTypes.CENTER
.resourceKey
- A resource key which determines the visual representation of this snap line.coordinates
- The coordinates of the center point of the snap line.tag
- A tag that is associated with this snap line - see Tag
for a
typical use of this value.weight
- The weight (importance) of this snap line. If more than one snap line is snapped to, the one with the greater weight
will be used.public final INode getFirstNode()
Usually this is one of the instances that induced this snap line.
public final INode getSecondNode()
Usually this is one of the instances that induced this snap line.