Methods Summary |
---|
public boolean | add(java.lang.Object o)
boolean b = super.add(o);
if (b)
notifyListeners();
return b;
|
public void | add(int index, java.lang.Object element)
super.add(index, element);
notifyListeners();
|
public boolean | addAll(java.util.Collection o)
boolean b = super.add(o);
if (b)
notifyListeners();
return b;
|
public void | addListDataListener(javax.swing.event.ListDataListener l)
listeners.add(l);
|
public void | clear()
super.clear();
notifyListeners();
|
public java.lang.Object | getElementAt(int index)
return get(index);
|
public int | getSize()
return size();
|
void | notifyListeners()
// no attempt at optimziation
ListDataEvent le = new ListDataEvent(source,
ListDataEvent.CONTENTS_CHANGED, 0, getSize());
for (int i=0; i<listeners.size(); i++) {
((ListDataListener)listeners.get(i)).contentsChanged(le);
}
|
public java.lang.Object | remove(int i)
Object o = super.remove(i);
notifyListeners();
return o;
|
public boolean | remove(java.lang.Object o)
boolean b = super.remove(o);
if (b)
notifyListeners();
return b;
|
public void | removeListDataListener(javax.swing.event.ListDataListener l)
listeners.remove(l);
|
public java.lang.Object | set(int index, java.lang.Object element)
Object o = super.set(index, element);
notifyListeners();
return o;
|