edu.iu.cnets.klatsch.pane
Class Text

java.lang.Object
  extended by edu.iu.cnets.klatsch.gui.Widget
      extended by edu.iu.cnets.klatsch.gui.Pane
          extended by edu.iu.cnets.klatsch.pane.Text

public class Text
extends Pane

The text pane simply displays a number of lines of output.


Field Summary
(package private)  java.util.List<java.lang.String> buffer
          the stored lines of text
private static int DEFAULT_LINES
          hardwired defaults for the pane configuration
private static java.lang.String DEFAULT_NAME
           
(package private)  int lines
          the maximum number of lines
 
Fields inherited from class edu.iu.cnets.klatsch.gui.Pane
id, name
 
Fields inherited from class edu.iu.cnets.klatsch.gui.Widget
parent, x1, x2, y1, y2
 
Constructor Summary
Text(Value... ls)
          Creates a new text pane.
 
Method Summary
protected  void draw()
          Draws the current buffer.
 Value prop_contents(Value... args)
          Returns the contents of the buffer as a stream of strings.
 Value prop_print(Value... args)
          Writes the given text to the buffer.
 Value prop_println(Value... args)
          Writes the given text to the buffer and adds a newline.
 
Methods inherited from class edu.iu.cnets.klatsch.gui.Pane
id, name
 
Methods inherited from class edu.iu.cnets.klatsch.gui.Widget
clear, in, keyPressed, keyReleased, mouseDragged, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LINES

private static final int DEFAULT_LINES
hardwired defaults for the pane configuration

See Also:
Constant Field Values

DEFAULT_NAME

private static final java.lang.String DEFAULT_NAME
See Also:
Constant Field Values

buffer

java.util.List<java.lang.String> buffer
the stored lines of text


lines

int lines
the maximum number of lines

Constructor Detail

Text

public Text(Value... ls)
     throws EvaluationException
Creates a new text pane. The single parameter, if present, should be a dictionary containing overrides for the default parameters, which are listed below. lines (Number) [default is 25, use 0 for no limit] name (String) [default is "Console"]

Throws:
EvaluationException
Method Detail

draw

protected void draw()
Draws the current buffer.

Specified by:
draw in class Widget

prop_contents

public Value prop_contents(Value... args)
                    throws EvaluationException
Returns the contents of the buffer as a stream of strings.

Throws:
EvaluationException

prop_print

public Value prop_print(Value... args)
                 throws EvaluationException
Writes the given text to the buffer.

Throws:
EvaluationException

prop_println

public Value prop_println(Value... args)
                   throws EvaluationException
Writes the given text to the buffer and adds a newline.

Throws:
EvaluationException