public class OrthogonalSnapLine extends SnapLine
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 |
---|
OrthogonalSnapLine(SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
double from,
double to,
Object tag,
double weight)
Creates a new snap line using the provided attributes.
|
OrthogonalSnapLine(SnapLineOrientation orientation,
SnapLineSnapTypes snapType,
ResourceKey resourceKey,
PointD coordinates,
Object tag,
double weight)
Creates a new snap line using the provided attributes.
|
Modifier and Type | Method and Description |
---|---|
SnapLineOrientation |
getOrientation()
The orientation of the snap line.
|
getCoordinates, getFrom, getResourceKey, getSnapType, getTag, getTo, getWeight, setFrom, setTo
public OrthogonalSnapLine(SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, double from, double to, Object tag, double weight)
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.from
- The smaller value of the coordinate that delimits this snap line.to
- The greater value of the coordinate that delimits this 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 OrthogonalSnapLine(SnapLineOrientation orientation, SnapLineSnapTypes snapType, ResourceKey resourceKey, PointD coordinates, Object tag, double weight)
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 SnapLineOrientation getOrientation()
This is one of SnapLineOrientation.HORIZONTAL
or SnapLineOrientation.VERTICAL
.