Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.ui
Class Console

Groovy Swing console. Allows user to interactively enter and execute Groovy.

version:
  $Id: Console.groovy 12029 2008-04-23 21:30:38Z shemnon $

author:
  Danno Ferrin

author:
  Dierk Koenig, changed Layout, included Selection sensitivity, included ObjectBrowser

author:
  Alan Green more features: history, System.out capture, bind result to _

Field Summary
`String` | `ICON_PATH`
`Closure` | `afterExecution`
`Closure` | `beforeExecution`
`boolean` | `captureStdOut`
`int` | `colNum`
`Style` | `commandStyle`
`File` | `currentFileChooserDir`
`int` | `cursorPos`
`boolean` | `dirty`
`JFrame` | `frame`
`boolean` | `fullStackTraces`
`Action` | `fullStackTracesAction`
`List` | `history`
`int` | `historyIndex`
`JTextPane` | `inputArea`
`ConsoleTextEditor` | `inputEditor`
`int` | `maxHistory`
`int` | `maxOutputChars`
`Action` | `nextHistoryAction`
`JTextPane` | `outputArea`
`Style` | `outputStyle`
`HistoryRecord` | `pendingRecord`
`def` | `prefs`
`Action` | `prevHistoryAction`
`Style` | `promptStyle`
`Style` | `resultStyle`
`Element` | `rootElement`
`int` | `rowNum`
`JLabel` | `rowNumAndColNum`
`Thread` | `runThread`
`JDialog` | `runWaitDialog`
`Action` | `saveAction`
`def` | `scriptFile`
`int` | `scriptNameCounter`
`GroovyShell` | `shell`
`boolean` | `showToolbar`
`Action` | `showToolbarAction`
`JLabel` | `statusLabel`
`SwingBuilder` | `swing`
`SystemOutputInterceptor` | `systemOutInterceptor`
`int` | `textSelectionEnd`
`int` | `textSelectionStart`
`Component` | `toolbar`

Constructor Summary
`Console()`
`Console(Binding binding)`
`Console(ClassLoader parent, Binding binding)`

Method Summary
`void` | `addToHistory(def record)`
`void` | `appendOutput(def text, def style)`
`void` | `appendOutputNl(def text, def style)`
`boolean` | `askToSaveFile()`
`void` | `beep()`
`void` | `bindResults()`
`void` | `captureStdOut(EventObject evt)`
`void` | `caretUpdate(CaretEvent e)`
`void` | `clearOutput(EventObject evt)`
`void` | `confirmRunInterrupt(EventObject evt)`
`void` | `copy(EventObject evt)`
`void` | `cut(EventObject evt)`
`void` | `exit(EventObject evt)`
`void` | `fileNewFile(EventObject evt)`
`void` | `fileNewWindow(EventObject evt)`
`void` | `fileOpen(EventObject evt)`
`boolean` | `fileSave(EventObject evt)`
`boolean` | `fileSaveAs(EventObject evt)`
`void` | `find(EventObject evt)`
`void` | `findNext(EventObject evt)`
`void` | `findPrevious(EventObject evt)`
`def` | `finishException(Throwable t)`
`def` | `finishNormal(Object result)`
`void` | `fullStackTraces(EventObject evt)`
`def` | `getLastResult()`
`GroovyShell` | `getShell()`
`void` | `historyNext(EventObject evt)`
`void` | `historyPrev(EventObject evt)`
`void` | `inspectLast(EventObject evt)`
`void` | `inspectVariables(EventObject evt)`
`void` | `installInterceptor()`
`void` | `invokeTextAction(def evt, def closure)`
`void` | `largerFont(EventObject evt)`
`static void` | `main(def args)`
`Boolean` | `notifySystemOut(String str)`
`void` | `paste(EventObject evt)`
`void` | `print(EventObject evt)`
`void` | `redo(EventObject evt)`
`void` | `replace(EventObject evt)`
`void` | `run()`
`void` | `runScript(EventObject evt)`
`void` | `runScriptImpl(boolean selected)`
`void` | `runSelectedScript(EventObject evt)`
`void` | `selectAll(EventObject evt)`
`def` | `selectFilename(def name)`
`void` | `setDirty(boolean newDirty)`
`void` | `setInputTextFromHistory(def newIndex)`
`void` | `setRowNumAndColNum()`
`void` | `setVariable(String name, Object value)`
`void` | `showAbout(EventObject evt)`
`void` | `showRunWaitDialog()`
`void` | `showToolbar(EventObject evt)`
`void` | `smallerFont(EventObject evt)`
`void` | `undo(EventObject evt)`
`void` | `updateHistoryActions()`
`void` | `updateTitle()`

