- All Implemented Interfaces:
Drawing,Figure,TransformCachingFigure,ViewBoxableDrawing,PropertyBean,StyleableBean,StyleablePropertyBean,TreeNode<Figure>
- Direct Known Subclasses:
SimpleDrawing,SimpleLayeredDrawing
ViewBoxableDrawing.-
Property Summary
Properties 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.Drawing
AUTHOR_STYLESHEETS, BACKGROUND, DOCUMENT_HOME, HEIGHT, INLINE_STYLESHEETS, TYPE_SELECTOR, USER_AGENT_STYLESHEETS, WIDTHFields inherited from interface org.jhotdraw8.draw.figure.Figure
declaredAndInheritedKeys, JHOTDRAW_CSS_PREFIX, PARENT_PROPERTYFields inherited from interface org.jhotdraw8.draw.figure.TransformCachingFigure
CACHEFields inherited from interface org.jhotdraw8.draw.figure.ViewBoxableDrawing
VIEW_BOX, VIEW_BOX_X, VIEW_BOX_Y -
Constructor Summary
ConstructorsConstructorDescriptionAbstractViewBoxDrawing(double width, double height) AbstractViewBoxDrawing(CssSize width, CssSize height) -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.transform.TransformReturns the transformation from local coordinates into parent coordinates.javafx.scene.transform.TransformReturns the transformation from parent coordinates into local coordinates.voidupdateNode(RenderContext ctx, javafx.scene.Node n) This method is invoked by aRenderContext, when it needs to update the node which represents the scene graph in the figure.Methods inherited from class org.jhotdraw8.draw.figure.AbstractDrawing
createNode, createStyleManager, getCssLayoutBounds, getLayoutBounds, getStyleManager, isSuitableParent, reshapeInLocal, reshapeInLocal, stylesheetChanged, updateBackground, updateStyleManagerMethods inherited from class org.jhotdraw8.draw.figure.AbstractCompositeFigure
firePropertyChangeEvent, firePropertyChangeEvent, getBoundsInLocal, getChildren, getLayoutBoundsInParent, isAllowsChildrenMethods inherited from class org.jhotdraw8.draw.figure.AbstractFigure
addedToDrawing, createKeyMap, doAddedToDrawing, doRemovedFromDrawing, getCachedLocalToParent, getCachedLocalToWorld, getCachedParentToLocal, getCachedParentToWorld, getCachedWorldToLocal, getCachedWorldToParent, getDrawing, getLayoutObservers, getPropertyChangeListeners, getReadOnlyLayoutObservers, getStyledNonNull, hasPropertyChangeListeners, onPropertyChanged, parentProperty, removeAllLayoutSubjects, removedFromDrawing, removeLayoutSubject, 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.Drawing
getStyleManager, getTypeSelector, layoutAll, layoutAll, layoutDependenciesIterable, updateAllCss, updateStyleManagerMethods inherited from interface org.jhotdraw8.draw.figure.Figure
addChild, addedToDrawing, createHandles, createNode, disconnect, firePropertyChangeEvent, firePropertyChangeEvent, getBoundsInLocal, 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, isDeletable, isDeletWithLastLayoutSubject, isEditable, isEditableKey, isGroupReshapeableWith, isLayoutable, isSelectable, isShowing, isSuitableChild, isSuitableParent, isSupportedKey, isVisible, layout, layoutChanged, layoutObserverChanged, layoutSubjectChanged, localToParent, localToWorld, localToWorld, parentProperty, propertyChanged, removeAllLayoutSubjects, removeChild, removedFromDrawing, removeFromParent, removeLayoutSubject, reshapeInLocal, reshapeInLocal, reshapeInLocal, reshapeInLocal, reshapeInParent, setParent, stylesheetChanged, transformChanged, transformInLocal, transformInParent, translateInLocal, translateInParent, updateCss, 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, 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
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
-
Constructor Details
-
AbstractViewBoxDrawing
public AbstractViewBoxDrawing() -
AbstractViewBoxDrawing
public AbstractViewBoxDrawing(double width, double height) -
AbstractViewBoxDrawing
-
-
Method Details
-
getLocalToParent
public javafx.scene.transform.Transform getLocalToParent()Description copied from interface:FigureReturns the transformation from local coordinates into parent coordinates.This method may use caching and return incorrect results if the cache is stale.
- Specified by:
getLocalToParentin interfaceFigure- Returns:
- the transformation
-
getParentToLocal
public javafx.scene.transform.Transform getParentToLocal()Description copied from interface:FigureReturns the transformation from parent coordinates into local coordinates.This method may use caching and return incorrect results if the cache is stale.
- Specified by:
getParentToLocalin interfaceFigure- Returns:
- the transformation
-
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(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 classAbstractDrawing- Parameters:
ctx- the render contextn- the node which was created withFigure.createNode(org.jhotdraw8.draw.render.RenderContext)
-