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
-
ancientAWT
-
-
buffer
-
-
buffIn
-
-
history
-
-
in
-
-
inputArea
-
-
inputStream
-
-
maxHistoryLength
-
-
maxMaxHistoryLength
-
-
numberOfRows
-
-
outputArea
-
-
outputStream
-
-
userOutputThread
-
-
UserOutputArea(Font, CommandTextField)
-
-
getOutputStream()
-
-
refreshScreen()
- put the tail of the history onto the screen
-
run()
-
-
scrollToBottom()
-
outputArea
private TextArea outputArea
outputStream
private PipedOutputStream outputStream
inputStream
private PipedInputStream inputStream
in
private DataInputStream in
buffIn
private BufferedInputStream buffIn
userOutputThread
private Thread userOutputThread
inputArea
private CommandTextField inputArea
maxHistoryLength
int maxHistoryLength
maxMaxHistoryLength
int maxMaxHistoryLength
numberOfRows
private int numberOfRows
history
String history
buffer
String buffer
ancientAWT
private boolean ancientAWT
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
getOutputStream
public OutputStream getOutputStream()
scrollToBottom
private void scrollToBottom()
refreshScreen
private synchronized void refreshScreen()
- put the tail of the history onto the screen
run
public void run()
All Packages Class Hierarchy This Package Previous Next Index