Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist
Class ContactList

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JList
                  extended by net.java.sip.communicator.impl.gui.main.contactlist.DefaultContactList
                      extended by net.java.sip.communicator.impl.gui.main.contactlist.ContactList
All Implemented Interfaces:
MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, Scrollable, MetaContactListListener, Skinnable

public class ContactList
extends DefaultContactList
implements MetaContactListListener, MouseListener

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.

Author:
Yana Stamcheva, Lubomir Marinov
See Also:
Serialized Form

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 javax.swing.JList
addListSelectionListener, addSelectionInterval, clearSelection, createSelectionModel, ensureIndexIsVisible, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getDropLocation, getDropMode, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setDropMode, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContactList

public ContactList(MainFrame mainFrame)
Creates an instance of the ContactList.

Parameters:
mainFrame - The main application window.
Method Detail

metaContactAdded

public void metaContactAdded(MetaContactEvent evt)
Handles the MetaContactEvent. Refreshes the list model.

Specified by:
metaContactAdded in interface MetaContactListListener
Parameters:
evt - the MetaContactEvent that notified us of the add

metaContactRenamed

public void metaContactRenamed(MetaContactRenamedEvent evt)
Handles the MetaContactRenamedEvent. Refreshes the list when a meta contact is renamed.

Specified by:
metaContactRenamed in interface MetaContactListListener
Parameters:
evt - the MetaContactRnamedEvent that notified us of the rename

metaContactModified

public void metaContactModified(MetaContactModifiedEvent evt)
Handles the MetaContactModifiedEvent. Indicates that a MetaContact has been modified.

Specified by:
metaContactModified in interface MetaContactListListener
Parameters:
evt - the MetaContactModifiedEvent containing the corresponding contact

protoContactAdded

public void protoContactAdded(ProtoContactEvent evt)
Handles the ProtoContactEvent. Refreshes the list when a protocol contact has been added.

Specified by:
protoContactAdded in interface MetaContactListListener
Parameters:
evt - the ProtoContactEvent that notified us of the add

protoContactRemoved

public void protoContactRemoved(ProtoContactEvent evt)
Handles the ProtoContactEvent. Refreshes the list when a protocol contact has been removed.

Specified by:
protoContactRemoved in interface MetaContactListListener
Parameters:
evt - the ProtoContactEvent that notified us of the remove

protoContactMoved

public void protoContactMoved(ProtoContactEvent evt)
Handles the ProtoContactEvent. Refreshes the list when a protocol contact has been moved.

Specified by:
protoContactMoved in interface MetaContactListListener
Parameters:
evt - the ProtoContactEvent that notified us of the move

protoContactModified

public 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.

Specified by:
protoContactModified in interface MetaContactListListener
Parameters:
evt - the ProtoContactEvent that notified us of the modification

metaContactRemoved

public void metaContactRemoved(MetaContactEvent evt)
Handles the MetaContactEvent. Refreshes the list when a meta contact has been removed.

Specified by:
metaContactRemoved in interface MetaContactListListener
Parameters:
evt - the MetaContactEvent that notified us of the remove

metaContactMoved

public void metaContactMoved(MetaContactMovedEvent evt)
Handles the MetaContactMovedEvent. Refreshes the list when a meta contact has been moved.

Specified by:
metaContactMoved in interface MetaContactListListener
Parameters:
evt - the MetaContactEvent that notified us of the move

metaContactAvatarUpdated

public void metaContactAvatarUpdated(MetaContactAvatarUpdateEvent evt)
Description copied from interface: MetaContactListListener
Indicates that a new avatar is available for a MetaContact.

Specified by:
metaContactAvatarUpdated in interface MetaContactListListener
Parameters:
evt - the MetaContactAvatarUpdateEvent containing details of this event

metaContactGroupAdded

