de.grogra.pf.ui
Interface Console

All Superinterfaces:
Context, Disposable, Panel

public interface Console
extends Panel

A Console represents a Panel of the GUI which provides textual input and output.

Author:
Ole Kniemeyer

Nested Class Summary
static class Console.ConsoleWriter
          A ConsoleWriter is a PrintWriter with the additional possibility to set the text color to use.
 
Field Summary
 
Fields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSOR
 
Method Summary
 void clear()
          Clears the console.
 void enter(java.lang.String text)
          Enters text as if the user had typed this text.
 Console.ConsoleWriter getErr()
          This method returns a ConsoleWriter which is used to write to the console.
 java.io.Reader getIn()
          This method returns a Reader which can be used to obtain the textual input from the user.
 Console.ConsoleWriter getOut()
          This method returns a ConsoleWriter which is used to write to the console.
 void setNameCompletion(NameCompletion nc)
           
 
Methods inherited from interface de.grogra.pf.ui.Panel
checkClose, getContent, getDecorator, getMenu, getPanelId, getUIPropertyMap, initDecorator, resolve, setContent, setCursor, setMenu, show
 
Methods inherited from interface de.grogra.pf.ui.Context
getComponent, getPanel, getWindow, getWorkbench
 
Methods inherited from interface de.grogra.util.Disposable
dispose
 

Method Detail

clear

void clear()
Clears the console.


enter

void enter(java.lang.String text)
Enters text as if the user had typed this text.

Parameters:
text - text to enter in the console

getErr

Console.ConsoleWriter getErr()
This method returns a ConsoleWriter which is used to write to the console. It should be used for error messages. Implementations should use a different color to highlight the characters which are written through this writer.

Returns:
a writer

getIn

java.io.Reader getIn()
This method returns a Reader which can be used to obtain the textual input from the user.

Returns:
a reader

getOut

Console.ConsoleWriter getOut()
This method returns a ConsoleWriter which is used to write to the console. It should be used for normal messages.

Returns:
a writer

setNameCompletion

void setNameCompletion(NameCompletion nc)