Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.0
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## groovy.ui
Class Console

    java.lang.Object
      groovy.ui.Console

    class Console
    extends Object

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

version:
  $Id: Console.groovy 18489 2009-12-03 03:08:28Z roshandawrani $

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 _

author:
  Guillaume Laforge, stacktrace hyperlinking to the current script line

author:
  Hamlet D'Arcy, AST browser

Property Summary
`static String` | `DEFAULT_SCRIPT_NAME_START`
`static String` | `ICON_PATH`
`static String` | `NODE_ICON_PATH`
`Closure` | `afterExecution`
`boolean` | `autoClearOutput`
`Action` | `autoClearOutputAction`
`Closure` | `beforeExecution`
`Component` | `blank`
`static boolean` | `captureStdOut`
`int` | `colNum`
`Style` | `commandStyle`
`static def` | `consoleControllers`
`File` | `currentClasspathDir`
`File` | `currentClasspathJarDir`
`File` | `currentFileChooserDir`
`int` | `cursorPos`
`boolean` | `detachedOutput`
`Action` | `detachedOutputAction`
`boolean` | `dirty`
`RootPaneContainer` | `frame`
`static def` | `frameConsoleDelegates`
`boolean` | `fullStackTraces`
`Action` | `fullStackTracesAction`
`Action` | `hideOutputWindowAction1`
`Action` | `hideOutputWindowAction2`
`Action` | `hideOutputWindowAction3`
`Action` | `hideOutputWindowAction4`
`List` | `history`
`int` | `historyIndex`
`Style` | `hyperlinkStyle`
`JTextPane` | `inputArea`
`ConsoleTextEditor` | `inputEditor`
`int` | `maxHistory`
`int` | `maxOutputChars`
`Action` | `nextHistoryAction`
`int` | `origDividerSize`
`JTextPane` | `outputArea`
`Style` | `outputStyle`
`Component` | `outputWindow`
`HistoryRecord` | `pendingRecord`
`Action` | `prevHistoryAction`
`Style` | `promptStyle`
`Style` | `resultStyle`
`Element` | `rootElement`
`int` | `rowNum`
`JLabel` | `rowNumAndColNum`
`Thread` | `runThread`
`JDialog` | `runWaitDialog`
`Action` | `saveAction`
`def` | `scriptFile`
`int` | `scriptNameCounter`
`Component` | `scrollArea`
`GroovyShell` | `shell`
`Action` | `showOutputWindowAction`
`boolean` | `showScriptInOutput`
`Action` | `showScriptInOutputAction`
`boolean` | `showToolbar`
`Action` | `showToolbarAction`
`JSplitPane` | `splitPane`
`Style` | `stacktraceStyle`
`JLabel` | `statusLabel`
`SwingBuilder` | `swing`
`SystemOutputInterceptor` | `systemOutInterceptor`
`int` | `textSelectionEnd`
`int` | `textSelectionStart`
`Component` | `toolbar`
`boolean` | `visualizeScriptResults`
`Action` | `visualizeScriptResultsAction`

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

Method Summary
`void` | `addClasspathDir(EventObject evt = null)`
`void` | `addClasspathJar(EventObject evt = null)`
`void` | `addToHistory(def record)`
`void` | `appendOutput(String text, AttributeSet style)`
`void` | `appendOutput(Window window, AttributeSet style)`
`void` | `appendOutput(Object object, AttributeSet style)`
`void` | `appendOutput(Component component, AttributeSet style)`
`void` | `appendOutput(Icon icon, AttributeSet style)`
`void` | `appendOutputNl(def text, def style)`
`void` | `appendStacktrace(def text)`
`boolean` | `askToSaveFile()`
`void` | `autoClearOutput(EventObject evt)`
`void` | `beep()`
`void` | `bindResults()`
`static void` | `captureStdOut(EventObject evt)`
`void` | `caretUpdate(CaretEvent e)`
`void` | `clearContext(EventObject evt = null)`
`void` | `clearOutput(EventObject evt = null)`
`void` | `componentHidden(ComponentEvent e)`
`void` | `componentMoved(ComponentEvent e)`
`void` | `componentResized(ComponentEvent e)`
`void` | `componentShown(ComponentEvent e)`
`void` | `confirmRunInterrupt(EventObject evt)`
`void` | `copy(EventObject evt = null)`
`void` | `cut(EventObject evt = null)`
`void` | `detachedOutput(EventObject evt)`
`void` | `exit(EventObject evt = null)`
`void` | `fileNewFile(EventObject evt = null)`
`void` | `fileNewWindow(EventObject evt = null)`
`void` | `fileOpen(EventObject evt = null)`
`boolean` | `fileSave(EventObject evt = null)`
`boolean` | `fileSaveAs(EventObject evt = null)`
`void` | `find(EventObject evt = null)`
`void` | `findNext(EventObject evt = null)`
`void` | `findPrevious(EventObject evt = null)`
`def` | `finishException(Throwable t)`
`def` | `finishNormal(Object result)`
`void` | `fullStackTraces(EventObject evt)`
`def` | `getLastResult()`
`void` | `hideAndClearOutputWindow(EventObject evt = null)`
`void` | `hideOutputWindow(EventObject evt = null)`
`void` | `historyNext(EventObject evt = null)`
`void` | `historyPrev(EventObject evt = null)`
`void` | `hyperlinkUpdate(HyperlinkEvent e)`
`void` | `inspectAst(EventObject evt = null)`
`void` | `inspectLast(EventObject evt = null)`
`void` | `inspectVariables(EventObject evt = null)`
`void` | `installInterceptor()`
`void` | `invokeTextAction(def evt, def closure)`
`void` | `largerFont(EventObject evt = null)`
`void` | `loadScriptFile(File file)`
`static void` | `main(def args)`
`void` | `newScript(ClassLoader parent, Binding binding)`
`static boolean` | `notifySystemOut(String str)`
`void` | `paste(EventObject evt = null)`
`void` | `print(EventObject evt = null)`
`void` | `redo(EventObject evt = null)`
`void` | `replace(EventObject evt = null)`
`void` | `run()`
`void` | `run(JApplet applet)`
`void` | `run(Map defaults)`
`void` | `runScript(EventObject evt = null)`
`void` | `runSelectedScript(EventObject evt = null)`
`void` | `selectAll(EventObject evt = null)`
`def` | `selectFilename(def name = "Open")`
`void` | `setDirty(boolean newDirty)`
`void` | `setRowNumAndColNum()`
`void` | `setVariable(String name, Object value)`
`void` | `showAbout(EventObject evt = null)`
`void` | `showOutputWindow(EventObject evt = null)`
`void` | `showRunWaitDialog()`
`void` | `showScriptInOutput(EventObject evt)`
`void` | `showToolbar(EventObject evt)`
`void` | `smallerFont(EventObject evt = null)`
`void` | `undo(EventObject evt = null)`
`void` | `updateTitle()`
`void` | `visualizeScriptResults(EventObject evt)`

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Property Detail

