# Class JSyntaxTextArea

RSyntaxTextArea
org.apache.jmeter.gui.util.JSyntaxTextArea

public class JSyntaxTextArea extends RSyntaxTextArea
Utility class to handle RSyntaxTextArea code

## Constructor Summary

Constructors
Constructor
Description
`JSyntaxTextArea()`
Deprecated.
`JSyntaxTextArea(int rows, int cols)`
Creates the default syntax highlighting text area.
`JSyntaxTextArea(int rows, int cols, boolean disableUndo)`
Creates the default syntax highlighting text area.

## Method Summary

Modifier and Type
Method
Description
`protected RUndoManager`
`createUndoManager()`
Override UndoManager to allow disabling if feature causes issues See https://github.com/bobbylight/RSyntaxTextArea/issues/19
`void`
`setInitialText(String string)`
Sets initial text resetting undo history
`void`
`setLanguage(String language)`
Sets the language of the text area.

## Constructor Details

### 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 Details

### 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