Class RMEditorTextEditor

All Implemented Interfaces:
RMPropertyChanger, RMTypes, RMTextTypes, PropertyChangeListener, CharSequence, Cloneable, EventListener

public class RMEditorTextEditor extends RMTextEditor implements PropertyChangeListener
A text editor subclass suitable for editing RMText shapes in the RMEditor.
  • Constructor Details

    • RMEditorTextEditor

      public RMEditorTextEditor(RMEditor anOwner)
      Creates an RMEditor text editor for the given RMEditor.
  • Method Details

    • getTextShape

      public RMTextShape getTextShape()
      Returns the RMText shape being edited.
    • setTextShape

      public void setTextShape(RMTextShape aText)
      Sets the RMText shape to be edited.
    • setXStringFromTextShape

      protected void setXStringFromTextShape()
      Sets the text editor xstring to text shape's xstring.
    • isUpdatingSize

      public boolean isUpdatingSize()
      Returns whether text editor is updating size (usually when text is first created with text tool).
    • setUpdatingSize

      public void setUpdatingSize(boolean aValue)
      Sets whether text editor is updating size (usually when text is first created with text tool).
    • getUpdatingMinHeight

      public float getUpdatingMinHeight()
      Returns the minimum height of the RMText when editor text editor is updating size.
    • setUpdatingMinHeight

      public void setUpdatingMinHeight(float aValue)
      Sets the minimum height of the RMText when editor text editor is updating size.
    • getLayout

      public RMTextLayout getLayout()
      Returns the text layout for the RMText being edited.
      Overrides:
      getLayout in class RMTextEditor
    • setSel

      public void setSel(int aStart, int anEnd)
      Override to forward to Editor.
      Overrides:
      setSel in class RMTextEditor
    • setInputAttribute

      public void setInputAttribute(String aKey, Object aValue)
      Sets the attributes that are applied to current selection or newly typed chars.
      Overrides:
      setInputAttribute in class RMTextEditor
    • setInputParagraph

      public void setInputParagraph(RMParagraph ps)
      Sets the paragraph of the current selection or cursor position.
      Overrides:
      setInputParagraph in class RMTextEditor
    • delete

      public void delete(int aStart, int anEnd, boolean doUpdateSelection)
      Deletes the current selection.
      Overrides:
      delete in class RMTextEditor
    • replace

      public void replace(String aString, Map theAttributes, int aStart, int anEnd, boolean doUpdateSelection)
      Replaces the current selection with the given string.
      Overrides:
      replace in class RMTextEditor
    • mousePressed

      public void mousePressed(MouseEvent anEvent)
      Handles mouse pressed on the text editor.
      Overrides:
      mousePressed in class RMTextEditor
    • mouseDragged

      public void mouseDragged(MouseEvent anEvent)
      Handles mouse dragged on the text editor.
      Overrides:
      mouseDragged in class RMTextEditor
    • mouseReleased

      public void mouseReleased(MouseEvent anEvent)
      Handles mouse released on the text editor.
      Overrides:
      mouseReleased in class RMTextEditor
    • paste

      public void paste()
      Pastes the current clipboard data over the current selection.
      Overrides:
      paste in class RMTextEditor
    • firePropertyChange

      protected void firePropertyChange(PropertyChangeEvent anEvent, String aName, Object oldVal, Object newVal, int anIndex)
      Override so all property changes can trigger text shape repaint.
      Overrides:
      firePropertyChange in class RMObject
    • propertyChange

      public void propertyChange(PropertyChangeEvent anEvent)
      Called when there are changes to text shape.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class RMTextEditor
    • getUndoer

      public RMUndoer getUndoer()
      Override to get undoer from text shape.
      Overrides:
      getUndoer in class RMTextEditor
    • getUndoSelection

      protected Object getUndoSelection()
      Override to return selection for text shape.
      Overrides:
      getUndoSelection in class RMTextEditor
    • undo

      public void undo()
      Override to forward to editor.
      Overrides:
      undo in class RMTextEditor
    • redo

      public void redo()
      Override to forward to editor.
      Overrides:
      redo in class RMTextEditor
    • moveTableRowColumn

      public void moveTableRowColumn(MouseEvent anEvent)
      Move Table Row Column stuff (table row column re-ordering).