Class RMEditorTextEditor

java.lang.Object
com.reportmill.text.RMTextEditor
com.reportmill.editor.RMEditorTextEditor

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

    • _edText

      public RMText _edText
    • _updatingSize

      public boolean _updatingSize
    • _updatingMinHeight

      public float _updatingMinHeight
  • Constructor Details

    • RMEditorTextEditor

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

    • setText

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

      public RMTextLayout getTextLayout()
      Returns the text layout for the RMText being edited.
      Overrides:
      getTextLayout in class RMTextEditor
    • 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(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
    • replace

      public void replace(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(MouseEvent anEvent)
      Handles mouse pressed on the text editor.
    • mouseDragged

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

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

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

      public static void paintShape(RMText aText, RMEditor anEditor, 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(MouseEvent e)
      Move Table Row Column stuff (table row column re-ordering).