java.lang.Object
org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
org.jhotdraw8.draw.figure.AbstractFigure
org.jhotdraw8.draw.figure.AbstractLeafFigure
org.jhotdraw8.draw.figure.AbstractLineConnectionFigure
- All Implemented Interfaces:
ConnectingFigure,Figure,LineConnectingFigure,NonTransformableFigure,TransformCachingFigure,PropertyBean,StyleableBean,StyleablePropertyBean,TreeNode<Figure>
- Direct Known Subclasses:
AbstractElbowLineConnectionWithMarkersFigure,AbstractPathConnectionWithMarkersFigure,AbstractStraightLineConnectionWithMarkersFigure,LineConnectionFigure
public abstract class AbstractLineConnectionFigure
extends AbstractLeafFigure
implements NonTransformableFigure, LineConnectingFigure
Base class for line connection figure.
- Author:
- Werner Randelshofer
-
Property Summary
PropertiesProperties inherited from class org.jhotdraw8.draw.figure.AbstractFigure
parentProperties inherited from interface org.jhotdraw8.fxbase.styleable.StyleableBean
id -
Nested Class Summary
Nested classes/interfaces inherited from interface org.jhotdraw8.fxbase.tree.TreeNode
TreeNode.AncestorIterator<T extends TreeNode<T>> -
Field Summary
Fields inherited from class org.jhotdraw8.fxbase.styleable.AbstractStyleablePropertyBean
keyMaps, propertiesFields inherited from interface org.jhotdraw8.draw.figure.Figure
declaredAndInheritedKeys, JHOTDRAW_CSS_PREFIX, PARENT_PROPERTYFields 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.TransformCachingFigure
CACHE -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLineConnectionFigure(double startX, double startY, double endX, double endY) AbstractLineConnectionFigure(javafx.geometry.Point2D start, javafx.geometry.Point2D end) -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ReadOnlyBooleanWrappervoiddoAddedToDrawing(Drawing drawing) This method is called byFigure.addedToDrawing(org.jhotdraw8.draw.figure.Drawing).protected voiddoRemovedFromDrawing(Drawing drawing) This method is called byAbstractFigure.removedFromDrawing(org.jhotdraw8.draw.figure.Drawing).Returns all figures which are connected by this figure - they provide to the layout of this figure.booleanbooleanWhether thelayoutmethod of this figure does anything.protected <T> voidonPropertyChanged(Key<T> key, @Nullable T oldValue, @Nullable T newValue, boolean wasAdded, boolean wasRemoved) Overrides of this method must call super!voidThis implementation is empty.voidremoveLayoutSubject(Figure subject) This implementation is empty.voidreshapeInLocal(javafx.scene.transform.Transform transform) Attempts to change the local bounds of the figure.voidreshapeInLocal(CssSize x, CssSize y, CssSize width, CssSize height) Attempts to change the local bounds of the figure.voidsetEndConnection(Figure target, Connector connector) voidsetStartConnection(Figure target, Connector connector) protected voidMethods 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.ConnectingFigure
canConnectMethods inherited from interface org.jhotdraw8.draw.figure.Figure
addChild, addedToDrawing, createHandles, createNode, disconnect, firePropertyChangeEvent, firePropertyChangeEvent, getBoundsInLocal, getBoundsInParent, getBoundsInWorld, getCenterInLocal, getCenterInParent, getChildren, getDrawing, getLayer, getLayoutBounds, getLayoutBoundsInParent, getLayoutBoundsInWorld, getLayoutObservers, getParent, getPreferredAspectRatio, getPropertyChangeListeners, getReadOnlyLayoutObservers, getRoot, getStyleableParent, getSupportedKeys, getVisualBounds, getVisualBoundsInWorld, hasPropertyChangeListeners, isAllowsChildren, isDecomposable, isDeletable, isDeletWithLastLayoutSubject, isEditable, isEditableKey, isGroupReshapeableWith, isSelectable, isShowing, isSuitableChild, isSuitableParent, isSupportedKey, isVisible, layout, layoutChanged, layoutObserverChanged, layoutSubjectChanged, localToParent, localToWorld, localToWorld, parentProperty, propertyChanged, removeChild, removedFromDrawing, removeFromParent, reshapeInLocal, reshapeInLocal, setParent, stylesheetChanged, transformChanged, translateInLocal, translateInParent, updateCss, updateNode, worldToLocal, worldToLocal, worldToParent, worldToParentMethods inherited from interface org.jhotdraw8.draw.figure.LineConnectingFigure
getEndTargetPoint, getStartTargetPoint, isEndConnected, isStartConnectedMethods 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.fxbase.styleable.StyleableBean
getId, getPseudoClassStates, getStyle, getStyleClasses, getTypeSelector, 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
-
Property Details
-
connected
public javafx.beans.property.ReadOnlyBooleanWrapper connectedProperty- See Also:
-
-
Constructor Details
-
AbstractLineConnectionFigure
public AbstractLineConnectionFigure() -
AbstractLineConnectionFigure
public AbstractLineConnectionFigure(javafx.geometry.Point2D start, javafx.geometry.Point2D end) -
AbstractLineConnectionFigure
public AbstractLineConnectionFigure(double startX, double startY, double endX, double endY)
-
-
Method Details
-
onPropertyChanged
protected <T> void onPropertyChanged(Key<T> key, @Nullable T oldValue, @Nullable T newValue, boolean wasAdded, boolean wasRemoved) Description copied from class:AbstractFigureOverrides of this method must call super!- Overrides:
onPropertyChangedin classAbstractFigure- Type Parameters:
T- the value type of the property- Parameters:
key- the changed keyoldValue- the old valuenewValue- the new valuewasAdded- whether the value was added (hence oldValue does not matter)wasRemoved- whether the value was removed (hence newValue does not matter)
-
doAddedToDrawing
Description copied from class:AbstractFigureThis method is called byFigure.addedToDrawing(org.jhotdraw8.draw.figure.Drawing). The implementation of this class is empty.- Overrides:
doAddedToDrawingin classAbstractFigure- Parameters:
drawing- the drawing
-
doRemovedFromDrawing
Description copied from class:AbstractFigureThis method is called byAbstractFigure.removedFromDrawing(org.jhotdraw8.draw.figure.Drawing). The implementation of this class is empty.- Overrides:
doRemovedFromDrawingin classAbstractFigure- Parameters:
drawing- the drawing
-
getCssLayoutBounds
- Specified by:
getCssLayoutBoundsin interfaceFigure
-
getLayoutSubjects
Returns all figures which are connected by this figure - they provide to the layout of this figure.- Specified by:
getLayoutSubjectsin interfaceFigure- Returns:
- an unmodifiable set of connected figures
-
isConnected
public boolean isConnected() -
isLayoutable
public boolean isLayoutable()Description copied from interface:FigureWhether thelayoutmethod of this figure does anything.The default implementation returns false.
- Specified by:
isLayoutablein interfaceFigure- Returns:
- true if the
layoutmethod is not empty.
-
removeAllLayoutSubjects
public void removeAllLayoutSubjects()Description copied from class:AbstractFigureThis implementation is empty.- Specified by:
removeAllLayoutSubjectsin interfaceFigure- Overrides:
removeAllLayoutSubjectsin classAbstractFigure
-
removeLayoutSubject
Description copied from class:AbstractFigureThis implementation is empty.- Specified by:
removeLayoutSubjectin interfaceFigure- Overrides:
removeLayoutSubjectin classAbstractFigure- Parameters:
subject- the connected figure
-
reshapeInLocal
public void reshapeInLocal(javafx.scene.transform.Transform transform) Description copied from interface:FigureAttempts to change the local bounds of the figure.The figure may choose to only partially change its local bounds.
- Specified by:
reshapeInLocalin interfaceFigure- Specified by:
reshapeInLocalin interfaceNonTransformableFigure- Parameters:
transform- the desired transformation in local coordinates
-
reshapeInLocal
Description copied from interface:FigureAttempts to change the local bounds of the figure.See {#link #reshapeInLocal(Transform)} for a description of this method.
This method takes parameters as
CssSizes. This can be used to avoid rounding errors when the figure is reshaped in non-pixel units.This method can forward a call to
Figure.reshapeInLocal(Transform)using the following code:void reshapeInLocal(CssSize x, CssSize y, CssSize width, CssSize height) { Transform tx = Transforms.createReshapeTransform(getCssBoundsInLocal(), x, y, width, height); reshapeInLocal(tx); }- Specified by:
reshapeInLocalin interfaceFigure- Parameters:
x- desired x-position in parent coordinatesy- desired y-position in parent coordinateswidth- desired width in parent coordinates, may be negativeheight- desired height in parent coordinates, may be negative
-
setEndConnection
-
setStartConnection
-
updateConnectedProperty
protected void updateConnectedProperty() -
connectedProperty
public javafx.beans.property.ReadOnlyBooleanWrapper connectedProperty()- Returns:
- the
connectedproperty
-