console
Class Console.ShellState

java.lang.Object
  extended by console.Console.ShellState
All Implemented Interfaces:
Output
Enclosing class:
Console

public class Console.ShellState
extends java.lang.Object
implements Output

Each Shell of a Console has its own ShellState A ShellState is a writable Output. It holds the document which is the "scrollback buffer".


Constructor Summary
Console.ShellState(Shell shell)
           
 
Method Summary
 void commandDone()
          Call when the command finishes executing.
 javax.swing.text.Document getDocument()
           
 int getInputStart()
           
 void print(java.awt.Color color, java.lang.String msg)
          Prints a line of text with the specified color.
 void setAttrs(int length, javax.swing.text.AttributeSet attrs)
          Changes the attributes of the given text selection to those specified.
 void setInputStart(int cmdStart)
           
 void writeAttrs(javax.swing.text.AttributeSet attrs, java.lang.String msg)
          Prints a string of text with the specified color, without the terminating newline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Console.ShellState

public Console.ShellState(Shell shell)
Method Detail

getDocument

public javax.swing.text.Document getDocument()

getInputStart

public int getInputStart()

setInputStart

public void setInputStart(int cmdStart)

print

public void print(java.awt.Color color,
                  java.lang.String msg)
Description copied from interface: Output
Prints a line of text with the specified color.

Specified by:
print in interface Output
Parameters:
color - The color. If null, the default color will be used
msg - The message

writeAttrs

public void writeAttrs(javax.swing.text.AttributeSet attrs,
                       java.lang.String msg)
Description copied from interface: Output
Prints a string of text with the specified color, without the terminating newline.

Specified by:
writeAttrs in interface Output
Parameters:
attrs - Character attributes
msg - The message

setAttrs

public void setAttrs(int length,
                     javax.swing.text.AttributeSet attrs)
Description copied from interface: Output
Changes the attributes of the given text selection to those specified.

Specified by:
setAttrs in interface Output
Parameters:
length - length of the text
attrs - The new attributes

commandDone

public void commandDone()
Description copied from interface: Output
Call when the command finishes executing.

Specified by:
commandDone in interface Output