Class JSyntaxTextArea


  • public class JSyntaxTextArea
    extends RSyntaxTextArea
    Utility class to handle RSyntaxTextArea code
    • Constructor Detail

      • JSyntaxTextArea

        @Deprecated
        public JSyntaxTextArea()
        Deprecated.
      • JSyntaxTextArea

        public JSyntaxTextArea​(int rows,
                               int cols)
        Creates the default syntax highlighting text area. The following are set:
        • setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA)
        • setCodeFoldingEnabled(true)
        • setAntiAliasingEnabled(true)
        • setLineWrap(true)
        • setWrapStyleWord(true)
        Parameters:
        rows - The number of rows for the text area
        cols - The number of columns for the text area
      • JSyntaxTextArea

        public JSyntaxTextArea​(int rows,
                               int cols,
                               boolean disableUndo)
        Creates the default syntax highlighting text area. The following are set:
        • setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA)
        • setCodeFoldingEnabled(true)
        • setAntiAliasingEnabled(true)
        • setLineWrap(true)
        • setWrapStyleWord(true)
        Parameters:
        rows - The number of rows for the text area
        cols - The number of columns for the text area
        disableUndo - true to disable undo manager, defaults to false
    • Method Detail

      • setLanguage

        public void setLanguage​(String language)
        Sets the language of the text area.
        Parameters:
        language - The language to be set
      • createUndoManager

        protected RUndoManager createUndoManager()
        Override UndoManager to allow disabling if feature causes issues See https://github.com/bobbylight/RSyntaxTextArea/issues/19
      • setInitialText

        public void setInitialText​(String string)
        Sets initial text resetting undo history
        Parameters:
        string - The initial text to be set