- 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAConsoleWriteris aPrintWriterwith the additional possibility to set the text color to use. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intint stating that you use the LaF colorFields 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 TypeMethodDescriptionvoidclear()Clears the console.voidEnterstextas if the user had typed this text.getErr()This method returns aConsoleWriterwhich is used to write to the console.getIn()This method returns aReaderwhich can be used to obtain the textual input from the user.getOut()This method returns aConsoleWriterwhich is used to write to the console.voidMethods inherited from interface de.grogra.pf.ui.Context
getComponent, getPanel, getWindow, getWorkbenchMethods inherited from interface de.grogra.util.Disposable
disposeMethods inherited from interface de.grogra.pf.ui.Panel
checkClose, getContent, getDecorator, getMenu, getPanelId, getUIPropertyMap, initDecorator, initialize, resolve, setContent, setCursor, setMenu, show
-
Field Details
-
USE_LAF_COLOR
static final int USE_LAF_COLORint stating that you use the LaF color- See Also:
-
-
Method Details
-
enter
Enterstextas 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 aReaderwhich can be used to obtain the textual input from the user.- Returns:
- a reader
-
getOut
Console.ConsoleWriter getOut()This method returns aConsoleWriterwhich is used to write to the console. It should be used for normal messages.- Returns:
- a writer
-
getErr
Console.ConsoleWriter getErr()This method returns aConsoleWriterwhich 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
-