public void metaContactGroupAdded(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. Refreshes the list model when a new meta contact group has been added.

Specified by:
metaContactGroupAdded in interface MetaContactListListener
Parameters:
evt - the MetaContactGroupEvent that notified us of the add

metaContactGroupModified

public void metaContactGroupModified(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. Refreshes the list when a meta contact group has been modified.

Specified by:
metaContactGroupModified in interface MetaContactListListener
Parameters:
evt - the MetaContactGroupEvent that notified us of the modification

metaContactGroupRemoved

public void metaContactGroupRemoved(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. Refreshes the list when a meta contact group has been removed.

Specified by:
metaContactGroupRemoved in interface MetaContactListListener
Parameters:
evt - the MetaContactGroupEvent that notified us of the remove

childContactsReordered

public void childContactsReordered(MetaContactGroupEvent evt)
Handles the MetaContactGroupEvent. Refreshes the list model when the contact list groups has been reordered. Moves the selection index to the index of the contact that was selected before the reordered event. This way the selection depends on the contact and not on the index.

Specified by:
childContactsReordered in interface MetaContactListListener
Parameters:
evt - the MetaContactGroupEvent that notified us of the reordering

getAllGroups

public Iterator<MetaContactGroup> getAllGroups()
Returns the list of all groups.

Returns:
The list of all groups.

getGroupByID

public MetaContactGroup getGroupByID(String metaUID)
Returns the Meta Contact Group corresponding to the given MetaUID.

Parameters:
metaUID - An identifier of a group.
Returns:
The Meta Contact Group corresponding to the given MetaUID.

addContactListListener

public void addContactListListener(ContactListListener listener)
Adds a listener for ContactListEvents.

Parameters:
listener - the listener to add

removeContactListListener

public void removeContactListListener(ContactListListener listener)
Removes a listener previously added with addContactListListener.

Parameters:
listener - the listener to remove

addExcContactListListener

public void addExcContactListListener(ContactListListener listener)
Adds a listener for ContactListEvents.

Parameters:
listener - the listener to add

removeExcContactListListener

public void removeExcContactListListener(ContactListListener listener)
Removes a listener previously added with addContactListListener.

Parameters:
listener - the listener to remove

fireContactListEvent

public void fireContactListEvent(Object source,
                                 int eventID,
                                 int clickCount)
Creates the corresponding ContactListEvent and notifies all ContactListListeners that a contact is selected.

Parameters:
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.

fireContactListEvent

public void fireContactListEvent(MetaContact sourceContact,
                                 int eventID,
                                 int clickCount)
Creates the corresponding ContactListEvent and notifies all ContactListListeners that a contact is selected.

Parameters:
sourceContact - the contact that this event is about
eventID - the id indicating the exact type of the event to fire.
clickCount -

fireContactListEvent

protected void fireContactListEvent(List<ContactListListener> contactListListeners,
                                    ContactListEvent event)
Parameters:
contactListListeners -
event -

mouseClicked

public void mouseClicked(MouseEvent e)
Manages a mouse click over the contact list. When the left mouse button is clicked on a contact cell different things may happen depending on the contained component under the mouse. If the mouse is double clicked on the "contact name" the chat window is opened, configured to use the default protocol contact for the selected MetaContact. If the mouse is clicked on one of the protocol icons, the chat window is opened, configured to use the protocol contact corresponding to the given icon. When the right mouse button is clicked on a contact cell, the cell is selected and the ContactRightButtonMenu is opened. When the right mouse button is clicked on a group cell, the cell is selected and the GroupRightButtonMenu is opened. When the middle mouse button is clicked on a cell, the cell is selected.

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - the MouseEvent that notified us of the click

mousePressed

public void mousePressed(MouseEvent e)
Selects the contact or group under the right mouse click.

Specified by:
mousePressed in interface MouseListener
Parameters:
e - the MouseEvent that notified us of the press

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

setDisableOpenClose

public void setDisableOpenClose(boolean disableOpenClose)
If set to true prevents groups to be closed or opened using the mouse.

Parameters:
disableOpenClose - the disableOpenClose to set

modifyGroup

public void modifyGroup(MetaContactGroup group)
Refreshes the given group content.

Parameters:
group - the group to refresh

addGroup

public void addGroup(MetaContactGroup group)
Refreshes all the contact list.

Parameters:
group - the MetaContactGroup to add

removeGroup

public void removeGroup(MetaContactGroup group)
Refreshes all the contact list.

Parameters:
group - the MetaContactGroup to remove

refreshContact

public void refreshContact(MetaContact contact)
Refreshes the given meta contact content.

Parameters:
contact - the meta contact to refresh

refreshAll

public void refreshAll()
Refreshes the whole contact list.


addContact

public void addContact(MetaContact contact)
Adds the given contact to the contact list.

Parameters:
contact - the MetaContact to add

removeContact

public void removeContact(MetaContactEvent event)
Refreshes all the contact list.

Parameters:
event - the MetaContactEvent, from which we get the contact to remove

setSelectedValue

public void setSelectedValue(Object o)
Selects the given object in the list.

Parameters:
o - the object to select

getContactRightButtonMenu

public MetaContactRightButtonMenu getContactRightButtonMenu()
Returns the right button menu for a contact.

Returns:
the right button menu for a contact

getGroupRightButtonMenu

public GroupRightButtonMenu getGroupRightButtonMenu()
Returns the right button menu for a group.

Returns:
the right button menu for a group

setShowOffline

public void setShowOffline(boolean isShowOffline)
Sets the showOffline property.

Parameters:
isShowOffline - TRUE to show all offline users, FALSE to hide offline users.

getMainFrame

public MainFrame getMainFrame()
Returns the main frame.

Returns:
the main frame

moveContactToMetaContact

public void moveContactToMetaContact(Contact srcContact,
                                     MetaContact destMetaContact)
Moves the given srcContact to the destMetaContact.

Parameters:
srcContact - the Contact to move
destMetaContact - the destination MetaContact to move to

moveMetaContactToMetaContact

public void moveMetaContactToMetaContact(MetaContact srcMetaContact,
                                         MetaContact destMetaContact)
Moves the given srcMetaContact to the destMetaContact.

Parameters:
srcMetaContact - the MetaContact to move
destMetaContact - the destination MetaContact to move to

moveContactToGroup

public void moveContactToGroup(Contact srcContact,
                               MetaContactGroup destGroup)
Moves the given srcContact to the destGroup.

Parameters:
srcContact - the Contact to move
destGroup - the destination MetaContactGroup to move to

moveMetaContactToGroup

public void moveMetaContactToGroup(MetaContact srcContact,
                                   MetaContactGroup destGroup)
Moves the given srcContact to the destGroup.

Parameters:
srcContact - the MetaContact to move
destGroup - the destination MetaContactGroup to move to

addActiveContact

public void addActiveContact(MetaContact metaContact)
Adds the given MetaContact to the list of active contacts.

Parameters:
metaContact - the MetaContact to add.

removeActiveContact

public void removeActiveContact(MetaContact metaContact)
Removes the given MetaContact from the list of active contacts.

Parameters:
metaContact - the MetaContact to remove.

removeAllActiveContacts

public void removeAllActiveContacts()
Removes all contacts from the list of active contacts.


isMetaContactActive

public boolean isMetaContactActive(MetaContact metaContact)
Checks if the given contact is currently active.

Overrides:
isMetaContactActive in class DefaultContactList
Parameters:
metaContact - the MetaContact to verify
Returns:
TRUE if the given MetaContact is active, FALSE - otherwise

setMouseListener

public void setMouseListener(MouseListener l)
Resets the contained mouse listeners and adds the given one. This allows other components to integrate the contact list by specifying their own mouse events.

Parameters:
l - the mouse listener to set.

isGroupClosed

public boolean isGroupClosed(MetaContactGroup group)
Checks whether the group is closed.

Overrides:
isGroupClosed in class DefaultContactList
Parameters:
group - The group to check.
Returns:
True if the group is closed, false - otherwise.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.