public class Connection
extends javafx.scene.Group
Connection
is a visual curve, whose appearance is defined
through a single start and end point, and a set of control points, which may
be 'connected', i.e. be attached to an IAnchor
. The exact curve shape
is determined by an IConnectionRouter
, which is responsible of
computing an ICurve
geometry for a given Connection
(which is
then rendered using a GeometryNode
).
Whether the control points are interpreted as way points (that lie on the
curve) or as 'real' control points depends on the
IConnectionInterpolator
. While PolylineInterpolator
and
PolyBezierInterpolator
interpret control points to be way points,
other routers may e.g. interpret them as the control points of a
BezierCurve
.
In addition to the curve shape, the visual appearance of a Connection
can be controlled via start and end decorations. They will be rendered
'on-top' of the curve shape and the curve shape will be properly clipped at
the decorations (so it does not paint through).
Type | Property and Description |
---|---|
protected javafx.beans.property.ReadOnlyMapProperty<AnchorKey,IAnchor> |
anchors
Returns the
ReadOnlyMapProperty which stores the
AnchorKey s and corresponding IAnchor s which determine the
start point, control points, and end point of this Connection . |
javafx.beans.property.ObjectProperty<IConnectionInterpolator> |
interpolator
Returns the
IConnectionInterpolator property. |
javafx.beans.property.ObjectProperty<IConnectionRouter> |
router
Returns a writable property containing the
IConnectionRouter of
this connection. |
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, impl_showMnemonics, impl_treeVisible, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, visible
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CSS_CLASS_DECORATION
CSS class assigned to decoration visuals.
|
Constructor and Description |
---|
Connection()
Constructs a new
Connection whose start and end point are set to
null . |
Modifier and Type | Method and Description |
---|---|
protected void |
addAnchor(IAnchor anchor,
AnchorKey anchorKey,
int controlIndex)
|
void |
addControlAnchor(int index,
IAnchor anchor)
Adds the given
IAnchor as a control point anchor for the given
index into the anchorsProperty() of this Connection . |
void |
addControlPoint(int index,
Point controlPointInLocal)
Adds an
StaticAnchor yielding the given Point as a
control point anchor for the given index into the
anchorsProperty() of this Connection . |
protected javafx.beans.property.ReadOnlyMapProperty<AnchorKey,IAnchor> |
anchorsProperty()
Returns the
ReadOnlyMapProperty which stores the
AnchorKey s and corresponding IAnchor s which determine the
start point, control points, and end point of this Connection . |
protected void |
arrangeDecoration(javafx.scene.shape.Shape decoration,
Point start,
Vector direction)
Arranges the given decoration according to the passed-in values.
|
protected void |
arrangeEndDecoration()
Updates the end decoration of this
Connection . |
protected void |
arrangeStartDecoration()
Updates the start decoration of this
Connection . |
protected javafx.scene.shape.Shape |
clipAtDecoration(javafx.scene.shape.Shape curveClip,
javafx.scene.shape.Shape decoration)
Adjusts the curveClip so that the curve node does not paint through the
given decoration.
|
protected javafx.collections.MapChangeListener<? super AnchorKey,? super Point> |
createPCL(AnchorKey anchorKey)
Creates a position change listener (PCL) which
refreshes this Connection upon anchor position changes
corresponding to the given AnchorKey . |
IAnchor |
getAnchor(int index)
Returns the anchor at the given index.
|
int |
getAnchorIndex(AnchorKey anchorKey)
Returns the anchor index for the given
AnchorKey which is:
0 for the start anchor key
getAnchors() .size() - 1 for the
end anchor key
getControlAnchorIndex(AnchorKey) + 1 for
control point anchor keys
|
AnchorKey |
getAnchorKey(int anchorIndex)
Returns the
AnchorKey for the given anchor index, i.e. the
reverse of getAnchorIndex(AnchorKey) . |
java.util.List<IAnchor> |
getAnchors()
Returns a
List containing the IAnchor s which are assigned
to this Connection in the order: start anchor, control point
anchors, end anchor. |
Point |
getCenter()
Computes the 'logical' center point of the
Connection , which is
the middle control point position (in case the curve consists of an even
number of segment) or the middle point of the middle segment. |
IAnchor |
getControlAnchor(int index)
|
int |
getControlAnchorIndex(AnchorKey key)
Returns the control anchor index for the given
AnchorKey , i.e. |
AnchorKey |
getControlAnchorKey(int index)
Returns the
AnchorKey for the given control anchor index. |
java.util.List<IAnchor> |
getControlAnchors()
|
Point |
getControlPoint(int index)
Returns the control
Point for the given control anchor index
within the coordinate system of this Connection which is
determined by querying the anchor position for the corresponding
control anchor , or null if no
control anchor is assigned for the given
index. |
java.util.List<Point> |
getControlPoints()
|
GeometryNode<ICurve> |
getCurveNode()
Returns the
GeometryNode which displays the curve geometry. |
IAnchor |
getEndAnchor()
|
AnchorKey |
getEndAnchorKey()
Returns the end
AnchorKey for this Connection . |
javafx.scene.Node |
getEndDecoration()
|
Point |
getEndPoint()
Returns the end
Point of this Connection within its
coordinate system which is determined by querying the anchor position for
the end anchor key , or null when
no end anchor is assigned. |
IConnectionInterpolator |
getInterpolator()
Returns the
IConnectionInterpolator of this Connection . |
Point |
getPoint(int index)
Returns the point at the given index.
|
java.util.List<Point> |
getPoints()
Returns the
Point s constituting this Connection within
its coordinate system in the order: start point, control points, end
point. |
IConnectionRouter |
getRouter()
Returns the
IConnectionRouter of this Connection . |
IAnchor |
getStartAnchor()
|
AnchorKey |
getStartAnchorKey()
Returns the start
AnchorKey for this Connection . |
javafx.scene.Node |
getStartDecoration()
|
Point |
getStartPoint()
Returns the start
Point of this Connection within its
coordinate system which is determined by querying the anchor position for
the start anchor key , or null
when no start anchor is assigned. |
javafx.beans.property.ObjectProperty<IConnectionInterpolator> |
interpolatorProperty()
Returns the
IConnectionInterpolator property. |
boolean |
isConnected(int index)
Returns whether the (start, end, or control) anchor at the respective
index is connected.
|
boolean |
isControlConnected(int index)
Returns
true if the currently assigned
control anchor for the given index is
bound to an anchorage. |
boolean |
isEndConnected()
Returns
true if the currently assigned
end anchor is bound to an anchorage. |
boolean |
isStartConnected()
Returns
true if the currently assigned
start anchor is bound to an anchorage. |
protected void |
refresh()
Refreshes the visualization, i.e.
|
void |
removeAllControlAnchors()
Removes all control points of this
Connection . |
void |
removeAllControlPoints()
Removes all control points of this
Connection . |
protected void |
removeAnchor(AnchorKey anchorKey,
IAnchor anchor)
|
void |
removeControlAnchor(int index)
Removes the control anchor specified by the given index from this
Connection . |
void |
removeControlPoint(int index)
Removes the control point specified by the given control anchor index
from this
Connection . |
javafx.beans.property.ObjectProperty<IConnectionRouter> |
routerProperty()
Returns a writable property containing the
IConnectionRouter of
this connection. |
void |
setAnchors(java.util.List<IAnchor> anchors)
|
void |
setControlAnchor(int index,
IAnchor anchor)
Sets the control anchor for the given control anchor index to the given
IAnchor . |
void |
setControlAnchors(java.util.List<IAnchor> anchors)
|
void |
setControlPoint(int index,
Point controlPointInLocal)
Sets the control anchor for the given control anchor index to an
StaticAnchor which yields the given Point . |
void |
setControlPoints(java.util.List<Point> controlPoints)
|
void |
setEndAnchor(IAnchor anchor)
Sets the end
IAnchor of this Connection to the given
value. |
void |
setEndDecoration(javafx.scene.shape.Shape endDeco)
Sets the end decoration
Node of this Connection to the
given value. |
void |
setEndPoint(Point endPointInLocal)
|
void |
setInterpolator(IConnectionInterpolator interpolator)
|
void |
setRouter(IConnectionRouter router)
Sets the
IConnectionRouter of this Connection to the
given value. |
void |
setStartAnchor(IAnchor anchor)
Sets the start
IAnchor of this Connection to the given
value. |
void |
setStartDecoration(javafx.scene.shape.Shape startDeco)
Sets the start decoration
Node of this Connection to the
given value. |
void |
setStartPoint(Point startPointInLocal)
|
autoSizeChildrenProperty, getChildren, impl_computeLayoutBounds, isAutoSizeChildren, layoutChildren, minHeight, minWidth, prefHeight, prefWidth, setAutoSizeChildren
computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBaselineOffset, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_computeContains, impl_computeGeomBounds, impl_createPeer, impl_getAllParentStylesheets, impl_pickNodeLocal, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, impl_updatePeer, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBounds
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClassCssMetaData, getClip, getContentBias, getCssMetaData, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_notifyLayoutBoundsChanged, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, maxHeight, maxWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
protected javafx.beans.property.ReadOnlyMapProperty<AnchorKey,IAnchor> anchorsProperty
ReadOnlyMapProperty
which stores the
AnchorKey
s and corresponding IAnchor
s which determine the
start point, control points, and end point of this Connection
.getAnchors()
,
setAnchors(List)
public javafx.beans.property.ObjectProperty<IConnectionInterpolator> interpolatorProperty
IConnectionInterpolator
property.public javafx.beans.property.ObjectProperty<IConnectionRouter> routerProperty
IConnectionRouter
of
this connection.getRouter()
,
setRouter(IConnectionRouter)
public static final java.lang.String CSS_CLASS_DECORATION
public Connection()
Connection
whose start and end point are set to
null
.protected void addAnchor(IAnchor anchor, AnchorKey anchorKey, int controlIndex)
IAnchor
into the anchorsProperty()
of
this Connection
. The given AnchorKey
is attached to the
IAnchor
. Furthermore, a PCL
for the
AnchorKey
is registered on the position property of the
IAnchor
and the visualization is refreshed
.public void addControlAnchor(int index, IAnchor anchor)
IAnchor
as a control point anchor for the given
index into the anchorsProperty()
of this Connection
.index
- The position where the IAnchor
is inserted within the
control point anchors of this Connection
.anchor
- The IAnchor
which determines the position of the
corresponding control point.public void addControlPoint(int index, Point controlPointInLocal)
StaticAnchor
yielding the given Point
as a
control point anchor for the given index into the
anchorsProperty()
of this Connection
.index
- The position where the IAnchor
is inserted within the
control point anchors of this Connection
.controlPointInLocal
- The position for the specified control point.protected javafx.beans.property.ReadOnlyMapProperty<AnchorKey,IAnchor> anchorsProperty()
ReadOnlyMapProperty
which stores the
AnchorKey
s and corresponding IAnchor
s which determine the
start point, control points, and end point of this Connection
.getAnchors()
,
setAnchors(List)
protected void arrangeDecoration(javafx.scene.shape.Shape decoration, Point start, Vector direction)
decoration
- The decoration Node
to arrange.start
- The offset for the decoration visual.direction
- The direction of the Connection
at the point where the
decoration is arranged.protected void arrangeEndDecoration()
Connection
.protected void arrangeStartDecoration()
Connection
.protected javafx.scene.shape.Shape clipAtDecoration(javafx.scene.shape.Shape curveClip, javafx.scene.shape.Shape decoration)
curveClip
- A shape that represents the clip of the curve node,
interpreted in scene coordinates.decoration
- The decoration to clip the curve node from.protected javafx.collections.MapChangeListener<? super AnchorKey,? super Point> createPCL(AnchorKey anchorKey)
refreshes
this Connection
upon anchor position changes
corresponding to the given AnchorKey
.anchorKey
- The AnchorKey
for which a position change will trigger
a refresh()
with the returned PCL.refresh
this
Connection
when the position for the given
AnchorKey
changes.public IAnchor getAnchor(int index)
index == 0
, the end anchor for the last defined index.
Control anchors will be returned for all indices in between.index
- The index of the anchor to retrieve.public int getAnchorIndex(AnchorKey anchorKey)
AnchorKey
which is:
0
for the start anchor key
getAnchors()
.size() - 1
for the
end anchor key
getControlAnchorIndex(AnchorKey)
+ 1
for
control point anchor keyspublic AnchorKey getAnchorKey(int anchorIndex)
AnchorKey
for the given anchor index, i.e. the
reverse of getAnchorIndex(AnchorKey)
.public java.util.List<IAnchor> getAnchors()
List
containing the IAnchor
s which are assigned
to this Connection
in the order: start anchor, control point
anchors, end anchor.List
containing the IAnchor
s which are assigned
to this Connection
.public Point getCenter()
Connection
, which is
the middle control point position (in case the curve consists of an even
number of segment) or the middle point of the middle segment.Connection
.public IAnchor getControlAnchor(int index)
public int getControlAnchorIndex(AnchorKey key)
AnchorKey
, i.e.
0
for the first control anchor
,
1
for the seconds, etc.key
- The AnchorKey
whose control anchor index is returned.AnchorKey
.java.lang.IllegalArgumentException
- when there currently is no control anchor
assigned to this Connection
for the given
AnchorKey
.public AnchorKey getControlAnchorKey(int index)
AnchorKey
for the given control anchor index.public java.util.List<IAnchor> getControlAnchors()
List
containing the control anchors
currently assigned to this Connection
.public Point getControlPoint(int index)
Point
for the given control anchor index
within the coordinate system of this Connection
which is
determined by querying the anchor position for the corresponding
control anchor
, or null
if no
control anchor
is assigned for the given
index.index
- The control anchor index for which to return the anchor
position.Point
of this Connection
, or
null
.public java.util.List<Point> getControlPoints()
List
containing the control Point
s of this
Connection
.public GeometryNode<ICurve> getCurveNode()
GeometryNode
which displays the curve geometry.GeometryNode
which displays the curve geometry.public AnchorKey getEndAnchorKey()
AnchorKey
for this Connection
. An end
AnchorKey
uses the curve node
as its
anchored and "end"
as its role.AnchorKey
for this Connection
.public javafx.scene.Node getEndDecoration()
Node
of this Connection
, or
null
.public Point getEndPoint()
Point
of this Connection
within its
coordinate system which is determined by querying the anchor position for
the end anchor key
, or null
when
no end anchor
is assigned.Point
of this Connection
, or
null
.public IConnectionInterpolator getInterpolator()
IConnectionInterpolator
of this Connection
.IConnectionInterpolator
of this Connection
.public Point getPoint(int index)
index == 0
, the end point for the last defined index.
Control points will be returned for all indices in between.index
- The index of the point to retrieve.getPoints()
public java.util.List<Point> getPoints()
Point
s constituting this Connection
within
its coordinate system in the order: start point, control points, end
point. They are determined by querying the corresponding anchor
positions. In case not all anchors are assigned, an empty array is
returned.Point
s constituting this Connection
.public IConnectionRouter getRouter()
IConnectionRouter
of this Connection
.IConnectionRouter
of this Connection
.public IAnchor getStartAnchor()
anchor
, or
null
.public AnchorKey getStartAnchorKey()
AnchorKey
for this Connection
. A start
AnchorKey
uses the curve node
as its
anchored and "start"
as its role.AnchorKey
for this Connection
.public javafx.scene.Node getStartDecoration()
Node
of this Connection
, or
null
.public Point getStartPoint()
Point
of this Connection
within its
coordinate system which is determined by querying the anchor position for
the start anchor key
, or null
when no start anchor
is assigned.Point
of this Connection
, or
null
.public javafx.beans.property.ObjectProperty<IConnectionInterpolator> interpolatorProperty()
IConnectionInterpolator
property.public boolean isConnected(int index)
index
- The index, referring to the start, end, or a control point.true
if the anchor at the given index is connected,
false
otherwise.public boolean isControlConnected(int index)
true
if the currently assigned
control anchor
for the given index is
bound to an anchorage. Otherwise returns false
.index
- The control anchor index of the control anchor to test for
connectedness.true
if the currently assigned
control anchor
for the given index
is bound to an anchorage, otherwise false
.public boolean isEndConnected()
true
if the currently assigned
end anchor
is bound to an anchorage. Otherwise
returns false
.true
if the currently assigned
end anchor
is bound to an anchorage,
otherwise false
.public boolean isStartConnected()
true
if the currently assigned
start anchor
is bound to an anchorage.
Otherwise returns false
.true
if the currently assigned
start anchor
is bound to an anchorage,
otherwise false
.protected void refresh()
points
constituting this
Connection
,ICurve
geometry through those Point
s
using the IConnectionRouter
of this Connection
,curve node
with
that ICurve
,start decoration
and
end decoration
of this Connection
.
public void removeAllControlAnchors()
Connection
.public void removeAllControlPoints()
Connection
.public void removeControlAnchor(int index)
Connection
.index
- The index specifying which control anchor to remove.public void removeControlPoint(int index)
Connection
.index
- The control anchor index specifying which control point to
remove.public javafx.beans.property.ObjectProperty<IConnectionRouter> routerProperty()
IConnectionRouter
of
this connection.getRouter()
,
setRouter(IConnectionRouter)
public void setAnchors(java.util.List<IAnchor> anchors)
anchors
of this Connection
with the given IAnchor
s, i.e. the first given IAnchor
replaces the currently assigned start anchor, the last given
IAnchor
replaces the currently assigned end anchor, and the
intermediate IAnchor
s replace the currently assigned control
anchors.anchors
- The new IAnchor
s for this Connection
.java.lang.IllegalArgumentException
- when less than 2 IAnchor
s are given.public void setControlAnchor(int index, IAnchor anchor)
IAnchor
.index
- The control anchor index of the control anchor to replace.anchor
- The new control IAnchor
for that index.public void setControlAnchors(java.util.List<IAnchor> anchors)
anchors
- The new control IAnchor
s for this Connection
.public void setControlPoint(int index, Point controlPointInLocal)
StaticAnchor
which yields the given Point
.index
- The control anchor index of the control anchor to replace.controlPointInLocal
- The new control Point
for that index.public void setControlPoints(java.util.List<Point> controlPoints)
controlPoints
- The new control Point
s for this Connection
.public void setEndAnchor(IAnchor anchor)
IAnchor
of this Connection
to the given
value.anchor
- The new end IAnchor
for this Connection
.public void setEndDecoration(javafx.scene.shape.Shape endDeco)
Node
of this Connection
to the
given value.endDeco
- The new end decoration Node
for this
Connection
.public void setEndPoint(Point endPointInLocal)
endPointInLocal
- The new end Point
for this Connection
.public void setInterpolator(IConnectionInterpolator interpolator)
interpolator
- The new IConnectionInterpolator
for this
Connection
.public void setRouter(IConnectionRouter router)
IConnectionRouter
of this Connection
to the
given value.router
- The new IConnectionRouter
for this Connection
.public void setStartAnchor(IAnchor anchor)
IAnchor
of this Connection
to the given
value.anchor
- The new start IAnchor
for this Connection
.public void setStartDecoration(javafx.scene.shape.Shape startDeco)
Node
of this Connection
to the
given value.startDeco
- The new start decoration Node
for this
Connection
.public void setStartPoint(Point startPointInLocal)
startPointInLocal
- The new start Point
for this Connection
.Copyright (c) 2014 itemis AG and others. All rights reserved.