Package snap.text

Class TextEditor

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable

public class TextEditor extends TextArea
This class provides the event and drawing code necessary to edit text in a TextDoc.
  • Constructor Details

    • TextEditor

      public TextEditor()
      Constructor.
  • Method Details

    • getCharSpacing

      public double getCharSpacing()
      Returns the character spacing of the current selection or cursor.
    • setCharSpacing

      public void setCharSpacing(double aValue)
      Returns the character spacing of the current selection or cursor.
    • getLineSpacing

      public double getLineSpacing()
      Returns the line spacing for current selection.
    • setLineSpacing

      public void setLineSpacing(double aHeight)
      Sets the line spacing for current selection.
    • getLineGap

      public double getLineGap()
      Returns the line gap for current selection.
    • setLineGap

      public void setLineGap(double aHeight)
      Sets the line gap for current selection.
    • getLineHeightMin

      public double getLineHeightMin()
      Returns the min line height for current selection.
    • setLineHeightMin

      public void setLineHeightMin(double aHeight)
      Sets the min line height for current selection.
    • getLineHeightMax

      public double getLineHeightMax()
      Returns the maximum line height for a line of text (even if font size would dictate higher).
    • setLineHeightMax

      public void setLineHeightMax(double aHeight)
      Sets the maximum line height for a line of text (even if font size would dictate higher).
    • setActive

      public void setActive(boolean aValue)
      Sets whether TextEditor is showing and focused.
    • paintActiveText

      public void paintActiveText(Painter aPntr)
      Paints a given TextEditor.
    • getSpellingPath

      public Shape getSpellingPath()
      Returns a path for misspelled word underlining.