### DEFAULT_SCRIPT_NAME_START

    static final String DEFAULT_SCRIPT_NAME_START

### ICON_PATH

    public static String ICON_PATH

### NODE_ICON_PATH

    public static String NODE_ICON_PATH

### afterExecution

    Closure afterExecution

### autoClearOutput

    boolean autoClearOutput

### autoClearOutputAction

    Action autoClearOutputAction

### beforeExecution

    Closure beforeExecution

### blank

    Component blank

### captureStdOut

    static boolean captureStdOut

### colNum

    int colNum

### commandStyle

    Style commandStyle

### consoleControllers

    static def consoleControllers

### currentClasspathDir

    File currentClasspathDir

### currentClasspathJarDir

    File currentClasspathJarDir

### currentFileChooserDir

    File currentFileChooserDir

### cursorPos

    int cursorPos

### detachedOutput

    boolean detachedOutput

### detachedOutputAction

    Action detachedOutputAction

### dirty

    boolean dirty

### frame

    RootPaneContainer frame

### frameConsoleDelegates

    static def frameConsoleDelegates

### fullStackTraces

    boolean fullStackTraces

### fullStackTracesAction

    Action fullStackTracesAction

### hideOutputWindowAction1

    Action hideOutputWindowAction1

### hideOutputWindowAction2

    Action hideOutputWindowAction2

### hideOutputWindowAction3

    Action hideOutputWindowAction3

### hideOutputWindowAction4

    Action hideOutputWindowAction4

### history

    List history

### historyIndex

    int historyIndex

### hyperlinkStyle

    Style hyperlinkStyle

### inputArea

    JTextPane inputArea

### inputEditor

    ConsoleTextEditor inputEditor

### maxHistory

    int maxHistory

### maxOutputChars

    int maxOutputChars

### nextHistoryAction

    Action nextHistoryAction

### origDividerSize

    int origDividerSize

### outputArea

    JTextPane outputArea

### outputStyle

    Style outputStyle

### outputWindow

    Component outputWindow

### pendingRecord

    HistoryRecord pendingRecord

### prevHistoryAction

    Action prevHistoryAction

### promptStyle

    Style promptStyle

### resultStyle

    Style resultStyle

### rootElement

    Element rootElement

### rowNum

    int rowNum

### rowNumAndColNum

    JLabel rowNumAndColNum

### runThread

    Thread runThread

### runWaitDialog

    JDialog runWaitDialog

### saveAction

    Action saveAction

### scriptFile

    def scriptFile

### scriptNameCounter

    int scriptNameCounter

### scrollArea

    Component scrollArea

### shell

    GroovyShell shell

### showOutputWindowAction

    Action showOutputWindowAction

### showScriptInOutput

    boolean showScriptInOutput

### showScriptInOutputAction

    Action showScriptInOutputAction

### showToolbar

    boolean showToolbar

### showToolbarAction

    Action showToolbarAction

### splitPane

    JSplitPane splitPane

### stacktraceStyle

    Style stacktraceStyle

### statusLabel

    JLabel statusLabel

### swing

    SwingBuilder swing

### systemOutInterceptor

    SystemOutputInterceptor systemOutInterceptor

### textSelectionEnd

    int textSelectionEnd

