|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--com.yospace.yae.yogi.DefaultDataModel
Default implementation of the DataModel interface.
Extends Vector to improve efficiency.
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
DefaultDataModel()
Default constructor. |
|
DefaultDataModel(java.lang.Object[] values)
Constructor taking an Object array of values with which the populate the DataModel. |
|
| Method Summary | |
void |
addItem(java.lang.Object item)
Adds an item to the DataModel. |
void |
addModelListener(AbstractTable table)
Adds a model listener to the DataModel. |
void |
fireModelChanged()
Fires an update to all model listeners that the state of the DataModel has changed. |
void |
fireModelChanged(int start,
int end)
Fires an update to the specified model listeners that the state of the DataModel has changed. |
java.lang.Object |
getItem(int index)
Gets an item from the DataModel. |
int |
getSize()
Gets the size of the DataModel. |
void |
insertItem(java.lang.Object item,
int index)
Inserts an item at the specified position in the DataModel. |
void |
removeAll()
Removes all items from the DataModel. |
void |
removeItem(int index)
Removes the item at the specified position from the DataModel. |
void |
removeModelListener(AbstractTable table)
Removes the specified model listener from the DataModel. |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public DefaultDataModel()
public DefaultDataModel(java.lang.Object[] values)
values - the data.| Method Detail |
public java.lang.Object getItem(int index)
getItem in interface DataModelindex - The index of the item to get.public void addItem(java.lang.Object item)
addItem in interface DataModelitem - The item to add.
public void insertItem(java.lang.Object item,
int index)
insertItem in interface DataModelitem - The item to add.index - The position at which to add the item.public void removeItem(int index)
removeItem in interface DataModelindex - The position from which to remove the item.public void removeAll()
removeAll in interface DataModelpublic int getSize()
getSize in interface DataModelpublic void addModelListener(AbstractTable table)
AbstractTable.addModelListener in interface DataModeltable - the listener to add.public void removeModelListener(AbstractTable table)
AbstractTable.removeModelListener in interface DataModeltable - the listener to remove.public void fireModelChanged()
public void fireModelChanged(int start,
int end)
start - The first model listener to update.end - The last model listener to update.
|
Copyright 2002 Yospace Holdings Ltd. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||