Package lu.kbra.modelizer_next.ui.canvas
Interface NodeLayoutManager
- All Superinterfaces:
DiagramCanvasExt
- All Known Implementing Classes:
DiagramCanvas
Contains node movement and layout update helpers.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidapplyNodeLayout(LayoutObjectType type, String objectId, CopiedNodeLayout copiedLayout, double deltaX, double deltaY) Applies the node layout.default Rectangle2DcomputeClassBounds(ClassModel classModel, NodeLayout layout) Computes the class bounds.default Rectangle2D.DoublecomputeClipboardBounds(ClipboardSnapshot clipboard) Computes the clipboard bounds on the active canvas.default Rectangle2DcomputeCommentBounds(String text, NodeLayout layout) Computes the comment bounds.default Rectangle2D.DoubleexpandBounds(Rectangle2D.Double bounds, double x, double y, double width, double height) Expands the bounds on the active canvas.default NodeLayoutresolveRenderLayout(NodeLayout layout) Resolves the render layout from the current model and layout state.Methods inherited from interface lu.kbra.modelizer_next.ui.canvas.DiagramCanvasExt
getCanvas, getDocument, getFrame, getPanelType
-
Method Details
-
applyNodeLayout
default void applyNodeLayout(LayoutObjectType type, String objectId, CopiedNodeLayout copiedLayout, double deltaX, double deltaY) Applies the node layout.- Parameters:
type- type value that selects the operation modeobjectId- id of the element to read or modifycopiedLayout- layout object to read or modifydeltaX- numeric delta x valuedeltaY- numeric delta y value
-
computeClassBounds
Computes the class bounds.- Parameters:
classModel- class model affected by the operationlayout- layout object to read or update- Returns:
- the compute class bounds result
-
computeClipboardBounds
Computes the clipboard bounds on the active canvas.- Parameters:
clipboard- clipboard value used by the operation- Returns:
- the compute clipboard bounds result
-
computeCommentBounds
Computes the comment bounds.- Parameters:
text- text to display or editlayout- layout object to read or update- Returns:
- the compute comment bounds result
-
expandBounds
default Rectangle2D.Double expandBounds(Rectangle2D.Double bounds, double x, double y, double width, double height) Expands the bounds on the active canvas.- Parameters:
bounds- bounds used for layout or hit testingx- x coordinatey- y coordinatewidth- width valueheight- height value- Returns:
- the expand bounds result
-
resolveRenderLayout
Resolves the render layout from the current model and layout state.- Parameters:
layout- layout object to read or update- Returns:
- the resolved render layout
-