edu.princeton.toy
Class TStdinPane.ListModel

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

protected static class TStdinPane.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
TStdinPane.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

TStdinPane.ListModel

public TStdinPane.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.