Package ai.mindconnect.ui.ext.diagram
Class UiDiagramShape
java.lang.Object
ai.mindconnect.ui.ext.diagram.UiDiagramShape
Built-in shape identifiers known to the diagram renderer. These are the
geometric primitives the extension ships handlers for — kept
deliberately narrow and domain-agnostic so the extension stays reusable.
Why constants, not an enum
UiDiagramNode.shape is a plain String, not an enum, so
consumers can register their own shape names at runtime via the
front-end registry (registerShape() in extension.ts).
Closing the type over a Java enum here would force every new shape
into a JAR rebuild even though the rendering side is already plug-able.
Domain-specific shapes
Workflow-flavoured concepts like "decision", "fork", "event-start" are not primitives — they're domain concepts that map onto a primitive plus styling. Those live inmc-workflow-ui-diagram's WorkflowShapes helper, not here.
To render with one of these constants:
var n = new UiDiagramNode();
n.setShape(UiDiagramShape.ROUNDED_RECT);
n.setShapeClass("wf-action");
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThin horizontal (or vertical, depending on aspect ratio) bar.static final StringCircle inscribed in the node's bounding box (uses min(w, h)/2 as radius).static final StringRounded-rect container with the label anchored to its top edge (header band) instead of the centre.static final StringDiamond / rhombus — used for decisions, merges, choice points.static final StringSharp-cornered rectangle.static final StringRectangle with rounded corners. -
Method Summary
-
Field Details
-
ROUNDED_RECT
Rectangle with rounded corners. Generic "block" / "action" look.- See Also:
-
RECT
Sharp-cornered rectangle. Use for tables, raw containers, etc.- See Also:
-
CIRCLE
Circle inscribed in the node's bounding box (uses min(w, h)/2 as radius).- See Also:
-
DIAMOND
Diamond / rhombus — used for decisions, merges, choice points.- See Also:
-
BAR
Thin horizontal (or vertical, depending on aspect ratio) bar. Used for fork / join markers in process notations.- See Also:
-
CONTAINER_WITH_HEADER
Rounded-rect container with the label anchored to its top edge (header band) instead of the centre. Use when the node wraps child nodes — the centre is where the children draw, so a centred label would overlap them. Used for if-branch and foreach-loop containers.- See Also:
-