- All Superinterfaces:
Figure,PropertyBean,StyleableBean,StyleablePropertyBean,TreeNode<Figure>
- All Known Subinterfaces:
LayeredDrawing,ViewBoxableDrawing
- All Known Implementing Classes:
AbstractDrawing,AbstractViewBoxDrawing,SimpleDrawing,SimpleLayeredDrawing
Styling. A drawing can have a style sheet which affects the style of the figures.
Layers. By convention the children of a Drawing must be
Layers. To addChild figures to a drawing, first addChild a layer, and then addChild the figures to the layer.
- Author:
- Werner Randelshofer
-
Property Summary
Properties 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
FieldsModifier and TypeFieldDescriptionstatic final @NonNull NonNullKey<ImmutableList<URI>> Holds a list of author stylesheets.static final @NonNull NullableCssColorStyleableKeyDefines the canvas color.Specifies the home address of all relative URLs used in a drawing.static final @NonNull CssSizeStyleableKeyDefines the height of the canvas.static final @NonNull NonNullKey<ImmutableList<String>> Holds a list of inline stylesheets.static final StringThe CSS type selector for a label object is "Drawing".static final @NonNull NonNullKey<ImmutableList<URI>> Holds a list of user agent stylesheets.static final @NonNull CssSizeStyleableKeyDefines the width of the canvas.Fields inherited from interface org.jhotdraw8.draw.figure.Figure
declaredAndInheritedKeys, JHOTDRAW_CSS_PREFIX, PARENT_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionGets the style manager of the drawing.default voidPerforms one layout pass over the entire drawing.default voidlayoutAll(@NonNull RenderContext ctx, boolean parallel) Performs one layout pass over the entire drawing.Returns all figures in topological order according to their layout dependencies.default voidvoidUpdates the stylesheets in the style manager.Methods 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, getLocalToParent, getLocalToWorld, getParent, getParentToLocal, getParentToWorld, getPreferredAspectRatio, getPropertyChangeListeners, getReadOnlyLayoutObservers, getRoot, getStyleableParent, getSupportedKeys, getVisualBounds, getVisualBoundsInWorld, getWorldToLocal, getWorldToParent, hasPropertyChangeListeners, invalidateTransforms, 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, removeLayoutSubject, reshapeInLocal, reshapeInLocal, reshapeInLocal, reshapeInLocal, reshapeInParent, setParent, stylesheetChanged, transformChanged, transformInLocal, transformInParent, translateInLocal, translateInParent, updateCss, 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, idPropertyMethods inherited from interface org.jhotdraw8.fxbase.styleable.StyleablePropertyBean
containsMapAccessor, getStyled, getStyled, getStyledNonNull, remove, removeAll, resetStyledValues, setStyledMethods 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
-
DOCUMENT_HOME
Specifies the home address of all relative URLs used in a drawing.This property is not styleable.
-
AUTHOR_STYLESHEETS
Holds a list of author stylesheets. If the value is null, then no stylesheets are used.Supports the following data types for list entries:
- URI. The URI points to a CSS file. If the URI is relative, then it is
relative to
DOCUMENT_HOME. - String. The String contains a CSS as a literal.
This property is not styleable.
- URI. The URI points to a CSS file. If the URI is relative, then it is
relative to
-
USER_AGENT_STYLESHEETS
Holds a list of user agent stylesheets. If the value is null, then no stylesheets are used.- URI. The URI points to a CSS file. If the URI is relative, then it is
relative to
DOCUMENT_HOME. - String. The String contains a CSS as a literal.
This property is not styleable.
- URI. The URI points to a CSS file. If the URI is relative, then it is
relative to
-
INLINE_STYLESHEETS
Holds a list of inline stylesheets. If the value is null, then no stylesheets are used.This property is not styleable.
-
WIDTH
Defines the width of the canvas. -
HEIGHT
Defines the height of the canvas. -
BACKGROUND
Defines the canvas color.A drawing typically renders a rectangle with the dimensions given by
WIDTHandHEIGHTand fills it with theBACKGROUNDpaint.This property is styleable with the key
Figure.JHOTDRAW_CSS_PREFIX+"background". -
TYPE_SELECTOR
The CSS type selector for a label object is "Drawing".- See Also:
-
-
Method Details
-
getTypeSelector
- Specified by:
getTypeSelectorin interfaceStyleableBean
-
getStyleManager
@Nullable StylesheetsManager<Figure> getStyleManager()Gets the style manager of the drawing.- Returns:
- the style manager
-
updateStyleManager
void updateStyleManager()Updates the stylesheets in the style manager. -
layoutAll
Performs one layout pass over the entire drawing.This method lays out figures that do not depend on the layout of other figures first, and then lays out figures that depend on them, until all figures are laid out once. Circular dependencies are broken up deterministically.
- Parameters:
ctx- the render context
-
layoutAll
Performs one layout pass over the entire drawing.This method lays out figures that do not depend on the layout of other figures first, and then lays out figures that depend on them, until all figures are laid out once. Circular dependencies are broken up deterministically.
- Parameters:
ctx- the render contextparallel- performs the layout in parallel or sequentially
-
updateAllCss
-
layoutDependenciesIterable
Returns all figures in topological order according to their layout dependencies. Independent figures come first.- Returns:
- figures in topological order according to layout dependencies
-