public class PointBasedSnapLine extends OrthogonalSnapLine
OrthogonalSnapLine
that stores a Point
instance 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 |
---|
PointBasedSnapLine(IPoint point,
SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
double from,
double to,
Object tag,
double weight)
Initializes a new instance of the
PointBasedSnapLine class. |
PointBasedSnapLine(IPoint point,
SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
Object tag,
double weight)
Initializes a new instance of the
PointBasedSnapLine class. |
Modifier and Type | Method and Description |
---|---|
IPoint |
getPoint()
Gets the point that is associated with this snap line.
|
getOrientation
getCoordinates, getFrom, getResourceKey, getSnapType, getTag, getTo, getWeight, setFrom, setTo
public PointBasedSnapLine(IPoint point, SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, double from, double to, Object tag, double weight)
PointBasedSnapLine
class.point
- The point to assign to Point
.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 PointBasedSnapLine(IPoint point, SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, Object tag, double weight)
PointBasedSnapLine
class.point
- The point to assign to Point
.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 IPoint getPoint()
Usually this is the instance that induced this snap line.