Class RMEditorTextEditor


  • public class RMEditorTextEditor
    extends RMTextEditor
    A text editor subclass suitable for editing RMText shapes in the RMEditor.
    • Field Detail

      • _edText

        public RMText _edText
      • _updatingSize

        public boolean _updatingSize
      • _updatingMinHeight

        public float _updatingMinHeight
    • Constructor Detail

      • RMEditorTextEditor

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

      • setText

        public void setText​(RMText aText)
        Sets the RMText to be edited.
      • setSelection

        public void setSelection​(int newStart,
                                 int newEnd)
        Sets the character index of the start and end of the text selection.
        Overrides:
        setSelection in class RMTextEditor
      • setInputAttribute

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

        public void replace​(java.lang.String aString)
        Replaces the current selection with the given string.
        Overrides:
        replace in class RMTextEditor
      • replace

        public void replace​(RMXString aString)
        Replaces the current selection with the given sstring.
        Overrides:
        replace in class RMTextEditor
      • delete

        public void delete()
        Deletes the current selection.
        Overrides:
        delete in class RMTextEditor
      • getHeightToFit

        public float getHeightToFit()
        Returns the height need to show all characters.
        Overrides:
        getHeightToFit in class RMTextEditor
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent anEvent)
        Handles mouse pressed on the text editor.
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent anEvent)
        Handles mouse dragged on the text editor.
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent anEvent)
        Handles mouse released on the text editor.
      • processKeyEvent

        public void processKeyEvent​(java.awt.event.KeyEvent anEvent)
        Handles key events.
        Overrides:
        processKeyEvent in class RMTextEditor
      • paintShape

        public static void paintShape​(RMText aText,
                                      RMEditor anEditor,
                                      java.awt.Graphics2D g)
        Paints the text editor.
      • setNeedsRepaint

        public void setNeedsRepaint()
        Called when text editor needs to repaint.
        Overrides:
        setNeedsRepaint in class RMTextEditor
      • textDidChange

        public void textDidChange()
        Called when there are changes to underlying xstring.
        Overrides:
        textDidChange in class RMTextEditor
      • moveTableRowColumnStart

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

        public void moveTableRowColumn​(java.awt.event.MouseEvent e)
        Move Table Row Column stuff (table row column re-ordering).