All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mootcan.UserOutputArea

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----mootcan.UserOutputArea

public class UserOutputArea
extends Panel
implements Runnable
gives the user a textual representation of a stream. the TextArea scrolls pretty slow on the implementations of jvm that I've seen. the problem is solved by not updating the TextArea until we've read all lines currently pending in the stream. it may seem like overkill to add a new panel just for the TextArea here. the reason I did this was to make it possible to try to add a java-1.1 TextArea which is superior to the java-1.0 one. (we are allowed to construct it without scrollbars). if the java-1.1 TextArea is not found, we fall back to the java-1.0 one.

Author:
Sindre Sørensen

Variable Index

 o ancientAWT
 o buffer
 o buffIn
 o history
 o in
 o inputArea
 o inputStream
 o maxHistoryLength
 o maxMaxHistoryLength
 o numberOfRows
 o outputArea
 o outputStream
 o userOutputThread

Constructor Index

 o UserOutputArea(Font, CommandTextField)

Method Index

 o getOutputStream()
 o refreshScreen()
put the tail of the history onto the screen
 o run()
 o scrollToBottom()

Variables

 o outputArea
 private TextArea outputArea
 o outputStream
 private PipedOutputStream outputStream
 o inputStream
 private PipedInputStream inputStream
 o in
 private DataInputStream in
 o buffIn
 private BufferedInputStream buffIn
 o userOutputThread
 private Thread userOutputThread
 o inputArea
 private CommandTextField inputArea
 o maxHistoryLength
 int maxHistoryLength
 o maxMaxHistoryLength
 int maxMaxHistoryLength
 o numberOfRows
 private int numberOfRows
 o history
 String history
 o buffer
 String buffer
 o ancientAWT
 private boolean ancientAWT

Constructors

 o UserOutputArea
 UserOutputArea(Font font,
                CommandTextField inputArea)
Parameters:
font - the font of the scrolling text the next parameter is necessary because we use select() to scroll down, and that also makes us catch the keyboard focus of the applet
inputArea - what should be given the focus after we've written something to the outputArea

Methods

 o getOutputStream
 public OutputStream getOutputStream()
 o scrollToBottom
 private void scrollToBottom()
 o refreshScreen
 private synchronized void refreshScreen()
put the tail of the history onto the screen

 o run
 public void run()

All Packages  Class Hierarchy  This Package  Previous  Next  Index