N
- The type of visual used by this handle. Needs to be a sub-type of
Node
.public abstract class AbstractFXSegmentHandlePart<N extends javafx.scene.Node> extends AbstractFXHandlePart<N> implements java.lang.Comparable<AbstractFXSegmentHandlePart<? extends javafx.scene.Node>>
AbstractFXSegmentHandlePart
is bound to a segment of a poly-bezier
handle geometry, represented by an array of BezierCurve
s. The
segmentIndex of the AbstractFXSegmentHandlePart
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, adapters, anchoragesUnmodifiable, anchoredsUnmodifiable, children, parent, refreshVisual
anchoragesUnmodifiable, anchoredsUnmodifiable, children, parent, refreshVisual
adapters
active
IAdaptable.Bound<A extends IAdaptable>
ANCHORAGES_PROPERTY, ANCHOREDS_PROPERTY, CHILDREN_PROPERTY, PARENT_PROPERTY, REFRESH_VISUAL_PROPERTY
ADAPTERS_PROPERTY
ACTIVE_PROPERTY
Constructor and Description |
---|
AbstractFXSegmentHandlePart() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AbstractFXSegmentHandlePart<? 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 Point |
getPosition(BezierCurve segment)
Returns the position of this
AbstractFXSegmentHandlePart 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 . |
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(com.google.inject.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.
|
attachToAnchorageVisual, detachFromAnchorageVisual
addChildVisual, removeChildVisual
activate, activateChildren, activeProperty, adaptersProperty, addChild, addChild, addChildren, addChildren, anchoragesUnmodifiableProperty, anchoredsUnmodifiableProperty, attachAnchored, attachToAnchorage, attachToAnchorage, childrenProperty, createVisual, deactivate, deactivateChildren, detachAnchored, detachFromAnchorage, detachFromAnchorage, determineViewer, dispose, doActivate, doDeactivate, getAdapter, getAdapter, getAdapter, getAdapters, getAdapters, getAdapters, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getParent, getPolicies, getRoot, getViewer, getVisual, isActive, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, register, registerAtVisualPartMap, removeChild, removeChildren, reorderChild, 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, childrenProperty, detachAnchored, detachFromAnchorage, detachFromAnchorage, getAnchoragesUnmodifiable, getAnchoredsUnmodifiable, getBehaviors, getChildrenUnmodifiable, getParent, getPolicies, getRoot, getVisual, isRefreshVisual, parentProperty, refreshVisual, refreshVisualProperty, removeChild, removeChildren, reorderChild, setParent, setRefreshVisual
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapter
activate, activeProperty, deactivate, isActive
dispose
public int compareTo(AbstractFXSegmentHandlePart<? extends javafx.scene.Node> o)
compareTo
in interface java.lang.Comparable<AbstractFXSegmentHandlePart<? extends javafx.scene.Node>>
public void doRefreshVisual(N visual)
AbstractVisualPart
doRefreshVisual
in class AbstractVisualPart<javafx.scene.Node,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 Point getPosition(BezierCurve segment)
AbstractFXSegmentHandlePart
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
.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(com.google.inject.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 itemis AG and others. All rights reserved.