|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractListModel
net.java.sip.communicator.impl.gui.main.contactlist.ContactListModel
public class ContactListModel
Implements ListModel for MetaContactListService in order to display it in ContactList as a list instead of a tree.
| Field Summary |
|---|
| Fields inherited from class javax.swing.AbstractListModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
ContactListModel(MetaContactListService contactList)
Initializes a new ContactListModel instance which is to implement ListModel for a specific MetaContactListService in order to display it in ContactList as a list instead of a tree. |
|
| Method Summary | |
|---|---|
void |
closeGroup(MetaContactGroup group)
Closes the given group by hiding all containing contacts. |
void |
contentAdded(int startIndex,
int endIndex)
Informs interested listeners that new cells are added from startIndex to endIndex. |
void |
contentChanged(int startIndex,
int endIndex)
Informs interested listeners that the content has changed of the cells given by the range from startIndex to endIndex. |
void |
contentRemoved(int startIndex,
int endIndex)
Informs interested listeners that a range of cells is removed. |
int |
countChildContacts(MetaContactGroup group)
Counts group child contacts depending on the showOffline option. |
int |
countContactsAndSubgroups(MetaContactGroup parentGroup)
Returns the number of all children of the given MetaContactGroup. |
Object |
getElementAt(int index)
Returns the object at the given index. |
int |
getSize()
Returns the size of this list model. |
int |
indexOf(Object o)
If the given object is instance of MetaContact or MetaContactGroup returns the index of this meta contact or group, otherwiser returns -1. |
boolean |
isContactOnline(MetaContact contact)
Returns TRUE if the given meta contact is online, FALSE otherwise. |
boolean |
isGroupClosed(MetaContactGroup group)
Checks whether the group is closed. |
boolean |
isGroupEmpty(MetaContactGroup group)
Checks whether the group is closed. |
boolean |
isShowOffline()
Returns true if offline contacts should be shown, false otherwise. |
void |
openGroup(MetaContactGroup group)
Opens the given group by showing all containing contacts. |
void |
setShowOffline(boolean showOffline)
Sets the showOffline variable to indicate whether or not offline contacts should be shown. |
| Methods inherited from class javax.swing.AbstractListModel |
|---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContactListModel(MetaContactListService contactList)
contactList - the MetaContactListService which contains the
contact list to be represented as a list by the new instance| Method Detail |
|---|
public void contentChanged(int startIndex,
int endIndex)
startIndex - The start index of the range .endIndex - The end index of the range.
public void contentAdded(int startIndex,
int endIndex)
startIndex - The start index of the range .endIndex - The end index of the range.
public void contentRemoved(int startIndex,
int endIndex)
startIndex - The start index of the range.endIndex - The end index of the range.public int getSize()
public Object getElementAt(int index)
index - The index.
public int indexOf(Object o)
o - the object, which index we search
public int countContactsAndSubgroups(MetaContactGroup parentGroup)
parentGroup - The parent MetaContactGroup.
public void closeGroup(MetaContactGroup group)
group - The group to close.public void openGroup(MetaContactGroup group)
group - The group to open.public boolean isGroupClosed(MetaContactGroup group)
group - The group to check.
public boolean isGroupEmpty(MetaContactGroup group)
group - The group to check.
public boolean isShowOffline()
public void setShowOffline(boolean showOffline)
showOffline - true if offline contacts should be shown, false
otherwise.public boolean isContactOnline(MetaContact contact)
contact - the meta contact
public int countChildContacts(MetaContactGroup group)
group - the parent group to count for
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||