public class JythonEditor extends java.lang.Object implements javax.swing.event.UndoableEditListener
This class relies very heavily upon the wonderful RSyntaxTextArea project.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | JythonEditor.McvJythonTextArea | 
| Modifier and Type | Field and Description | 
|---|---|
| private org.fife.ui.rtextarea.RTextScrollPane | scrollPaneScroll pane for  textArea. | 
| private JythonEditor.McvJythonTextArea | textAreaText area that contains the syntax-highlighted text. | 
| private javax.swing.undo.UndoManager | undoUndo manager. | 
| Constructor and Description | 
|---|
| JythonEditor()Creates a new JythonEditor. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addUndoableEditListener(javax.swing.event.UndoableEditListener l)Adds the given undoable edit listener to  textArea. | 
| void | copy()Copies selected text into system clipboard. | 
| javax.swing.JPopupMenu | createPopupMenu()Returns the default  JPopupMenucreated byRSyntaxTextArea.createPopupMenu(). | 
| javax.swing.JPanel | getLineNumberComponent()Returns the component (aka "the gutter" that contains
 optional information like line numbers. | 
| javax.swing.JScrollPane | getScrollPane()Returns the  JScrollPanethat containstextArea. | 
| java.lang.String | getText()Returns a string containing the text of  textArea. | 
| javax.swing.text.JTextComponent | getTextComponent()Returns the text area responsible for syntax highlighting. | 
| void | insertText(java.lang.String textToInsert)Insert the given text at the caret. | 
| boolean | isEnabled()Whether or not changes can be made to  textArea. | 
| void | removeUndoableEditListener(javax.swing.event.UndoableEditListener l)Remove the given undoable edit listener from  textArea. | 
| void | setEnabled(boolean enabled)Controls whether or not changes can be made to the contents of
  textArea. | 
| void | setText(java.lang.String text)Sets the text of this document to the given  String. | 
| void | undoableEditHappened(javax.swing.event.UndoableEditEvent e)Handles undoable edits | 
private final JythonEditor.McvJythonTextArea textArea
private final org.fife.ui.rtextarea.RTextScrollPane scrollPane
textArea.private final javax.swing.undo.UndoManager undo
public JythonEditor()
public javax.swing.text.JTextComponent getTextComponent()
textArea.public javax.swing.JScrollPane getScrollPane()
JScrollPane that contains textArea.JScrollPane with the text area. Suitable for adding to
 a JPanel.public void setText(java.lang.String text)
String.text - New text to use in textArea.public java.lang.String getText()
textArea.public void setEnabled(boolean enabled)
textArea.enabled - true if the editor should be enabled,
                false otherwise.public javax.swing.JPanel getLineNumberComponent()
JPanel that contains the line numbers.public void copy()
public boolean isEnabled()
textArea.true if changes are allowed, false otherwise.public void insertText(java.lang.String textToInsert)
textToInsert - Text to insert.public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
undoableEditHappened in interface javax.swing.event.UndoableEditListenere - Event that represents the undoable edit.public void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
textArea.l - Listener to add.public void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
textArea.l - Listener to remove.public javax.swing.JPopupMenu createPopupMenu()
JPopupMenu created by
 RSyntaxTextArea.createPopupMenu().