public class NodeBasedSnapLine extends OrthogonalSnapLine
OrthogonalSnapLine
that stores a Node
as additional information that can be
used for the visualization.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 |
---|
NodeBasedSnapLine(INode node,
SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
double from,
double to,
Object tag,
double weight)
Initializes a new instance of the
NodeBasedSnapLine class. |
NodeBasedSnapLine(INode node,
SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
Object tag,
double weight)
Initializes a new instance of the
NodeBasedSnapLine class. |
Modifier and Type | Method and Description |
---|---|
INode |
getNode()
Gets the node that is associated with this snap line.
|
getOrientation
getCoordinates, getFrom, getResourceKey, getSnapType, getTag, getTo, getWeight, setFrom, setTo
public NodeBasedSnapLine(INode node, SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, double from, double to, Object tag, double weight)
NodeBasedSnapLine
class.node
- The node to assign to Node
.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 NodeBasedSnapLine(INode node, SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, Object tag, double weight)
NodeBasedSnapLine
class.node
- The node to assign to Node
.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 getNode()
Usually this is the instance that induced this snap line.