Class CommonTextActions

java.lang.Object
com.iizigo.text.CommonTextActions
All Implemented Interfaces:
EventListener, CaretListener, SWTEventListener

public class CommonTextActions extends Object implements CaretListener
Common text actions in the KString editors.
Author:
Christopher Mindus
  • Field Details

    • showRichText

      public final PartAction showRichText
      The common actions.
    • insertImage

      public final PartAction insertImage
      The common actions.
    • insertTextIDTag

      public final PartAction insertTextIDTag
      The common actions.
    • insertTextVSTag

      public final PartAction insertTextVSTag
      The common actions.
    • entryText

      public final PartAction entryText
      The common actions.
    • entryTextTag

      public final PartAction entryTextTag
      The common actions.
    • entryHTML

      public final PartAction entryHTML
      The common actions.
    • entryHTMLTag

      public final PartAction entryHTMLTag
      The common actions.
  • Constructor Details

    • CommonTextActions

      public CommonTextActions(Shell shell, ModuleModel model, TextTableEditor editor, IVSAccessor vsAccessor, EditorTextTable defaultTextTable, IPropUndoRedo undoRedo, Boolean useTags)
      Constructor.
      Parameters:
      shell - The shell.
      model - The Module model.
      editor - The editor for table direct editing, can be null.
      vsAccessor - The VirtualSpace participant, null for none.
      defaultTextTable - The default text table to expand for new items, null for none.
      undoRedo - The undo/redo instance.
  • Method Details

    • dispose

      public void dispose()
      Disposes of the instance.
    • assignTextControl

      public void assignTextControl(KStringStyledText styledText)
      Assigns the StyledText instance for form editing.
    • assignTextControl

      public void assignTextControl(Text text, ViewerCell cell)
      Assigns the Text instance for direct editing in tables.
    • getCurrentNonErroredKString

      public KString getCurrentNonErroredKString()
      Gets the current KString from current cell.
      Returns:
      The KString, null for none (or KStringProp entry in error).
    • updateStates

      public void updateStates(KStringProp prop, boolean doUpdateTagsFromProp)
      Updates the states for the specified KString.
      Parameters:
      prop - The current KStringProp, can be null for none.
    • openRichTextDialog

      public void openRichTextDialog()
      Shows the rich text dialog box.
    • caretMoved

      public void caretMoved(CaretEvent event)
      This method is called after the caret offset is changed. The following event fields are used:
      • event.caretOffset the new caret offset (input)
      Specified by:
      caretMoved in interface CaretListener
      Parameters:
      event - the given event
      See Also: