- All Superinterfaces:
Figure,PropertyBean,StyleableBean,StyleablePropertyBean,TransformCachingFigure,TreeNode<Figure>
- All Known Implementing Classes:
AbstractLabelConnectionFigure,ArcFigure,BezierPathFigure,CombinedPathFigure,EllipseFigure,GroupFigure,ImageFigure,LabelFigure,LineFigure,PageFigure,PageLabelFigure,PolygonFigure,PolylineFigure,RectangleFigure,RegionFigure,SimpleLabelConnectionFigure,SliceFigure,TextAreaFigure,TextFigure
The following transformations are supported:
- Translation of the local bounds of the figure.
- Rotation around the center of the untransformed local bounds of the figure.
- Scaling around the center of the untransformed local bounds of the figure.
- Arbitrary sequence of affine transformations of the figure.
- 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 booleanstatic final @NonNull DoubleStyleableKeyDefines the angle of rotation around the rotation pivot of the figure in degrees.static final @NonNull NonNullObjectKey<javafx.geometry.Point3D> Defines the rotation axis used.static final @NonNull CssPoint2DStyleableKeyDefines the pivot of the rotation.static final @NonNull Scale3DStyleableMapAccessorDefines the scale factor by which coordinates are scaled on the axes about the center of the figure.static final @NonNull DoubleStyleableKeyDefines the scale factor by which coordinates are scaled on the x axis about the center of the figure.static final @NonNull DoubleStyleableKeyDefines the scale factor by which coordinates are scaled on the y axis about the center of the figure.static final @NonNull DoubleStyleableKeyDefines the scale factor by which coordinates are scaled on the z axis about the center of the figure.static final @NonNull TransformListStyleableKeystatic final @NonNull Point3DStyleableMapAccessorDefines the translation on the axes about the center of the figure.static final @NonNull DoubleStyleableKeyDefines the translation on the x axis about the center of the figure.static final @NonNull DoubleStyleableKeyDefines the translation on the y axis about the center of the figure.static final @NonNull DoubleStyleableKeyDefines the translation on the z axis about the center of the figure.Fields inherited from interface org.jhotdraw8.draw.figure.Figure
declaredAndInheritedKeys, JHOTDRAW_CSS_PREFIX, PARENT_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptiondefault voidapplyTransformableFigureProperties(@NonNull RenderContext ctx, @NonNull javafx.scene.Node node) Updates a figure node with all transformation properties defined in this interface.default voiddefault voiddefault @NonNull javafx.scene.transform.Transformdefault @NonNull javafx.scene.transform.TransformReturns the transformation from local coordinates into parent coordinates.default @NonNull javafx.scene.transform.TransformgetLocalToParent(boolean styled) getLocalToParentAsList(boolean styled) default @NonNull javafx.scene.transform.TransformReturns the transformation from parent coordinates into local coordinates.default @NonNull javafx.scene.transform.TransformgetParentToLocal(boolean styled) default @NonNull javafx.scene.transform.TransformGets theTRANSFORMSflattened into a single transform.default booleandefault voidreshapeInLocal(javafx.scene.transform.Transform transform) Attempts to change the local bounds of the figure.default voidreshapeInParent(@NonNull javafx.scene.transform.Transform transform) Attempts to change the parent bounds of the figure.default voidsetTransforms(@NonNull javafx.scene.transform.Transform... transforms) Convenience method for setting a new value for theTRANSFORMSproperty.default voidtransformInLocal(@NonNull javafx.scene.transform.Transform t) Attempts to transform the figure.default voidtransformInParent(@NonNull javafx.scene.transform.Transform t) Attempts to transform the 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, 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, removeLayoutSubject, reshapeInLocal, reshapeInLocal, reshapeInLocal, setParent, stylesheetChanged, transformChanged, 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.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
-
Field Details
-
CACHE
static final boolean CACHE- See Also:
-
ROTATE
Defines the angle of rotation around the rotation pivot of the figure in degrees.Default value:
0. -
ROTATION_PIVOT
Defines the pivot of the rotation.Default value:
0.5, 0.5. -
ROTATION_AXIS
Defines the rotation axis used.Default value:
Rotate.Z_AXIS. -
SCALE_X
Defines the scale factor by which coordinates are scaled on the x axis about the center of the figure. Default value:1. -
SCALE_Y
Defines the scale factor by which coordinates are scaled on the y axis about the center of the figure. Default value:1. -
SCALE_Z
Defines the scale factor by which coordinates are scaled on the z axis about the center of the figure. Default value:1. -
SCALE
Defines the scale factor by which coordinates are scaled on the axes about the center of the figure. -
TRANSFORMS
-
TRANSLATE_X
Defines the translation on the x axis about the center of the figure. Default value:0. -
TRANSLATE_Y
Defines the translation on the y axis about the center of the figure. Default value:0. -
TRANSLATE_Z
Defines the translation on the z axis about the center of the figure. Default value:0. -
TRANSLATE
Defines the translation on the axes about the center of the figure.
-
-
Method Details
-
getDeclaredKeys
-
applyTransformableFigureProperties
default void applyTransformableFigureProperties(@NonNull RenderContext ctx, @NonNull javafx.scene.Node node) Updates a figure node with all transformation properties defined in this interface.Applies the following properties:
TRANSFORM, translationTRANSLATE_X,TRANSLATE_Y,TRANSLATE_Z, scaleSCALE_X,SCALE_Y,SCALE_Z, and rotationROTATE,ROTATION_AXIS.This method is intended to be used by
Figure.updateNode(org.jhotdraw8.draw.render.RenderContext, javafx.scene.Node).- Parameters:
ctx- the render contextnode- a node which was created with methodFigure.createNode(org.jhotdraw8.draw.render.RenderContext).
-
clearTransforms
default void clearTransforms() -
flattenTransforms
default void flattenTransforms() -
getInverseTransform
-
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
-
getLocalToParent
-
getLocalToParentAsList
-
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
-
getParentToLocal
-
getTransform
Gets theTRANSFORMSflattened into a single transform.- Returns:
- the flattened transforms
-
hasCenterTransforms
default boolean hasCenterTransforms() -
reshapeInLocal
default 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- Parameters:
transform- the desired transformation in local coordinates
-
reshapeInParent
Description copied from interface:FigureAttempts to change the parent bounds of the figure.The figure may choose to only partially change its parent bounds.
This method may also call
reshapeInLocalon child figures.- Specified by:
reshapeInParentin interfaceFigure- Parameters:
transform- the desired transformation in parent coordinates
-
setTransforms
Convenience method for setting a new value for theTRANSFORMSproperty.- Parameters:
transforms- new value
-
transformInLocal
Description copied from interface:FigureAttempts to transform the figure.The figure may choose to only partially change its transformation.
- Specified by:
transformInLocalin interfaceFigure- Parameters:
t- the desired transformation in local coordinates
-
transformInParent
Description copied from interface:FigureAttempts to transform the figure.The figure may choose to only partially change its transformation.
- Specified by:
transformInParentin interfaceFigure- Parameters:
t- the desired transformation in parent coordinates
-