Interface TextPaneComponent

All Known Implementing Classes:
BaseTextPane, BaseTextPaneWithWordWrap

public interface TextPaneComponent
Interface for widgets that behave like a text pane.
Author:
FracPete (fracpete at waikato dot ac dot nz)
  • Method Details

    • setText

      void setText(String value)
      Sets the text to display.
      Parameters:
      value - the text
    • getText

      String getText()
      Returns the text to display.
      Returns:
      the text
    • getSelectedText

      String getSelectedText()
      Returns the selected text.
      Returns:
      the selected text
    • setEditable

      void setEditable(boolean value)
      Sets whether the text pane is editable or not.
      Parameters:
      value - if true the text pane is editable
    • isEditable

      boolean isEditable()
      Returns whether the text pane is editable or not.
      Returns:
      true if the text pane is editable
    • getDocument

      Document getDocument()
      Returns the underlying document.
      Returns:
      the document
    • setCaretPosition

      void setCaretPosition(int value)
      Sets the position of the cursor.
      Parameters:
      value - the position
    • getCaretPosition

      int getCaretPosition()
      Returns the current position of the cursor.
      Returns:
      the cursor position
    • setCaretPositionLast

      void setCaretPositionLast()
      Sets the position of the cursor at the end.