public interface KListModel extends ModelProperties
COLUMN_NAMES_PROPERTY, COLUMN_TYPES_PROPERTY
Modifier and Type | Method and Description |
---|---|
void |
addItem(Object item)
Add an item to the model.
|
void |
addListModelListener(KListModelListener listener)
Add a
ListModelListener to this model's list of listeners. |
void |
clear()
Remove all items from the model.
|
Icon |
getIcon(Object item)
Get the icon for an item.
|
Object |
getItemAt(int index)
Get the item at the specified index in the model.
|
int |
getItemCount()
Get the number of items in the model.
|
Iterator |
getItems()
Return an
Enumeration of the items in the model. |
String |
getLabel(Object item)
Get the label for an item.
|
Object |
getValueForProperty(Object item,
String property)
Get the value of an arbitrary property for a given item.
|
int |
indexOf(Object item)
Get the index of the specified item in the model.
|
void |
insertItemAt(Object item,
int index)
Insert an item at the specified index in the model.
|
boolean |
isEmpty()
Determine if the model is empty.
|
void |
removeItem(Object item)
Remove the specified item from the model.
|
void |
removeItemAt(int index)
Remove the item at the specified index from the model.
|
void |
removeListModelListener(KListModelListener listener)
Remove a
KListModelListener from this model's list of
listeners. |
void |
updateItem(Object item)
Indicate to listeners that the specified item has changed.
|
void |
updateItemAt(int index)
Indicate to listeners that the item at the specified index has changed.
|
boolean isEmpty()
true
if the model is empty, and false
otherwise.void clear()
int getItemCount()
Iterator getItems()
Enumeration
of the items in the model.Enumeration
of the items.Object getItemAt(int index)
index
- The index.int indexOf(Object item)
item
- The item.-1
if the item is not in
the model.void addItem(Object item)
item
- The new item.void insertItemAt(Object item, int index)
item
- The new item.index
- The index.void removeItemAt(int index)
index
- The index.void removeItem(Object item)
item
- The item.void updateItem(Object item)
item
- The item.void updateItemAt(int index)
index
- The index.void addListModelListener(KListModelListener listener)
ListModelListener
to this model's list of listeners.listener
- The listener to add.void removeListModelListener(KListModelListener listener)
KListModelListener
from this model's list of
listeners.listener
- The listener to remove.String getLabel(Object item)
item
- The item.Icon getIcon(Object item)
item
- The item.Object getValueForProperty(Object item, String property)
item
- The item.property
- The name of the property.null
if
there is no value for this property.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses