- All Superinterfaces:
Context
,Disposable
,Panel
- All Known Implementing Classes:
CLIConsolePanel
,JConsole
A
Console
represents a Panel
of
the GUI which provides textual input and output.- Author:
- Ole Kniemeyer
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
AConsoleWriter
is aPrintWriter
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
Modifier and TypeMethodDescriptionvoid
clear()
Clears the console.void
Enterstext
as if the user had typed this text.getErr()
This method returns aConsoleWriter
which is used to write to the console.getIn()
This method returns aReader
which can be used to obtain the textual input from the user.getOut()
This method returns aConsoleWriter
which is used to write to the console.void
Methods inherited from interface de.grogra.pf.ui.Context
getComponent, getPanel, getWindow, getWorkbench
Methods inherited from interface de.grogra.util.Disposable
dispose
Methods inherited from interface de.grogra.pf.ui.Panel
checkClose, getContent, getDecorator, getMenu, getPanelId, getUIPropertyMap, initDecorator, initialize, resolve, setContent, setCursor, setMenu, show
-
Method Details
-
enter
Enterstext
as if the user had typed this text.- Parameters:
text
- text to enter in the console
-
clear
void clear()Clears the console. -
getIn
Reader getIn()This method returns aReader
which can be used to obtain the textual input from the user.- Returns:
- a reader
-
getOut
Console.ConsoleWriter getOut()This method returns aConsoleWriter
which is used to write to the console. It should be used for normal messages.- Returns:
- a writer
-
getErr
Console.ConsoleWriter getErr()This method returns aConsoleWriter
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
-
setNameCompletion
-