public class ConsoleTextEditor
extends JScrollPane
Component which provides a styled editor for the console.
| Fields inherited from class | Fields |
|---|---|
class JScrollPane |
VIEWPORT, VERTICAL_SCROLLBAR, HORIZONTAL_SCROLLBAR, ROW_HEADER, COLUMN_HEADER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, LOWER_LEADING_CORNER, LOWER_TRAILING_CORNER, UPPER_LEADING_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR_POLICY, HORIZONTAL_SCROLLBAR_POLICY, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_ALWAYS, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT |
| Constructor and description |
|---|
ConsoleTextEditor()Creates a styled text editor with line numbers, undo/redo support, printing support, and syntax highlighting. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
clipBoardAvailable()Reports whether plain-text clipboard content is currently available. |
|
public void |
enableHighLighter(Class<? extends DocumentFilter> clazz)Replaces the current syntax highlighter document filter. |
|
public String |
getDefaultFamily()Returns the preferred monospaced font family for the editor. |
|
public Action |
getPrintAction()Returns the action that prints the editor content. |
|
public Action |
getRedoAction()Returns the action that redoes the most recently undone edit. |
|
public TextEditor |
getTextEditor()Returns the wrapped text editor component. |
|
public Action |
getUndoAction()Returns the action that undoes the most recent edit. |
|
public TextUndoManager |
getUndoManager()Returns the undo manager backing this editor. |
|
protected void |
initActions()Installs actions exposed by this editor on its action map. |
|
public void |
reapplyHighlighting()Re-run the syntax highlighter on the full document so character attributes match the current theme. |
|
public void |
setDefaultFamily(String defaultFamily)Sets the preferred monospaced font family for the editor. |
|
public void |
setEditable(boolean editable)Updates whether the text editor accepts user edits. |
|
public void |
setShowLineNumbers(boolean showLineNumbers)Shows or hides the line-number gutter. |
Creates a styled text editor with line numbers, undo/redo support, printing support, and syntax highlighting.
Reports whether plain-text clipboard content is currently available.
true if the clipboard contains a stringReplaces the current syntax highlighter document filter.
clazz - the filter type to instantiate for the current documentReturns the preferred monospaced font family for the editor.
Returns the action that prints the editor content.
Returns the action that redoes the most recently undone edit.
Returns the wrapped text editor component.
Returns the action that undoes the most recent edit.
Returns the undo manager backing this editor.
Installs actions exposed by this editor on its action map.
Re-run the syntax highlighter on the full document so character attributes match the current theme. Undo recording is suppressed so this doesn't pollute the undo/redo stack. Used after undo/redo because UndoableEdits restore attributes captured at edit time, which may no longer match the active theme.
Sets the preferred monospaced font family for the editor.
defaultFamily - the font family name to useUpdates whether the text editor accepts user edits.
editable - true if the editor should be editableShows or hides the line-number gutter.
showLineNumbers - true to show line numbersCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.