de.lessvoid.nifty.controls
Interface Console

All Superinterfaces:
NiftyControl
All Known Implementing Classes:
ConsoleControl

public interface Console
extends NiftyControl

The Console interface is the Nifty control API view of a Nifty Console control.

Author:
void

Method Summary
 void changeColors(Color standardColor, Color errorColor)
          Change the output colors.
 void clear()
          Clear the console.
 String[] getConsoleContent()
          Get the complete content of the console as an array of Strings.
 TextField getTextField()
          This gives you access to the Textfield that the Console uses for text input.
 void output(String line)
          output a line of text (or multiple lines separated by \n) to the console.
 void output(String line, Color color)
          output a line of text (or multiple lines separated by \n) to the console.
 void outputError(String line)
          output a line of text (or multiple lines separated by \n) with the error color
 
Methods inherited from interface de.lessvoid.nifty.controls.NiftyControl
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth
 

Method Detail

output

void output(String line)
output a line of text (or multiple lines separated by \n) to the console.

Parameters:
line - the line of text to output to the console

output

void output(String line,
            Color color)
output a line of text (or multiple lines separated by \n) to the console.

Parameters:
line - the line of text to output to the console
color -

outputError

void outputError(String line)
output a line of text (or multiple lines separated by \n) with the error color

Parameters:
line - the line of text to output to the console

getConsoleContent

String[] getConsoleContent()
Get the complete content of the console as an array of Strings.

Returns:
console content

clear

void clear()
Clear the console.


getTextField

TextField getTextField()
This gives you access to the Textfield that the Console uses for text input.

Returns:
the Nifty TextField control

changeColors

void changeColors(Color standardColor,
                  Color errorColor)
Change the output colors. A color can be null in which case the default color of the console is being used.

Parameters:
standardColor - the output color for the normal output
errorColor - the output color for the error output


Copyright © 2011. All Rights Reserved.