jaugment2.UI.textUI
Class TextUI

java.lang.Object
  |
  +--jaugment2.UI.textUI.TextUI

public class TextUI
extends java.lang.Object

A text-only-UI and reference-implementation of a JAugment-UI


Inner Class Summary
protected static class TextUI.AppEntry
          this is the class for entries in the runningApps-list
protected static class TextUI.InputEntry
          this is the class for entries in the in-list
static class TextUI.ProcessAdaptor
          A simple adaptor to allow us to represent normal shell/console-apps.
 
Field Summary
protected  TextUIRepresentable foregroundApp
          The application, that is currently in the foreground ans receives our input.
private  java.util.LinkedList in
          LinkedList of TextInputDevice representing out input-devices
private  boolean invokedStandalone
           
private  UIManagerEventListener listener
          react to events from out UIManagerBean
private  net.jini.lease.LeaseRenewalManager lrm
           
private  java.util.LinkedList out
          LinkedList of TextOutputDevice representing out input-devices
private  net.jini.core.event.RemoteEventListener reventListener
          listens for Events from our apps
protected  java.util.LinkedList runningApps
          all apps currently running
private  java.lang.StringBuffer sentence
          small buffer used, so we always speak whole sentences
protected  speechSynthesizing synthservice
           
private  UIManagerBean uiManagerBean
           
 
Constructor Summary
TextUI()
           
 
Method Summary
protected  void handleInput(java.lang.String in)
          Here we gather all text-input from the user to process it
protected  void handleOutput(java.lang.String in)
          Here we gather all text-output from foreground-process and stderr-output from others to process it
static void main(java.lang.String[] args)
           
protected  void newApp(TextUIRepresentable rep, boolean dontswitchfocus, java.lang.String name)
          internal function to add a newfound application-instance into the list and (if !dontswitchfocus or there is no application with the input-focus) give it the input-focus
protected  void newInput(TextInputDevice inp)
          a new TextInputDevice has been found, handle it
protected  void newOutput(TextOutputDevice outp)
          a new TextOutputDevice has been found, handle it
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

synthservice

protected speechSynthesizing synthservice

lrm

private net.jini.lease.LeaseRenewalManager lrm

in

private java.util.LinkedList in
LinkedList of TextInputDevice representing out input-devices

out

private java.util.LinkedList out
LinkedList of TextOutputDevice representing out input-devices

runningApps

protected java.util.LinkedList runningApps
all apps currently running

foregroundApp

protected TextUIRepresentable foregroundApp
The application, that is currently in the foreground ans receives our input.

reventListener

private net.jini.core.event.RemoteEventListener reventListener
listens for Events from our apps

uiManagerBean

private UIManagerBean uiManagerBean

listener

private UIManagerEventListener listener
react to events from out UIManagerBean

invokedStandalone

private boolean invokedStandalone

sentence

private java.lang.StringBuffer sentence
small buffer used, so we always speak whole sentences
Constructor Detail

TextUI

public TextUI()
Method Detail

newInput

protected void newInput(TextInputDevice inp)
a new TextInputDevice has been found, handle it

newOutput

protected void newOutput(TextOutputDevice outp)
a new TextOutputDevice has been found, handle it

newApp

protected void newApp(TextUIRepresentable rep,
                      boolean dontswitchfocus,
                      java.lang.String name)
internal function to add a newfound application-instance into the list and (if !dontswitchfocus or there is no application with the input-focus) give it the input-focus

main

public static void main(java.lang.String[] args)

handleOutput

protected void handleOutput(java.lang.String in)
Here we gather all text-output from foreground-process and stderr-output from others to process it

handleInput

protected void handleInput(java.lang.String in)
Here we gather all text-input from the user to process it