edu.princeton.toy
Class TStdoutPane.ListModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by edu.princeton.toy.TStdoutPane.ListModel
All Implemented Interfaces:
Serializable, ListModel
Enclosing class:
TStdoutPane

protected static class TStdoutPane.ListModel
extends AbstractListModel

A customized implementation of ListModel meant specifically for displaying stdin.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
TStdoutPane.ListModel()
          Constructs a new ListModel.
 
Method Summary
 Object getElementAt(int index)
           
 int getSize()
          Returns the number of elements in the model.
protected  void setData(TWordBuffer buffer)
          Updates the ListModel's data to conform with the provided TWordBuffer.
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TStdoutPane.ListModel

public TStdoutPane.ListModel()
Constructs a new ListModel.

Method Detail

getElementAt

public Object getElementAt(int index)

getSize

public int getSize()
Returns the number of elements in the model.

Returns:
The number of elements in the model.

setData

protected void setData(TWordBuffer buffer)
Updates the ListModel's data to conform with the provided TWordBuffer.

Parameters:
buffer - A TWordBuffer containing the new data.