- All Implemented Interfaces:
Figure,TransformCachingFigure,PropertyBean,StyleableBean,StyleablePropertyBean,TreeNode<Figure>
- Direct Known Subclasses:
AbstractCompositeFigure,AbstractLeafFigure
- Author:
- Werner Randelshofer
-
Property Summary
PropertiesProperties 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.TransformCachingFigure
CACHE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddedToDrawing(Drawing drawing) This method callsdoAddedToDrawing(org.jhotdraw8.draw.figure.Drawing).protected voiddoAddedToDrawing(Drawing drawing) This method is called byFigure.addedToDrawing(org.jhotdraw8.draw.figure.Drawing).protected voiddoRemovedFromDrawing(Drawing drawing) This method is called byremovedFromDrawing(org.jhotdraw8.draw.figure.Drawing).@Nullable javafx.scene.transform.Transform@Nullable javafx.scene.transform.Transform@Nullable javafx.scene.transform.Transform@Nullable javafx.scene.transform.Transform@Nullable javafx.scene.transform.Transform@Nullable javafx.scene.transform.Transformfinal @Nullable DrawingReturns the ancestor Drawing.Returns all figures which observe the layout of this figure.CopyOnWriteArrayList<org.jhotdraw8.base.event.Listener<FigurePropertyChangeEvent>> List of property change listeners.<T> TgetStyledNonNull(NonNullMapAccessor<T> key) booleanWhether this figure has property change listeners.protected <T> voidonPropertyChanged(Key<T> key, T oldValue, T newValue, boolean wasAdded, boolean wasRemoved) Overrides of this method must call super!javafx.beans.property.ObjectProperty<Figure> The parent figure.voidThis implementation is empty.final voidremovedFromDrawing(Drawing drawing) This method callsdoAddedToDrawing(org.jhotdraw8.draw.figure.Drawing).voidremoveLayoutSubject(Figure connectedFigure) This implementation is empty.voidsetCachedLocalToParent(@Nullable javafx.scene.transform.Transform newValue) voidsetCachedLocalToWorld(@Nullable javafx.scene.transform.Transform newValue) voidsetCachedParentToLocal(@Nullable javafx.scene.transform.Transform newValue) voidsetCachedParentToWorld(@Nullable javafx.scene.transform.Transform newValue) voidsetCachedWorldToLocal(@Nullable javafx.scene.transform.Transform newValue) voidsetCachedWorldToParent(@Nullable javafx.scene.transform.Transform newValue) voidupdateCss(RenderContext ctx) Updates the stylesheet cache of this figure depending on its property values and on the and the property values of its ancestors.Methods 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.Figure
addChild, createHandles, createNode, disconnect, firePropertyChangeEvent, firePropertyChangeEvent, getBoundsInLocal, getBoundsInParent, getBoundsInWorld, getCenterInLocal, getCenterInParent, getChildren, getCssLayoutBounds, getLayer, getLayoutBounds, getLayoutBoundsInParent, getLayoutBoundsInWorld, getLayoutSubjects, getLocalToParent, getParent, getParentToLocal, getPreferredAspectRatio, getRoot, getStyleableParent, getSupportedKeys, getVisualBounds, getVisualBoundsInWorld, isAllowsChildren, isDecomposable, isDeletable, isDeletWithLastLayoutSubject, isEditable, isEditableKey, isGroupReshapeableWith, isLayoutable, isSelectable, isShowing, isSuitableChild, isSuitableParent, isSupportedKey, isVisible, layout, layoutChanged, layoutObserverChanged, layoutSubjectChanged, localToParent, localToWorld, localToWorld, propertyChanged, removeChild, removeFromParent, reshapeInLocal, reshapeInLocal, reshapeInLocal, reshapeInLocal, reshapeInParent, setParent, stylesheetChanged, transformChanged, transformInLocal, transformInParent, translateInLocal, translateInParent, updateNode, worldToLocal, worldToLocal, worldToParent, worldToParentMethods 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, remove, removeAll, resetStyledValues, setStyledMethods inherited from interface org.jhotdraw8.draw.figure.TransformCachingFigure
getLocalToWorld, getParentToWorld, getWorldToLocal, getWorldToParent, invalidateTransformsMethods 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
-
parent
- Specified by:
parentPropertyin interfaceFigure- Returns:
- the parent property, with
getBean()returning this figure, andgetName()returningPARENT_PROPERTY. - See Also:
-
-
Constructor Details
-
AbstractFigure
public AbstractFigure()
-
-
Method Details
-
createKeyMap
- Overrides:
createKeyMapin classAbstractStyleablePropertyBean
-
addedToDrawing
This method callsdoAddedToDrawing(org.jhotdraw8.draw.figure.Drawing).- Specified by:
addedToDrawingin interfaceFigure- Parameters:
drawing- the drawing
-
doAddedToDrawing
This method is called byFigure.addedToDrawing(org.jhotdraw8.draw.figure.Drawing). The implementation of this class is empty.- Parameters:
drawing- the drawing
-
doRemovedFromDrawing
This method is called byremovedFromDrawing(org.jhotdraw8.draw.figure.Drawing). The implementation of this class is empty.- Parameters:
drawing- the drawing
-
getDrawing
Description copied from interface:FigureReturns the ancestor Drawing.- Specified by:
getDrawingin interfaceFigure- Returns:
- the drawing or null if no ancestor is a drawing. Returns this, if this figure is a drawing.
-
getLayoutObservers
Description copied from interface:FigureReturns all figures which observe the layout of this figure.When the layout of this figure changes, then the layout of the observers figures must be updated.
The update strategy is implemented in
DrawingModel.DrawingModeobserves state changes in figures and updates dependent figures.DrawingModelcan coalesce multiple state changes of an observed figure into a smaller number of layout calls on the observers.DrawingModelcan also detect cyclic layout dependencies and prevent endless update loops.This set must be synchronized, because it is accessed by other figures, when there properties are changed.
- Specified by:
getLayoutObserversin interfaceFigure- Returns:
- a list of dependent figures
-
getReadOnlyLayoutObservers
- Specified by:
getReadOnlyLayoutObserversin interfaceFigure
-
getPropertyChangeListeners
public CopyOnWriteArrayList<org.jhotdraw8.base.event.Listener<FigurePropertyChangeEvent>> getPropertyChangeListeners()Description copied from interface:FigureList of property change listeners.- Specified by:
getPropertyChangeListenersin interfaceFigure- Returns:
- a list of property change listeners
-
hasPropertyChangeListeners
public boolean hasPropertyChangeListeners()Description copied from interface:FigureWhether this figure has property change listeners.- Specified by:
hasPropertyChangeListenersin interfaceFigure- Returns:
- true if this figure has property change listeners
-
parentProperty
Description copied from interface:FigureThe parent figure.If this figure has not been added as a child to another figure, then this variable will be null.
By convention the parent is set exclusively by a composite figure on its child figures. The composite figure sets parent to itself on a child immediately after the child figure has been added to the composite figure. The composite figure sets parent tonullon a child immediately after the child figure has been removed from the composite figure.- Specified by:
parentPropertyin interfaceFigure- Returns:
- the
parentproperty
-
removeAllLayoutSubjects
public void removeAllLayoutSubjects()This implementation is empty.- Specified by:
removeAllLayoutSubjectsin interfaceFigure
-
removeLayoutSubject
This implementation is empty.- Specified by:
removeLayoutSubjectin interfaceFigure- Parameters:
connectedFigure- the connected figure
-
removedFromDrawing
This method callsdoAddedToDrawing(org.jhotdraw8.draw.figure.Drawing).- Specified by:
removedFromDrawingin interfaceFigure- Parameters:
drawing- the drawing from which this figure has been removed
-
getCachedLocalToWorld
public @Nullable javafx.scene.transform.Transform getCachedLocalToWorld()- Specified by:
getCachedLocalToWorldin interfaceTransformCachingFigure
-
setCachedLocalToWorld
public void setCachedLocalToWorld(@Nullable javafx.scene.transform.Transform newValue) - Specified by:
setCachedLocalToWorldin interfaceTransformCachingFigure
-
getCachedWorldToParent
public @Nullable javafx.scene.transform.Transform getCachedWorldToParent()- Specified by:
getCachedWorldToParentin interfaceTransformCachingFigure
-
setCachedWorldToParent
public void setCachedWorldToParent(@Nullable javafx.scene.transform.Transform newValue) - Specified by:
setCachedWorldToParentin interfaceTransformCachingFigure
-
getCachedParentToLocal
public @Nullable javafx.scene.transform.Transform getCachedParentToLocal()- Specified by:
getCachedParentToLocalin interfaceTransformCachingFigure
-
setCachedParentToLocal
public void setCachedParentToLocal(@Nullable javafx.scene.transform.Transform newValue) - Specified by:
setCachedParentToLocalin interfaceTransformCachingFigure
-
getCachedLocalToParent
public @Nullable javafx.scene.transform.Transform getCachedLocalToParent()- Specified by:
getCachedLocalToParentin interfaceTransformCachingFigure
-
setCachedLocalToParent
public void setCachedLocalToParent(@Nullable javafx.scene.transform.Transform newValue) - Specified by:
setCachedLocalToParentin interfaceTransformCachingFigure
-
getCachedWorldToLocal
public @Nullable javafx.scene.transform.Transform getCachedWorldToLocal()- Specified by:
getCachedWorldToLocalin interfaceTransformCachingFigure
-
setCachedWorldToLocal
public void setCachedWorldToLocal(@Nullable javafx.scene.transform.Transform newValue) - Specified by:
setCachedWorldToLocalin interfaceTransformCachingFigure
-
getCachedParentToWorld
public @Nullable javafx.scene.transform.Transform getCachedParentToWorld()- Specified by:
getCachedParentToWorldin interfaceTransformCachingFigure
-
setCachedParentToWorld
public void setCachedParentToWorld(@Nullable javafx.scene.transform.Transform newValue) - Specified by:
setCachedParentToWorldin interfaceTransformCachingFigure
-
updateCss
Description copied from interface:FigureUpdates the stylesheet cache of this figure depending on its property values and on the and the property values of its ancestors.This figure does not keep track of changes that require CSS updates. Use a
DrawingModelto manage CSS updates. -
onPropertyChanged
protected <T> void onPropertyChanged(Key<T> key, T oldValue, T newValue, boolean wasAdded, boolean wasRemoved) Overrides of this method must call super!- Overrides:
onPropertyChangedin classAbstractStyleablePropertyBean- 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)
-
getStyledNonNull
- Specified by:
getStyledNonNullin interfaceStyleablePropertyBean
-