N
- The type of visual used by this handle. Needs to be a sub-type of
Node
.public abstract class AbstractSegmentHandlePart<N extends javafx.scene.Node> extends AbstractHandlePart<N> implements java.lang.Comparable<AbstractSegmentHandlePart<? extends javafx.scene.Node>>
AbstractSegmentHandlePart
is bound to a segment of a poly-bezier
handle geometry, represented by an array of BezierCurve
s. The
segmentIndex of the AbstractSegmentHandlePart
identifies that segment
(0, 1, 2, ...). The segmentParameter specifies the position of this handle
part on the segment (0 = start, 0.5 = mid, 1 = end).active, adaptable, adapters, anchoragesUnmodifiable, anchoredsUnmodifiable, childrenUnmodifiable, parent, refreshVisual
anchoragesUnmodifiable, anchoredsUnmodifiable, childrenUnmodifiable, parent, refreshVisual
adapters
adaptable
active
IAdaptable.Bound<A extends IAdaptable>
IAdaptable.Bound.Impl<T extends IAdaptable>
ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTY
ADAPTERS_PROPERTY
ACTIVE_PROPERTY
Constructor and Description |
---|
AbstractSegmentHandlePart() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AbstractSegmentHandlePart<? extends javafx.scene.Node> o) |
void |
doRefreshVisual(N visual)
Refreshes this part's visualization based on this part's content.
|
protected BezierCurve |
getBezierSegmentInParent()
Returns the
BezierCurve at which this handle part is anchored
(depending on segment index), or null if that
BezierCurve cannot be determined. |
protected javafx.scene.paint.Color |
getConnectedFill()
Returns the
Color that is used to fill connected handles. |
protected javafx.scene.paint.Color |
getInsertFill()
Returns the
Color that is used to fill insertion handles. |
protected javafx.scene.paint.Color |
getMoveFill()
Returns the
Color that is used to fill movement handles. |
protected Point |
getPosition(BezierCurve segment)
Returns the position of this
AbstractSegmentHandlePart on the
given segment using the segment parameter that is assigned to this part. |
int |
getSegmentCount()
Returns the number of segments that are provided to this part.
|
int |
getSegmentIndex()
The segmentIndex specifies the segment of the IGeometry provided by the
handle geometry provider on which this selection handle part is
positioned.
|
double |
getSegmentParameter()
The segmentParameter is a value between 0 and 1.
|
protected BezierCurve[] |
getSegmentsInScene()
Returns the
BezierCurve s that are provided to this part in the
coordinate system of the Scene . |
protected javafx.scene.paint.Color |
getStroke()
Returns the
Color that is used to stroke handles. |
void |
setSegmentIndex(int segmentIndex)
Sets the segment index and refreshes the visual.
|
void |
setSegmentParameter(double segmentParameter)
Sets the segment parameter and refreshes the visual.
|
void |
setSegmentsProvider(Provider<BezierCurve[]> segmentsProvider)
Sets the
Provider<BezierCurve[]> for this part to the
given value. |
protected void |
updateLocation(N visual)
Computes the location for this part and relocates its visual to that
location.
|
doAddChildVisual, doAttachToAnchorageVisual, doDetachFromAnchorageVisual, doRemoveChildVisual
activate, activateAdapters, activateChildren, activeProperty, adaptableProperty, adaptersProperty, addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, deactivate, deactivateAdapters, deactivateChildren, detachAnchored, detachFromAnchorage, detachFromAnchorage, determineViewer, dispose, doActivate, doCreateVisual, doDeactivate, getAdaptable, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getRoot, getVisual, isActive, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, register, registerAtVisualPartMap, removeChild, removeChildren, reorderChild, setAdaptable, setAdapter, setAdapter, setAdapter, setAdapter, setParent, setRefreshVisual, unregister, unregisterFromVisualPartMap, unsetAdapter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenUnmodifiableProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getHandlers, getParent, getPolicies, getRoot, getViewer, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setParent, setRefreshVisual
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapter
adaptableProperty, getAdaptable, setAdaptable
activate, activeProperty, deactivate, isActive
dispose
public int compareTo(AbstractSegmentHandlePart<? extends javafx.scene.Node> o)
compareTo
in interface java.lang.Comparable<AbstractSegmentHandlePart<? extends javafx.scene.Node>>
public void doRefreshVisual(N visual)
AbstractVisualPart
doRefreshVisual
in class AbstractVisualPart<N extends javafx.scene.Node>
visual
- This part's visual.protected BezierCurve getBezierSegmentInParent()
BezierCurve
at which this handle part is anchored
(depending on segment index), or null
if that
BezierCurve
cannot be determined.BezierCurve
at which this handle part is anchored, or
null
if that BezierCurve
cannot be
determined.protected javafx.scene.paint.Color getConnectedFill()
Color
that is used to fill connected handles.Color
that is used to fill connected handles.protected javafx.scene.paint.Color getInsertFill()
Color
that is used to fill insertion handles.Color
that is used to fill insertion handles.protected javafx.scene.paint.Color getMoveFill()
Color
that is used to fill movement handles.Color
that is used to fill movement handles.protected Point getPosition(BezierCurve segment)
AbstractSegmentHandlePart
on the
given segment using the segment parameter that is assigned to this part.segment
- The BezierCurve
on which the position is evaluated.public int getSegmentCount()
public int getSegmentIndex()
IShape.getOutlineSegments()
method.
For a curve geometry, segments are determined by the
ICurve.toBezier()
method.
The exact position on the segment is specified by the
segmentParameter
.public double getSegmentParameter()
protected BezierCurve[] getSegmentsInScene()
BezierCurve
s that are provided to this part in the
coordinate system of the Scene
.BezierCurve
s that are provided to this part in the
coordinate system of the Scene
.protected javafx.scene.paint.Color getStroke()
Color
that is used to stroke handles.Color
that is used to stroke handles.public void setSegmentIndex(int segmentIndex)
segmentIndex
- The segment index to set.getSegmentIndex()
public void setSegmentParameter(double segmentParameter)
segmentParameter
- The segment parameter to set.getSegmentParameter()
public void setSegmentsProvider(Provider<BezierCurve[]> segmentsProvider)
Provider<BezierCurve[]>
for this part to the
given value.segmentsProvider
- The new Provider<BezierCurve[]>
for this
part.protected void updateLocation(N visual)
visual
- This part's visual for convenience.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.