Class JEditTextArea

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class JEditTextArea extends TextArea
jEdit's text component.

Unlike most other text editors, the selection API permits selection and concurrent manipulation of multiple, non-contiguous regions of text. Methods in this class that deal with selecting text rely upon classes derived the Selection class.

Version:
$Id: JEditTextArea.java 24492 2016-08-10 21:34:50Z daleanson $
Author:
Slava Pestov, John Gellene (API documentation)
See Also:
  • Field Details

  • Constructor Details

    • JEditTextArea

      public JEditTextArea(View view)
      Creates a new JEditTextArea.
  • Method Details

    • dispose

      public void dispose()
      Description copied from class: TextArea
      Plugins and macros should not call this method.
      Overrides:
      dispose in class TextArea
    • getFoldPainter

      public FoldPainter getFoldPainter()
      Overrides:
      getFoldPainter in class TextArea
    • home

      public void home(boolean select)
      An override to record the acutual action taken for home().
      Overrides:
      home in class TextArea
      Parameters:
      select - true if we also want to select from the cursor
    • end

      public void end(boolean select)
      An override to record the acutual action taken for end().
      Overrides:
      end in class TextArea
      Parameters:
      select - true if we also want to select from the cursor
    • smartHome

      public void smartHome(boolean select)
      An override to record the acutual action taken for smartHome().
      Overrides:
      smartHome in class TextArea
      Parameters:
      select - true if you want to extend selection
    • smartEnd

      public void smartEnd(boolean select)
      An override to record the acutual action taken for smartHome().
      Overrides:
      smartEnd in class TextArea
      Parameters:
      select - true if you want to extend selection
    • goToBufferEnd

      public void goToBufferEnd(boolean select)
      Description copied from class: TextArea
      Moves the caret to the end of the buffer.
      Overrides:
      goToBufferEnd in class TextArea
      Parameters:
      select - true if you want to extend selection
    • goToMatchingBracket

      public void goToMatchingBracket()
      Moves the caret to the bracket matching the one before the caret. Also sends PositionChanging if it goes somewhere.
      Overrides:
      goToMatchingBracket in class TextArea
      Since:
      jEdit 4.3pre18
    • goToBufferStart

      public void goToBufferStart(boolean select)
      Description copied from class: TextArea
      Moves the caret to the beginning of the buffer.
      Overrides:
      goToBufferStart in class TextArea
      Parameters:
      select - true if you want to extend selection
    • replaceSelection

      public int replaceSelection(String selectedText)
      Description copied from class: TextArea
      Set the selection, but does not deactivate it, and does not move the caret. Please use TextArea.setSelectedText(String) instead.
      Overrides:
      replaceSelection in class TextArea
      Parameters:
      selectedText - The new selection
      Returns:
      The new caret position
    • showGoToLineDialog

      public void showGoToLineDialog()
      Displays the 'go to line' dialog box, and moves the caret to the specified line number, or moves the caret back or forward by the offset provided.
      Since:
      jEdit 2.7pre2
    • userInput

      public void userInput(char ch)
      Handles the insertion of the specified character. It performs the following operations in addition to TextArea#userInput(char):
      • Inserting a space with automatic abbrev expansion enabled will try to expand the abbrev
      Overrides:
      userInput in class TextArea
      Parameters:
      ch - The character
      Since:
      jEdit 2.7pre3
      See Also:
    • addExplicitFold

      public void addExplicitFold()
      Surrounds the selection with explicit fold markers.
      Overrides:
      addExplicitFold in class TextArea
      Since:
      jEdit 4.0pre3
    • formatParagraph

      public void formatParagraph()
      Formats the paragraph containing the caret.
      Overrides:
      formatParagraph in class TextArea
      Since:
      jEdit 2.7pre2
    • doWordCount

      protected static void doWordCount(View view, String text)
    • showWordCountDialog

      public void showWordCountDialog()
      Displays the 'word count' dialog box.
      Since:
      jEdit 2.7pre2
    • getView

      public View getView()
      Returns this text area's view.
      Since:
      jEdit 4.2pre5
    • getFoldPainterName

      public static String getFoldPainterName()
    • handlePopupTrigger

      public void handlePopupTrigger(MouseEvent evt)
      Do the same thing as right-clicking on the text area. The Gestures plugin uses this API.
      Overrides:
      handlePopupTrigger in class TextArea
      Since:
      jEdit 4.2pre13
    • createPopupMenu

      public void createPopupMenu(MouseEvent evt)
      Creates the popup menu.
      Overrides:
      createPopupMenu in class TextArea
      Since:
      4.3pre15
    • handlePropertiesChanged

      public void handlePropertiesChanged(PropertiesChanged msg)