|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.AbstractListModel
|
+--au.edu.swin.synergy.lib.BListModel
Provides a generic means of placing items in a JList or anything else that accepts a ListModel and have more control over its contents.
| Field Summary | |
protected Vector |
listContent
The content of the list model |
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Constructor Summary | |
BListModel()
|
|
| Method Summary | |
void |
addElement(Object obj)
Adds the specified component to the end of this list. |
void |
doRefresh()
This will fire the contents changed event to all the List objects containing this model. |
Object |
getElementAt(int index)
Returns the component at the specified index. |
int |
getSize()
This will get the number of elements in the list |
int |
indexOf(Object element)
Gets the index of the specified element. |
void |
removeAllElements()
Removes all components from this list and sets its size to zero. |
void |
removeElement(Object element)
This will remove the given element from the list |
void |
removeElementAt(int index)
This will remove the element at the given location from the list. |
void |
set(int index,
Object element)
This will set the given element at the specified index. |
void |
setContents(Vector updatedContents)
By using this method to set the contents of the model, either initially or to update them, and it will retain the current selection settings. |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener,
fireContentsChanged,
fireIntervalAdded,
fireIntervalRemoved,
removeListDataListener |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Vector listContent
| Constructor Detail |
public BListModel()
| Method Detail |
public int getSize()
- public Object getElementAt(int index)
Note: Although this method is not deprecated, the preferred method to use is get(int), which implements the List interface defined in the 1.2 Collections framework.
index - an index into this list.
public void set(int index,
Object element)
index - The location to set the elementelement - The element to set
Please complete the missing tags for setpublic void setContents(Vector updatedContents)
updatedContents - The contents of the list
Please complete the missing tags for setContentspublic void addElement(Object obj)
obj - the component to be added.public void removeElementAt(int index)
index - The index of the element to removepublic void removeElement(Object element)
element - The element to remove
Please complete the missing tags for removeElementpublic void removeAllElements()
Note: Although this method is not deprecated, the preferred method to use is clear(), which implements the List interface defined in the 1.2 Collections framework.
- #clear(),
Please complete the missing tags for removeAllElementspublic int indexOf(Object element)
- public void doRefresh()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||