Constructor Detail

### Console

    public Console()

### Console

    public Console(Binding binding)

### Console

    public Console(ClassLoader parent, Binding binding)

Method Detail

### addToHistory

    void addToHistory(def record)

### appendOutput

    void appendOutput(def text, def style)

### appendOutputNl

    void appendOutputNl(def text, def style)

### askToSaveFile

    boolean askToSaveFile()

### beep

    void beep()

### bindResults

    void bindResults()

### captureStdOut

    void captureStdOut(EventObject evt)

### caretUpdate

    void caretUpdate(CaretEvent e)

### clearOutput

    void clearOutput(EventObject evt)

### confirmRunInterrupt

    void confirmRunInterrupt(EventObject evt)

### copy

    void copy(EventObject evt)

### cut

    void cut(EventObject evt)

### exit

    void exit(EventObject evt)

### fileNewFile

    void fileNewFile(EventObject evt)

### fileNewWindow

    void fileNewWindow(EventObject evt)

### fileOpen

    void fileOpen(EventObject evt)

### fileSave

    boolean fileSave(EventObject evt)

### fileSaveAs

    boolean fileSaveAs(EventObject evt)

### find

    void find(EventObject evt)

### findNext

    void findNext(EventObject evt)

### findPrevious

    void findPrevious(EventObject evt)

### finishException

    public def finishException(Throwable t)

### finishNormal

    public def finishNormal(Object result)

### fullStackTraces

    void fullStackTraces(EventObject evt)

### getLastResult

    public def getLastResult()

### getShell

    GroovyShell getShell()

### historyNext

    void historyNext(EventObject evt)

### historyPrev

    void historyPrev(EventObject evt)

### inspectLast

    void inspectLast(EventObject evt)

### inspectVariables

    void inspectVariables(EventObject evt)

### installInterceptor

    public void installInterceptor()

### invokeTextAction

    void invokeTextAction(def evt, def closure)

### largerFont

    void largerFont(EventObject evt)

### main

    public static void main(def args)

### notifySystemOut

    Boolean notifySystemOut(String str)

### paste

    void paste(EventObject evt)

### print

    void print(EventObject evt)

### redo

    void redo(EventObject evt)

### replace

    void replace(EventObject evt)

### run

    void run()

### runScript

    void runScript(EventObject evt)

### runScriptImpl

    void runScriptImpl(boolean selected)

### runSelectedScript

    void runSelectedScript(EventObject evt)

### selectAll

    void selectAll(EventObject evt)

### selectFilename

    public def selectFilename(def name)

### setDirty

    void setDirty(boolean newDirty)

### setInputTextFromHistory

    void setInputTextFromHistory(def newIndex)

### setRowNumAndColNum

    void setRowNumAndColNum()

### setVariable

    void setVariable(String name, Object value)

### showAbout

    void showAbout(EventObject evt)

### showRunWaitDialog

    void showRunWaitDialog()

### showToolbar

    void showToolbar(EventObject evt)

### smallerFont

    void smallerFont(EventObject evt)

### undo

    void undo(EventObject evt)

### updateHistoryActions

    void updateHistoryActions()

### updateTitle

    void updateTitle()