Interface LiveEditor

All Superinterfaces:
DiagramCanvasExt
All Known Implementing Classes:
DiagramCanvas

public interface LiveEditor extends DiagramCanvasExt
Inline text editing support for class names, field names, and comment text on the canvas.
  • Method Details

    • editSelectionStyle

      default void editSelectionStyle(boolean alternative)
      Opens or applies editing for the selection style.
      Parameters:
      alternative - whether alternative is enabled
    • getStyleObject

      default Object getStyleObject(SelectedElement selectedElement, boolean alternative)
      Returns the style object on the active canvas.
      Parameters:
      selectedElement - selected element to read or update
      alternative - whether alternative is enabled
      Returns:
      the style object
    • renameSelection

      default void renameSelection(boolean alternative)
      Renames the selection.
      Parameters:
      alternative - whether alternative is enabled
    • invokeStyleEditingElement

      default void invokeStyleEditingElement(LiveEditElement element)
      Starts inline style editing for the selected element.
      Parameters:
      element - element value used by the operation
    • invokeRenamingElement

      default void invokeRenamingElement(LiveEditElement element)
      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

      default void applyLiveEditContext(LiveEditContext ctx)
      Applies the live edit context on the active canvas.
      Parameters:
      ctx - ctx value used by the operation
    • buildClassContext

      default LiveEditContext buildClassContext(LiveEditElement e)
      Builds a class context.
      Parameters:
      e - event object supplied by Swing
      Returns:
      the built class context
    • buildClassFieldContext

      default LiveEditContext buildClassFieldContext(LiveEditElement e)
      Builds a class field context.
      Parameters:
      e - event object supplied by Swing
      Returns:
      the built class field context
    • buildCommentContext

      default LiveEditContext buildCommentContext(LiveEditElement e)
      Builds a comment context.
      Parameters:
      e - event object supplied by Swing
      Returns:
      the built comment context
    • buildLinkCardinalityContext

      default LiveEditContext buildLinkCardinalityContext(LiveEditElement e)
      Builds a link cardinality context.
      Parameters:
      e - event object supplied by Swing
      Returns:
      the built link cardinality context
    • buildLinkLabelContext

      default LiveEditContext buildLinkLabelContext(LiveEditElement e)
      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:
      true if live editing element is enabled or applies; otherwise false
    • cancelLiveEditElement

      default void cancelLiveEditElement()
      Checks whether this object can cel live edit element on the active canvas.
    • revertStyleObject

      default void revertStyleObject(LiveEditElement liveEditElement)
      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 value
      alternative - whether alternative is enabled
    • applyStyle

      default void applyStyle(StylePalette palette, LiveEditElement liveEditElement)
      Applies the style on the active canvas.
      Parameters:
      palette - palette value used by the operation
      liveEditElement - live edit element value used by the operation
    • createRenamingField

      default LiveEditComponents createRenamingField()
      Creates a renaming field.
      Returns:
      the created renaming field