viewer
Class Console

java.lang.Object
  extended by viewer.Console

public class Console
extends java.lang.Object

Method of input and output to be connected to the viewer. Ideally would replace System.in and System.out, which would be useful for fullscreen

Author:
Henry Gross

Constructor Summary
Console()
          Provides a way for the user to send/receive commands to/from the program.
 
Method Summary
 void attachInteraction(Interaction interaction)
          Give consoleIn somewhere to send the commands to
 java.awt.Panel getConsole()
          Gets the cosnole object so it can be attached to the main progran
 java.io.InputStream getIn()
          Gets the input stream so that it can be attached to the main program
 java.io.PrintStream getOut()
          Gets the output stream so that it can be attached to the main program
 boolean isVisible()
          Get the visibility of the console
 void requestFocus()
          Request that the text field receive focus, since that would be nice
 void setVisible(boolean b)
          Show or hide the console
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Console

public Console()
Provides a way for the user to send/receive commands to/from the program. Meant to provide a better interface than just the standard terminal stdin/out

Method Detail

getConsole

public java.awt.Panel getConsole()
Gets the cosnole object so it can be attached to the main progran

Returns:
the entire console

getOut

public java.io.PrintStream getOut()
Gets the output stream so that it can be attached to the main program

Returns:
the output stream

getIn

public java.io.InputStream getIn()
Gets the input stream so that it can be attached to the main program

Returns:
the input stream

attachInteraction

public void attachInteraction(Interaction interaction)
Give consoleIn somewhere to send the commands to

Parameters:
interaction -

setVisible

public void setVisible(boolean b)
Show or hide the console

Parameters:
b - true to display the console

isVisible

public boolean isVisible()
Get the visibility of the console

Returns:
true if the console is visible

requestFocus

public void requestFocus()
Request that the text field receive focus, since that would be nice