- All Implemented Interfaces:
CompositableFigure,ConnectingFigure,Figure,HideableFigure,LineConnectingFigure,LockableFigure,MarkerEndableFigure,MarkerFillableFigure,MarkerStartableFigure,NonTransformableFigure,PathIterableFigure,StrokableFigure,StrokeCuttableFigure,StyleableFigure,TransformCachingFigure,PropertyBean,StyleableBean,StyleablePropertyBean,TreeNode<Figure>
- Author:
- Werner Randelshofer
-
Property Summary
Properties inherited from class org.jhotdraw8.draw.figure.AbstractLineConnectionFigure
connectedProperties inherited from class org.jhotdraw8.draw.figure.AbstractFigure
parentProperties inherited from interface org.jhotdraw8.draw.figure.StyleableFigure
id -
Nested Class Summary
Nested classes/interfaces inherited from interface org.jhotdraw8.fxbase.tree.TreeNode
TreeNode.AncestorIterator<T extends TreeNode<T>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CSS type selector for this object is "LineConnectionWithMarkers".Fields inherited from class org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
keyMaps, propertiesFields inherited from interface org.jhotdraw8.draw.figure.CompositableFigure
BLEND_MODE, EFFECT, OPACITYFields inherited from interface org.jhotdraw8.draw.figure.Figure
declaredAndInheritedKeys, JHOTDRAW_CSS_PREFIX, PARENT_PROPERTYFields inherited from interface org.jhotdraw8.draw.figure.HideableFigure
VISIBLEFields inherited from interface org.jhotdraw8.draw.figure.LineConnectingFigure
END, END_CONNECTOR, END_TARGET, END_X, END_Y, START, START_CONNECTOR, START_TARGET, START_X, START_YFields inherited from interface org.jhotdraw8.draw.figure.LockableFigure
LOCKEDFields inherited from interface org.jhotdraw8.draw.figure.MarkerEndableFigure
MARKER_END_SCALE_FACTOR, MARKER_END_SHAPEFields inherited from interface org.jhotdraw8.draw.figure.MarkerFillableFigure
MARKER_FILL, MARKER_FILL_RULEFields inherited from interface org.jhotdraw8.draw.figure.MarkerStartableFigure
MARKER_START_SCALE_FACTOR, MARKER_START_SHAPEFields inherited from interface org.jhotdraw8.draw.figure.StrokableFigure
STROKE, STROKE_DASH_ARRAY, STROKE_DASH_OFFSET, STROKE_LINE_CAP, STROKE_LINE_JOIN, STROKE_MITER_LIMIT, STROKE_STYLE, STROKE_TYPE, STROKE_WIDTHFields inherited from interface org.jhotdraw8.draw.figure.StrokeCuttableFigure
STROKE_CUT, STROKE_CUT_END, STROKE_CUT_STARTFields inherited from interface org.jhotdraw8.draw.figure.StyleableFigure
ID, PSEUDO_CLASS, STYLE, STYLE_CLASS, TYPE_SELECTOR_NODE_KEYFields inherited from interface org.jhotdraw8.draw.figure.TransformCachingFigure
CACHE -
Constructor Summary
ConstructorsConstructorDescriptionLineConnectionWithMarkersFigure(double startX, double startY, double endX, double endY) LineConnectionWithMarkersFigure(@NonNull javafx.geometry.Point2D start, @NonNull javafx.geometry.Point2D end) -
Method Summary
Modifier and TypeMethodDescriptiondouble@Nullable ImmutableList<javafx.scene.shape.PathElement> double@Nullable ImmutableList<javafx.scene.shape.PathElement> double@Nullable ImmutableList<javafx.scene.shape.PathElement> doubledoubleprotected voidupdateEndMarkerNode(@NonNull RenderContext ctx, @NonNull javafx.scene.shape.Path node) This method can be overridden by a subclass to apply styles to the marker node.protected voidupdateLineNode(@NonNull RenderContext ctx, @NonNull javafx.scene.shape.Line node) This method can be overridden by a subclass to apply styles to the line node.voidupdateNode(@NonNull RenderContext ctx, @NonNull javafx.scene.Node node) This method is invoked by aRenderContext, when it needs to update the node which represents the scene graph in the figure.protected voidupdateStartMarkerNode(@NonNull RenderContext ctx, @NonNull javafx.scene.shape.Path node) This method can be overridden by a subclass to apply styles to the marker node.Methods inherited from class org.jhotdraw8.draw.figure.AbstractStraightLineConnectionWithMarkersFigure
createHandles, createNode, getPathIterator, layout, translateInLocal, updateMarkerNodeMethods inherited from class org.jhotdraw8.draw.figure.AbstractLineConnectionFigure
connectedProperty, doAddedToDrawing, doRemovedFromDrawing, getCssLayoutBounds, getLayoutSubjects, isConnected, isLayoutable, onPropertyChanged, removeAllLayoutSubjects, removeLayoutSubject, reshapeInLocal, reshapeInLocal, setEndConnection, setStartConnection, updateConnectedPropertyMethods inherited from class org.jhotdraw8.draw.figure.AbstractLeafFigure
getChildren, isAllowsChildren, isSuitableChild, isSuitableParentMethods inherited from class org.jhotdraw8.draw.figure.AbstractFigure
addedToDrawing, createKeyMap, getCachedLocalToParent, getCachedLocalToWorld, getCachedParentToLocal, getCachedParentToWorld, getCachedWorldToLocal, getCachedWorldToParent, getDrawing, getLayoutObservers, getPropertyChangeListeners, getReadOnlyLayoutObservers, getStyledNonNull, hasPropertyChangeListeners, parentProperty, removedFromDrawing, setCachedLocalToParent, setCachedLocalToWorld, setCachedParentToLocal, setCachedParentToWorld, setCachedWorldToLocal, setCachedWorldToParent, updateCssMethods inherited from class org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
callObservers, containsMapAccessor, getProperties, getStyleableMap, getStyled, getStyled, remove, removeAll, resetStyledValues, setStyledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.draw.figure.CompositableFigure
applyCompositableFigurePropertiesMethods inherited from interface org.jhotdraw8.draw.figure.ConnectingFigure
canConnectMethods inherited from interface org.jhotdraw8.draw.figure.Figure
addChild, addedToDrawing, createHandles, createNode, disconnect, firePropertyChangeEvent, firePropertyChangeEvent, getBoundsInParent, getBoundsInWorld, getCenterInLocal, getCenterInParent, getChildren, getCssLayoutBounds, getDrawing, getLayer, getLayoutBounds, getLayoutBoundsInParent, getLayoutBoundsInWorld, getLayoutObservers, getLayoutSubjects, getParent, getPreferredAspectRatio, getPropertyChangeListeners, getReadOnlyLayoutObservers, getRoot, getStyleableParent, getSupportedKeys, getVisualBounds, getVisualBoundsInWorld, hasPropertyChangeListeners, isAllowsChildren, isDecomposable, isDeletWithLastLayoutSubject, isEditableKey, isGroupReshapeableWith, isLayoutable, isShowing, isSuitableChild, isSuitableParent, isSupportedKey, isVisible, layout, layoutChanged, layoutObserverChanged, layoutSubjectChanged, localToParent, localToWorld, localToWorld, parentProperty, propertyChanged, removeAllLayoutSubjects, removeChild, removedFromDrawing, removeLayoutSubject, reshapeInLocal, reshapeInLocal, reshapeInLocal, setParent, stylesheetChanged, transformChanged, translateInLocal, translateInParent, updateCss, worldToLocal, worldToLocal, worldToParent, worldToParentMethods inherited from interface org.jhotdraw8.draw.figure.HideableFigure
applyHideableFigurePropertiesMethods inherited from interface org.jhotdraw8.draw.figure.LineConnectingFigure
getEndTargetPoint, getStartTargetPoint, isEndConnected, isStartConnectedMethods inherited from interface org.jhotdraw8.draw.figure.LockableFigure
isDeletable, isEditable, isSelectableMethods inherited from interface org.jhotdraw8.draw.figure.MarkerFillableFigure
applyMarkerFillableFigurePropertiesMethods inherited from interface org.jhotdraw8.draw.figure.NonTransformableFigure
getLocalToParent, getParentToLocal, reshapeInParent, transformInLocal, transformInParentMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
get, getNonNull, getProperties, getProperty, put, remove, set, setNonNull, valueAtMethods inherited from interface org.jhotdraw8.draw.figure.StrokableFigure
applyStrokableFigureProperties, applyStrokeCapAndJoinProperties, applyStrokeColorProperties, applyStrokeDashProperties, applyStrokeTypeProperties, applyStrokeWidthProperties, getBoundsInLocal, getStyledStrokeMethods inherited from interface org.jhotdraw8.draw.figure.StrokeCuttableFigure
getStrokeCutEnd, getStrokeCutStartMethods inherited from interface org.jhotdraw8.draw.figure.StyleableFigure
applyStyleableFigureProperties, getId, getPseudoClassStates, getStyle, getStyleClasses, idPropertyMethods inherited from interface org.jhotdraw8.fxbase.styleable.StyleablePropertyBean
containsMapAccessor, getStyled, getStyled, getStyledNonNull, remove, removeAll, resetStyledValues, setStyledMethods inherited from interface org.jhotdraw8.draw.figure.TransformCachingFigure
getCachedLocalToParent, getCachedLocalToWorld, getCachedParentToLocal, getCachedParentToWorld, getCachedWorldToLocal, getCachedWorldToParent, getLocalToWorld, getParentToWorld, getWorldToLocal, getWorldToParent, invalidateTransforms, setCachedLocalToParent, setCachedLocalToWorld, setCachedParentToLocal, setCachedParentToWorld, setCachedWorldToLocal, setCachedWorldToParentMethods inherited from interface org.jhotdraw8.fxbase.tree.TreeNode
ancestorIterable, breadthFirstIterable, depthFirstIterable, dumpTree, dumpTree, getAncestor, getChild, getDepth, getFirstChild, getLastChild, getMaxDepth, getPath, postorderIterable, preorderIterable, preorderSpliterator
-
Field Details
-
TYPE_SELECTOR
The CSS type selector for this object is "LineConnectionWithMarkers".- See Also:
-
-
Constructor Details
-
LineConnectionWithMarkersFigure
public LineConnectionWithMarkersFigure() -
LineConnectionWithMarkersFigure
-
LineConnectionWithMarkersFigure
public LineConnectionWithMarkersFigure(double startX, double startY, double endX, double endY)
-
-
Method Details
-
getTypeSelector
- Specified by:
getTypeSelectorin interfaceStyleableBean
-
updateEndMarkerNode
protected void updateEndMarkerNode(@NonNull RenderContext ctx, @NonNull javafx.scene.shape.Path node) Description copied from class:AbstractStraightLineConnectionWithMarkersFigureThis method can be overridden by a subclass to apply styles to the marker node.- Overrides:
updateEndMarkerNodein classAbstractStraightLineConnectionWithMarkersFigure- Parameters:
ctx- the contextnode- the node
-
updateLineNode
Description copied from class:AbstractStraightLineConnectionWithMarkersFigureThis method can be overridden by a subclass to apply styles to the line node.- Overrides:
updateLineNodein classAbstractStraightLineConnectionWithMarkersFigure- Parameters:
ctx- the contextnode- the node
-
updateNode
Description copied from interface:FigureThis method is invoked by aRenderContext, when it needs to update the node which represents the scene graph in the figure.A figure which is composed from child figures, must addChild the nodes of its getChildren to its node. This ensures that coordinate space transformations of the composed figure are properly propagated to its getChildren.
public void updateNode(@NonNull RenderContext rc, Node n) { ObservableList<Node> group = ((Group) n).getChildren(); group.clear(); for (Figure child : children()) { group.addChild(rc.getNode(child)); }A figure may be shown in multiple
RenderContexts. EachRenderContextuses this method to update the a JavaFX node for the figure.Note that the figure must retrieve the JavaFX node from other figures from the render context by invoking
rc.getNode(child)rather than creating new nodes usingchild.createNode(rc). This convention allows to implement a cache in the render context for the Java FX node. Also, render contexts like a drawing view need to associate input events on Java FX nodes to the corresponding figure.This figure does not keep track of changes that require node updates.
DrawingModelto manage node updates.- Specified by:
updateNodein interfaceFigure- Overrides:
updateNodein classAbstractStraightLineConnectionWithMarkersFigure- Parameters:
ctx- the render contextnode- the node which was created withFigure.createNode(org.jhotdraw8.draw.render.RenderContext)
-
updateStartMarkerNode
protected void updateStartMarkerNode(@NonNull RenderContext ctx, @NonNull javafx.scene.shape.Path node) Description copied from class:AbstractStraightLineConnectionWithMarkersFigureThis method can be overridden by a subclass to apply styles to the marker node.- Overrides:
updateStartMarkerNodein classAbstractStraightLineConnectionWithMarkersFigure- Parameters:
ctx- the contextnode- the node
-
getMarkerEndScaleFactor
public double getMarkerEndScaleFactor()- Specified by:
getMarkerEndScaleFactorin interfaceMarkerEndableFigure- Specified by:
getMarkerEndScaleFactorin classAbstractStraightLineConnectionWithMarkersFigure
-
getMarkerEndShape
- Specified by:
getMarkerEndShapein interfaceMarkerEndableFigure- Specified by:
getMarkerEndShapein classAbstractStraightLineConnectionWithMarkersFigure
-
getMarkerStartScaleFactor
public double getMarkerStartScaleFactor()- Specified by:
getMarkerStartScaleFactorin interfaceMarkerStartableFigure- Specified by:
getMarkerStartScaleFactorin classAbstractStraightLineConnectionWithMarkersFigure
-
getMarkerStartShape
- Specified by:
getMarkerStartShapein interfaceMarkerStartableFigure- Specified by:
getMarkerStartShapein classAbstractStraightLineConnectionWithMarkersFigure
-
getStrokeCutEnd
- Specified by:
getStrokeCutEndin classAbstractStraightLineConnectionWithMarkersFigure
-
getStrokeCutStart
- Specified by:
getStrokeCutStartin classAbstractStraightLineConnectionWithMarkersFigure
-
getMarkerCenterShape
- Specified by:
getMarkerCenterShapein classAbstractStraightLineConnectionWithMarkersFigure
-
getMarkerCenterScaleFactor
public double getMarkerCenterScaleFactor()- Specified by:
getMarkerCenterScaleFactorin classAbstractStraightLineConnectionWithMarkersFigure
-