com.limegroup.gnutella.gui
Class BufferListModel

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended bycom.limegroup.gnutella.gui.BufferListModel
All Implemented Interfaces:
javax.swing.ListModel, java.io.Serializable

public class BufferListModel
extends javax.swing.AbstractListModel

Use the Buffer class to efficiently deal with adding to a fixed sized ListModel.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
BufferListModel(int size)
          Create list model with size capacity
 
Method Summary
 void addFirst(java.lang.Object val)
          Add to the top of the fixed sized list.
 void changeSize(int size)
          Change the size of the fixed list while maintaining the content
 java.lang.Object getElementAt(int idx)
          Implement the default value getter for ListModel
 int getSize()
          Implement the default size return for ListModel
 void removeAllElements()
          Clear the list
 
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

BufferListModel

public BufferListModel(int size)
Create list model with size capacity

Method Detail

getElementAt

public java.lang.Object getElementAt(int idx)
Implement the default value getter for ListModel


getSize

public int getSize()
Implement the default size return for ListModel


changeSize

public void changeSize(int size)
Change the size of the fixed list while maintaining the content


removeAllElements

public void removeAllElements()
Clear the list


addFirst

public void addFirst(java.lang.Object val)
Add to the top of the fixed sized list.