|
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.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JList
net.java.sip.communicator.impl.gui.main.contactlist.DefaultContactList
net.java.sip.communicator.impl.gui.main.contactlist.ContactList
public class ContactList
The ContactList is a JList that represents the contact list. A
custom data model and a custom list cell renderer is used. This class manages
all meta contact list events, like metaContactAdded,
metaContactMoved, metaContactGroupAdded, etc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JList |
|---|
JList.AccessibleJList, JList.DropLocation |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.impl.gui.main.contactlist.DefaultContactList |
|---|
renderer |
| Fields inherited from class javax.swing.JList |
|---|
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ContactList(MainFrame mainFrame)
Creates an instance of the ContactList. |
|
| Method Summary | |
|---|---|
void |
addActiveContact(MetaContact metaContact)
Adds the given MetaContact to the list of active contacts. |
void |
addContact(MetaContact contact)
Adds the given contact to the contact list. |
void |
addContactListListener(ContactListListener listener)
Adds a listener for ContactListEvents. |
void |
addExcContactListListener(ContactListListener listener)
Adds a listener for ContactListEvents. |
void |
addGroup(MetaContactGroup group)
Refreshes all the contact list. |
void |
childContactsReordered(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. |
protected void |
fireContactListEvent(List<ContactListListener> contactListListeners,
ContactListEvent event)
|
void |
fireContactListEvent(MetaContact sourceContact,
int eventID,
int clickCount)
Creates the corresponding ContactListEvent and notifies all ContactListListeners that a contact is selected. |
void |
fireContactListEvent(Object source,
int eventID,
int clickCount)
Creates the corresponding ContactListEvent and notifies all ContactListListeners that a contact is selected. |
Iterator<MetaContactGroup> |
getAllGroups()
Returns the list of all groups. |
MetaContactRightButtonMenu |
getContactRightButtonMenu()
Returns the right button menu for a contact. |
MetaContactGroup |
getGroupByID(String metaUID)
Returns the Meta Contact Group corresponding to the given MetaUID. |
GroupRightButtonMenu |
getGroupRightButtonMenu()
Returns the right button menu for a group. |
MainFrame |
getMainFrame()
Returns the main frame. |
boolean |
isGroupClosed(MetaContactGroup group)
Checks whether the group is closed. |
boolean |
isMetaContactActive(MetaContact metaContact)
Checks if the given contact is currently active. |
void |
metaContactAdded(MetaContactEvent evt)
Handles the MetaContactEvent. |
void |
metaContactAvatarUpdated(MetaContactAvatarUpdateEvent evt)
Indicates that a new avatar is available for a MetaContact. |
void |
metaContactGroupAdded(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. |
void |
metaContactGroupModified(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. |
void |
metaContactGroupRemoved(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. |
void |
metaContactModified(MetaContactModifiedEvent evt)
Handles the MetaContactModifiedEvent. |
void |
metaContactMoved(MetaContactMovedEvent evt)
Handles the MetaContactMovedEvent. |
void |
metaContactRemoved(MetaContactEvent evt)
Handles the MetaContactEvent. |
void |
metaContactRenamed(MetaContactRenamedEvent evt)
Handles the MetaContactRenamedEvent. |
void |
modifyGroup(MetaContactGroup group)
Refreshes the given group content. |
void |
mouseClicked(MouseEvent e)
Manages a mouse click over the contact list. |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
Selects the contact or group under the right mouse click. |
void |
mouseReleased(MouseEvent e)
|
void |
moveContactToGroup(Contact srcContact,
MetaContactGroup destGroup)
Moves the given srcContact to the destGroup. |
void |
moveContactToMetaContact(Contact srcContact,
MetaContact destMetaContact)
Moves the given srcContact to the destMetaContact. |
void |
moveMetaContactToGroup(MetaContact srcContact,
MetaContactGroup destGroup)
Moves the given srcContact to the destGroup. |
void |
moveMetaContactToMetaContact(MetaContact srcMetaContact,
MetaContact destMetaContact)
Moves the given srcMetaContact to the destMetaContact. |
void |
protoContactAdded(ProtoContactEvent evt)
Handles the ProtoContactEvent. |
void |
protoContactModified(ProtoContactEvent evt)
Implements the MetaContactListListener.protoContactModified method with an empty body since we are not interested in proto contact specific changes (such as the persistent data) in the user interface. |
void |
protoContactMoved(ProtoContactEvent evt)
Handles the ProtoContactEvent. |
void |
protoContactRemoved(ProtoContactEvent evt)
Handles the ProtoContactEvent. |
void |
refreshAll()
Refreshes the whole contact list. |
void |
refreshContact(MetaContact contact)
Refreshes the given meta contact content. |
void |
removeActiveContact(MetaContact metaContact)
Removes the given MetaContact from the list of active contacts. |
void |
removeAllActiveContacts()
Removes all contacts from the list of active contacts. |
void |
removeContact(MetaContactEvent event)
Refreshes all the contact list. |
void |
removeContactListListener(ContactListListener listener)
Removes a listener previously added with addContactListListener. |
void |
removeExcContactListListener(ContactListListener listener)
Removes a listener previously added with addContactListListener. |
void |
removeGroup(MetaContactGroup group)
Refreshes all the contact list. |
void |
setDisableOpenClose(boolean disableOpenClose)
If set to true prevents groups to be closed or opened using the mouse. |
void |
setMouseListener(MouseListener l)
Resets the contained mouse listeners and adds the given one. |
void |
setSelectedValue(Object o)
Selects the given object in the list. |
void |
setShowOffline(boolean isShowOffline)
Sets the showOffline property. |
| Methods inherited from class net.java.sip.communicator.impl.gui.main.contactlist.DefaultContactList |
|---|
createToolTip, fireSelectionValueChanged, getMetaContactStatus, getNextMatch, getToolTipText, loadSkin, processMouseEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContactList(MainFrame mainFrame)
mainFrame - The main application window.| Method Detail |
|---|
public void metaContactAdded(MetaContactEvent evt)
metaContactAdded in interface MetaContactListListenerevt - the MetaContactEvent that notified us of the addpublic void metaContactRenamed(MetaContactRenamedEvent evt)
metaContactRenamed in interface MetaContactListListenerevt - the MetaContactRnamedEvent that notified us of the
renamepublic void metaContactModified(MetaContactModifiedEvent evt)
metaContactModified in interface MetaContactListListenerevt - the MetaContactModifiedEvent containing the corresponding
contactpublic void protoContactAdded(ProtoContactEvent evt)
protoContactAdded in interface MetaContactListListenerevt - the ProtoContactEvent that notified us of the addpublic void protoContactRemoved(ProtoContactEvent evt)
protoContactRemoved in interface MetaContactListListenerevt - the ProtoContactEvent that notified us of the removepublic void protoContactMoved(ProtoContactEvent evt)
protoContactMoved in interface MetaContactListListenerevt - the ProtoContactEvent that notified us of the movepublic void protoContactModified(ProtoContactEvent evt)
protoContactModified in interface MetaContactListListenerevt - the ProtoContactEvent that notified us of the
modificationpublic void metaContactRemoved(MetaContactEvent evt)
metaContactRemoved in interface MetaContactListListenerevt - the MetaContactEvent that notified us of the removepublic void metaContactMoved(MetaContactMovedEvent evt)
metaContactMoved in interface MetaContactListListenerevt - the MetaContactEvent that notified us of the movepublic void metaContactAvatarUpdated(MetaContactAvatarUpdateEvent evt)
MetaContactListListener
metaContactAvatarUpdated in interface MetaContactListListenerevt - the MetaContactAvatarUpdateEvent containing details
of this eventpublic void metaContactGroupAdded(MetaContactGroupEvent evt)
metaContactGroupAdded in interface MetaContactListListenerevt - the MetaContactGroupEvent that notified us of the addpublic void metaContactGroupModified(MetaContactGroupEvent evt)
metaContactGroupModified in interface MetaContactListListenerevt - the MetaContactGroupEvent that notified us of the
modificationpublic void metaContactGroupRemoved(MetaContactGroupEvent evt)
metaContactGroupRemoved in interface MetaContactListListenerevt - the MetaContactGroupEvent that notified us of the
removepublic void childContactsReordered(MetaContactGroupEvent evt)
childContactsReordered in interface MetaContactListListenerevt - the MetaContactGroupEvent that notified us of the
reorderingpublic Iterator<MetaContactGroup> getAllGroups()
public MetaContactGroup getGroupByID(String metaUID)
metaUID - An identifier of a group.
public void addContactListListener(ContactListListener listener)
listener - the listener to addpublic void removeContactListListener(ContactListListener listener)
listener - the listener to removepublic void addExcContactListListener(ContactListListener listener)
listener - the listener to addpublic void removeExcContactListListener(ContactListListener listener)
listener - the listener to remove
public void fireContactListEvent(Object source,
int eventID,
int clickCount)
source - the contact that this event is about.eventID - the id indicating the exact type of the event to fire.clickCount - the number of clicks accompanying the event.
public void fireContactListEvent(MetaContact sourceContact,
int eventID,
int clickCount)
sourceContact - the contact that this event is abouteventID - the id indicating the exact type of the event to fire.clickCount -
protected void fireContactListEvent(List<ContactListListener> contactListListeners,
ContactListEvent event)
contactListListeners - event - public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - the MouseEvent that notified us of the clickpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - the MouseEvent that notified us of the presspublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void setDisableOpenClose(boolean disableOpenClose)
disableOpenClose - the disableOpenClose to setpublic void modifyGroup(MetaContactGroup group)
group - the group to refreshpublic void addGroup(MetaContactGroup group)
group - the MetaContactGroup to addpublic void removeGroup(MetaContactGroup group)
group - the MetaContactGroup to removepublic void refreshContact(MetaContact contact)
contact - the meta contact to refreshpublic void refreshAll()
public void addContact(MetaContact contact)
contact - the MetaContact to addpublic void removeContact(MetaContactEvent event)
event - the MetaContactEvent, from which we get the contact
to removepublic void setSelectedValue(Object o)
o - the object to selectpublic MetaContactRightButtonMenu getContactRightButtonMenu()
public GroupRightButtonMenu getGroupRightButtonMenu()
public void setShowOffline(boolean isShowOffline)
isShowOffline - TRUE to show all offline users, FALSE to hide
offline users.public MainFrame getMainFrame()
public void moveContactToMetaContact(Contact srcContact,
MetaContact destMetaContact)
srcContact - the Contact to movedestMetaContact - the destination MetaContact to move to
public void moveMetaContactToMetaContact(MetaContact srcMetaContact,
MetaContact destMetaContact)
srcMetaContact - the MetaContact to movedestMetaContact - the destination MetaContact to move to
public void moveContactToGroup(Contact srcContact,
MetaContactGroup destGroup)
srcContact - the Contact to movedestGroup - the destination MetaContactGroup to move to
public void moveMetaContactToGroup(MetaContact srcContact,
MetaContactGroup destGroup)
srcContact - the MetaContact to movedestGroup - the destination MetaContactGroup to move topublic void addActiveContact(MetaContact metaContact)
metaContact - the MetaContact to add.public void removeActiveContact(MetaContact metaContact)
metaContact - the MetaContact to remove.public void removeAllActiveContacts()
public boolean isMetaContactActive(MetaContact metaContact)
isMetaContactActive in class DefaultContactListmetaContact - the MetaContact to verify
public void setMouseListener(MouseListener l)
l - the mouse listener to set.public boolean isGroupClosed(MetaContactGroup group)
isGroupClosed in class DefaultContactListgroup - The group to check.
|
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 | |||||||||