Class RMEditorTextEditor

  • All Implemented Interfaces:
    RMPropertyChanger, RMTypes, RMTextTypes, java.beans.PropertyChangeListener, java.lang.CharSequence, java.lang.Cloneable, java.util.EventListener

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

      • RMEditorTextEditor

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

      • 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.
      • setSel

        public void setSel​(int aStart,
                           int anEnd)
        Override to forward to Editor.
        Overrides:
        setSel 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
      • delete

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

        public void replace​(java.lang.String aString,
                            java.util.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​(java.awt.event.MouseEvent anEvent)
        Handles mouse pressed on the text editor.
        Overrides:
        mousePressed in class RMTextEditor
      • mouseDragged

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

        public void mouseReleased​(java.awt.event.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​(java.beans.PropertyChangeEvent anEvent,
                                          java.lang.String aName,
                                          java.lang.Object oldVal,
                                          java.lang.Object newVal,
                                          int anIndex)
        Override so all property changes can trigger text shape repaint.
        Overrides:
        firePropertyChange in class RMObject
      • propertyChange

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

        protected java.lang.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​(java.awt.event.MouseEvent anEvent)
        Move Table Row Column stuff (table row column re-ordering).