Package lu.kbra.modelizer_next.ui.canvas
Interface LiveEditor
- All Superinterfaces:
DiagramCanvasExt
- All Known Implementing Classes:
DiagramCanvas
Inline text editing support for class names, field names, and comment text on the canvas.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidApplies the live edit context on the active canvas.default voidapplyStyle(StylePalette palette, LiveEditElement liveEditElement) Applies the style on the active canvas.default LiveEditContextBuilds a class context.default LiveEditContextBuilds a class field context.default LiveEditContextBuilds a comment context.default LiveEditContextBuilds a link cardinality context.default LiveEditContextBuilds a link label context.default voidChecks whether this object can cel live edit element on the active canvas.default voidconfirmRenamingElement(int nextDir, boolean alternative) Confirms whether the renaming element should continue on the active canvas.default LiveEditComponentsCreates a renaming field.default voideditSelectionStyle(boolean alternative) Opens or applies editing for the selection style.default ObjectgetStyleObject(SelectedElement selectedElement, boolean alternative) Returns the style object on the active canvas.default voidinvokeRenamingElement(LiveEditElement element) Starts inline renaming for the selected element.default voidinvokeStyleEditingElement(LiveEditElement element) Starts inline style editing for the selected element.default booleanChecks whether live editing element is enabled or applies on the active canvas.default voidrenameSelection(boolean alternative) Renames the selection.default voidrevertStyleObject(LiveEditElement liveEditElement) Restores the edited element style from a previously captured style object.default voidUpdates the live edit layout.default voidUpdates the live edit preview on the active canvas.Methods inherited from interface lu.kbra.modelizer_next.ui.canvas.DiagramCanvasExt
getCanvas, getDocument, getFrame, getPanelType
-
Method Details
-
editSelectionStyle
default void editSelectionStyle(boolean alternative) Opens or applies editing for the selection style.- Parameters:
alternative- whether alternative is enabled
-
getStyleObject
Returns the style object on the active canvas.- Parameters:
selectedElement- selected element to read or updatealternative- whether alternative is enabled- Returns:
- the style object
-
renameSelection
default void renameSelection(boolean alternative) Renames the selection.- Parameters:
alternative- whether alternative is enabled
-
invokeStyleEditingElement
Starts inline style editing for the selected element.- Parameters:
element- element value used by the operation
-
invokeRenamingElement
Starts inline renaming for the selected element.- Parameters:
element- element value used by the operation
-
updateLiveEditLayout
default void updateLiveEditLayout()Updates the live edit layout. -
updateLiveEditPreview
default void updateLiveEditPreview()Updates the live edit preview on the active canvas. -
applyLiveEditContext
Applies the live edit context on the active canvas.- Parameters:
ctx- ctx value used by the operation
-
buildClassContext
Builds a class context.- Parameters:
e- event object supplied by Swing- Returns:
- the built class context
-
buildClassFieldContext
Builds a class field context.- Parameters:
e- event object supplied by Swing- Returns:
- the built class field context
-
buildCommentContext
Builds a comment context.- Parameters:
e- event object supplied by Swing- Returns:
- the built comment context
-
buildLinkCardinalityContext
Builds a link cardinality context.- Parameters:
e- event object supplied by Swing- Returns:
- the built link cardinality context
-
buildLinkLabelContext
Builds a link label context.- Parameters:
e- event object supplied by Swing- Returns:
- the built link label context
-
isLiveEditingElement
default boolean isLiveEditingElement()Checks whether live editing element is enabled or applies on the active canvas.- Returns:
trueif live editing element is enabled or applies; otherwisefalse
-
cancelLiveEditElement
default void cancelLiveEditElement()Checks whether this object can cel live edit element on the active canvas. -
revertStyleObject
Restores the edited element style from a previously captured style object.- Parameters:
liveEditElement- live edit element value used by the operation
-
confirmRenamingElement
default void confirmRenamingElement(int nextDir, boolean alternative) Confirms whether the renaming element should continue on the active canvas.- Parameters:
nextDir- numeric next dir valuealternative- whether alternative is enabled
-
applyStyle
Applies the style on the active canvas.- Parameters:
palette- palette value used by the operationliveEditElement- live edit element value used by the operation
-
createRenamingField
Creates a renaming field.- Returns:
- the created renaming field
-