public class ContactsModel
- Object
- DefaultListModel
- ContactsModel
ImplementsListModel, MultipleSelectionListModel
This Contacts model is responsible for querying Contacts from the device
and to cache the data for faster usage
Constructors
public ContactsModel(String... ids) | Constructor with contacts ids |
Methods
public void setPlaceHolderImage(Image placeHolder) | Sets the Contacts place holder image. |
public Object getItemAt(int index) | Returns the item at the given offset |
public void addItem(Object item) | Adds the specified item to the end of this list. |
public void removeItem(int index) | Removes the item at the specified position in this list. |
Inherited methods
From DefaultListModel
getSize, getSelectedIndex, setSelectedIndex, setItem, addItemAtIndex, removeAll, addDataChangedListener, removeDataChangedListener, fireDataChangedEvent, addSelectionListener, removeSelectionListener, getList, addSelectedIndices, removeSelectedIndices, getSelectedIndices, setSelectedIndices, isMultiSelectionMode, setMultiSelectionMode
Constructor details
ContactsModel
public ContactsModel(String... ids)Constructor with contacts ids
Parameters
idsString...- the contact ids we would like this model to handle
Method details
setPlaceHolderImage
public void setPlaceHolderImage(Image placeHolder)Sets the Contacts place holder image.
Parameters
placeHolderImage- image place holder for the contacts
getItemAt
public Object getItemAt(int index)Returns the item at the given offset
Parameters
indexint- an index into this list
Returns
the item at the specified index
addItem
public void addItem(Object item)Adds the specified item to the end of this list.
An optional operation for mutable lists, it can throw an unsupported operation
exception if a list model is not mutable.
Parameters
itemObject- the item to be added
removeItem
public void removeItem(int index)Removes the item at the specified position in this list.
Parameters
indexint- the index of the item to removed