Package lu.kbra.modelizer_next.ui.canvas
Interface LinkLayoutManager
- All Superinterfaces:
DiagramCanvasExt
- All Known Implementing Classes:
DiagramCanvas
Contains link layout helpers for bends, labels, and association class placement.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidapplyLinkLayout(String linkId, CopiedLinkLayout copiedLayout, double offset) Applies the link layout.default voidapplyLinkLayout(String linkId, CopiedLinkLayout copiedLayout, double deltaX, double deltaY) Applies the link layout.default AnchorSidePairchooseBestConceptualSidePair(String fromClassId, Rectangle2D fromBounds, String toClassId, Rectangle2D toBounds, boolean big) Chooses the best conceptual side pair on the active canvas.default AnchorSidechooseSelfLinkFromSide(String classId) Chooses the self link from side.default AnchorSidechooseTechnicalSelfLinkSide(LinkModel linkModel) Chooses the technical self link side.default doublecomputeConceptualSortValue(String linkId, String classId, AnchorSide side, Map<String, Rectangle2D> boundsByClassId, Map<String, AnchorSidePair> sidePairs) Computes the conceptual sort value on the active canvas.default AnchorPairresolveConceptualAnchorPair(LinkModel targetLink) Resolves the conceptual anchor pair from the current model and layout state.Methods inherited from interface lu.kbra.modelizer_next.ui.canvas.DiagramCanvasExt
getCanvas, getDocument, getFrame, getPanelType
-
Method Details
-
applyLinkLayout
Applies the link layout.- Parameters:
linkId- id of the link to look up or modifycopiedLayout- layout object to read or modifyoffset- numeric offset value
-
applyLinkLayout
default void applyLinkLayout(String linkId, CopiedLinkLayout copiedLayout, double deltaX, double deltaY) Applies the link layout.- Parameters:
linkId- id of the link to look up or modifycopiedLayout- layout object to read or modifydeltaX- numeric delta x valuedeltaY- numeric delta y value
-
chooseBestConceptualSidePair
default AnchorSidePair chooseBestConceptualSidePair(String fromClassId, Rectangle2D fromBounds, String toClassId, Rectangle2D toBounds, boolean big) Chooses the best conceptual side pair on the active canvas.- Parameters:
fromClassId- id of the element to read or modifyfromBounds- bounds used for layout or hit testingtoClassId- id of the element to read or modifytoBounds- bounds used for layout or hit testingbig- whether big is enabled- Returns:
- the choose best conceptual side pair result
-
chooseSelfLinkFromSide
Chooses the self link from side.- Parameters:
classId- id of the class to look up or modify- Returns:
- the choose self link from side result
-
chooseTechnicalSelfLinkSide
Chooses the technical self link side.- Parameters:
linkModel- link model affected by the operation- Returns:
- the choose technical self link side result
-
computeConceptualSortValue
default double computeConceptualSortValue(String linkId, String classId, AnchorSide side, Map<String, Rectangle2D> boundsByClassId, Map<String, AnchorSidePair> sidePairs) Computes the conceptual sort value on the active canvas.- Parameters:
linkId- id of the link to look up or modifyclassId- id of the class to look up or modifyside- node side to inspectboundsByClassId- id of the element to read or modifysidePairs- side pairs value used by the operation- Returns:
- the compute conceptual sort value result
-
resolveConceptualAnchorPair
Resolves the conceptual anchor pair from the current model and layout state.- Parameters:
targetLink- target link value used by the operation- Returns:
- the resolved conceptual anchor pair
-