### textSelectionStart

    int textSelectionStart

### toolbar

    Component toolbar

### visualizeScriptResults

    boolean visualizeScriptResults

### visualizeScriptResultsAction

    Action visualizeScriptResultsAction

Constructor Detail

### Console

    public Console()

### Console

    public Console(Binding binding)

### Console

    public Console(ClassLoader parent)

### Console

    public Console(ClassLoader parent, Binding binding)

Method Detail

### addClasspathDir

    void addClasspathDir(EventObject evt = null)

### addClasspathJar

    void addClasspathJar(EventObject evt = null)

### addToHistory

    void addToHistory(def record)

### appendOutput

    void appendOutput(String text, AttributeSet style)

### appendOutput

    void appendOutput(Window window, AttributeSet style)

### appendOutput

    void appendOutput(Object object, AttributeSet style)

### appendOutput

    void appendOutput(Component component, AttributeSet style)

### appendOutput

    void appendOutput(Icon icon, AttributeSet style)

### appendOutputNl

    void appendOutputNl(def text, def style)

### appendStacktrace

    void appendStacktrace(def text)

### askToSaveFile

    boolean askToSaveFile()

### autoClearOutput

    void autoClearOutput(EventObject evt)

### beep

    void beep()

### bindResults

    void bindResults()

### captureStdOut

    public static void captureStdOut(EventObject evt)

### caretUpdate

    void caretUpdate(CaretEvent e)

### clearContext

    void clearContext(EventObject evt = null)

### clearOutput

    void clearOutput(EventObject evt = null)

### componentHidden

    void componentHidden(ComponentEvent e)

### componentMoved

    void componentMoved(ComponentEvent e)

### componentResized

    void componentResized(ComponentEvent e)

### componentShown

    public void componentShown(ComponentEvent e)

### confirmRunInterrupt

    void confirmRunInterrupt(EventObject evt)

### copy

    void copy(EventObject evt = null)

### cut

    void cut(EventObject evt = null)

### detachedOutput

    void detachedOutput(EventObject evt)

### exit

    void exit(EventObject evt = null)

### fileNewFile

    void fileNewFile(EventObject evt = null)

### fileNewWindow

    void fileNewWindow(EventObject evt = null)

### fileOpen

    void fileOpen(EventObject evt = null)

### fileSave

    boolean fileSave(EventObject evt = null)

### fileSaveAs

    boolean fileSaveAs(EventObject evt = null)

### find

    void find(EventObject evt = null)

### findNext

    void findNext(EventObject evt = null)

### findPrevious

    void findPrevious(EventObject evt = null)

### finishException

    public def finishException(Throwable t)

### finishNormal

    public def finishNormal(Object result)

### fullStackTraces

    void fullStackTraces(EventObject evt)

### getLastResult

    public def getLastResult()

### hideAndClearOutputWindow

    void hideAndClearOutputWindow(EventObject evt = null)

### hideOutputWindow

    void hideOutputWindow(EventObject evt = null)

### historyNext

    void historyNext(EventObject evt = null)

### historyPrev

    void historyPrev(EventObject evt = null)

### hyperlinkUpdate

    void hyperlinkUpdate(HyperlinkEvent e)

### inspectAst

    void inspectAst(EventObject evt = null)

### inspectLast

    void inspectLast(EventObject evt = null)

### inspectVariables

    void inspectVariables(EventObject evt = null)

### installInterceptor

    public void installInterceptor()

### invokeTextAction

    void invokeTextAction(def evt, def closure)

### largerFont

    void largerFont(EventObject evt = null)

### loadScriptFile

    void loadScriptFile(File file)

### main

    public static void main(def args)

### newScript

    void newScript(ClassLoader parent, Binding binding)

### notifySystemOut

    public static boolean notifySystemOut(String str)

### paste

    void paste(EventObject evt = null)

### print

    void print(EventObject evt = null)

### redo

    void redo(EventObject evt = null)

### replace

    void replace(EventObject evt = null)

### run

    void run()

### run

    void run(JApplet applet)

### run

    void run(Map defaults)

### runScript

    void runScript(EventObject evt = null)

### runSelectedScript

    void runSelectedScript(EventObject evt = null)

### selectAll

    void selectAll(EventObject evt = null)

### selectFilename

    public def selectFilename(def name = "Open")

### setDirty

    void setDirty(boolean newDirty)

### setRowNumAndColNum

    void setRowNumAndColNum()

### setVariable

    void setVariable(String name, Object value)

### showAbout

    void showAbout(EventObject evt = null)

### showOutputWindow

    void showOutputWindow(EventObject evt = null)

### showRunWaitDialog

    void showRunWaitDialog()

### showScriptInOutput

    void showScriptInOutput(EventObject evt)

### showToolbar

    void showToolbar(EventObject evt)

### smallerFont

    void smallerFont(EventObject evt = null)

### undo

    void undo(EventObject evt = null)

### updateTitle

    void updateTitle()

### visualizeScriptResults

    void visualizeScriptResults(EventObject evt)

Copyright © 2003-2009 The Codehaus. All rights reserved.