- All Superinterfaces:
Figure,PropertyBean,StyleableBean,StyleablePropertyBean,TreeNode<Figure>
- All Known Implementing Classes:
PageFigure
Defines a page layout for printing.
The layout may be used for multiple pages, for example for continuous form paper.
The parent of a page must be a Layer. A page may have children.
- 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 List<javafx.print.Paper> List of all available papers.Fields inherited from interface org.jhotdraw8.draw.figure.Figure
declaredAndInheritedKeys, JHOTDRAW_CSS_PREFIX, PARENT_PROPERTY -
Method Summary
Modifier and TypeMethodDescription@NonNull javafx.scene.NodecreatePageNode(int internalPageNumber) Returns a node which will be placed on the paper.default javafx.print.PapercreatePaper(int internalPageNumber) Creates a paper for the specified page.intReturns the number of sub-pages defined by this page.@NonNull javafx.geometry.BoundsgetPageBounds(int internalPageNumber) Returns the bounds for the page content.@NonNull javafx.scene.shape.ShapegetPageClip(int internalPageNumber) Returns the clip for the page content.javafx.scene.transform.TransformgetPageTransform(int internalPageNumber) Returns a transform which will position the drawing contents inside the clip on the page.Returns the paper size.default booleanWhether children may be added to this figure.default booleanisSuitableParent(@NonNull Figure newParent) This method returns whether the provided figure is a suitable parent for this figure.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, isDecomposable, isDeletable, isDeletWithLastLayoutSubject, isEditable, isEditableKey, isGroupReshapeableWith, isLayoutable, isSelectable, isShowing, isSuitableChild, 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, getTypeSelector, 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
-
PAPERS
List of all available papers.
-
-
Method Details
-
createPageNode
Returns a node which will be placed on the paper.- Parameters:
internalPageNumber- the internal page number- Returns:
- a new node
-
createPaper
default javafx.print.Paper createPaper(int internalPageNumber) Creates a paper for the specified page.- Parameters:
internalPageNumber- the internal page number- Returns:
- the internal page number
-
getNumberOfSubPages
int getNumberOfSubPages()Returns the number of sub-pages defined by this page.- Returns:
- number of internal pages
-
getPageBounds
Returns the bounds for the page content.- Parameters:
internalPageNumber- the internal page number- Returns:
- the clipping region
-
getPageClip
Returns the clip for the page content.- Parameters:
internalPageNumber- the internal page number- Returns:
- the clipping region
-
getPageTransform
javafx.scene.transform.Transform getPageTransform(int internalPageNumber) Returns a transform which will position the drawing contents inside the clip on the page.- Parameters:
internalPageNumber- the internal page number- Returns:
- the transform
-
getPaperSize
CssDimension2D getPaperSize()Returns the paper size.- Returns:
- the page size
-
isAllowsChildren
default boolean isAllowsChildren()Description copied from interface:FigureWhether children may be added to this figure.- Specified by:
isAllowsChildrenin interfaceFigure- Returns:
- true if getChildren are allowed
-
isSuitableParent
Description copied from interface:FigureThis method returns whether the provided figure is a suitable parent for this figure.- Specified by:
isSuitableParentin interfaceFigure- Specified by:
isSuitableParentin interfaceTreeNode<Figure>- Parameters:
newParent- The new parent figure.- Returns:
- true if
newParentis an acceptable parent
-