Class JEditTextArea

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

    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 22469 2012-11-14 08:05:15Z ezust $
    Author:
    Slava Pestov, John Gellene (API documentation)
    See Also:
    Serialized Form
    • Field Detail

      • FOLD_PAINTER_PROPERTY

        public static final java.lang.String FOLD_PAINTER_PROPERTY
        Fold painter service.
        Since:
        jEdit 4.3pre16
        See Also:
        Constant Field Values
      • FOLD_PAINTER_SERVICE

        public static final java.lang.String FOLD_PAINTER_SERVICE
        See Also:
        Constant Field Values
      • DEFAULT_FOLD_PAINTER_SERVICE

        public static final java.lang.String DEFAULT_FOLD_PAINTER_SERVICE
        See Also:
        Constant Field Values
    • Constructor Detail

      • JEditTextArea

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

      • dispose

        public void dispose()
        Description copied from class: TextArea
        Plugins and macros should not call this method.
        Overrides:
        dispose 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​(java.lang.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.
        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:
        TextArea.setSelectedText(String), TextArea.isOverwriteEnabled()
      • 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,
                                          java.lang.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 java.lang.String getFoldPainterName()
      • handlePopupTrigger

        public void handlePopupTrigger​(java.awt.event.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​(java.awt.event.MouseEvent evt)
        Creates the popup menu.
        Overrides:
        createPopupMenu in class TextArea
        Since:
        4.3pre15
      • handlePropertiesChanged

        public void handlePropertiesChanged​(PropertiesChanged msg)