Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.contactlist.PresenceFilter
All Implemented Interfaces:
ContactListFilter

public class PresenceFilter
extends Object
implements ContactListFilter

The PresenceFilter is used to filter offline contacts from the contact list.

Author:
Yana Stamcheva

Constructor Summary
PresenceFilter()
          Creates an instance of PresenceFilter.
 
Method Summary
 void applyFilter(FilterQuery filterQuery)
          Applies this filter.
 boolean isMatching(UIContact uiContact)
          Indicates if the given uiContact is matching this filter.
 boolean isMatching(UIGroup uiGroup)
          Indicates if the given uiGroup is matching this filter.
 boolean isShowOffline()
          Returns true if offline contacts are shown, otherwise returns false.
 void setShowOffline(boolean isShowOffline)
          Sets the show offline property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresenceFilter

public PresenceFilter()
Creates an instance of PresenceFilter.

Method Detail

applyFilter

public void applyFilter(FilterQuery filterQuery)
Applies this filter. This filter is applied over the MetaContactListService.

Specified by:
applyFilter in interface ContactListFilter
Parameters:
filterQuery - the query which keeps track of the filtering results

isMatching

public boolean isMatching(UIContact uiContact)
Indicates if the given uiContact is matching this filter.

Specified by:
isMatching in interface ContactListFilter
Parameters:
uiContact - the UIContact to check
Returns:
true if the given uiContact is matching this filter, otherwise returns false

isMatching

public boolean isMatching(UIGroup uiGroup)
Indicates if the given uiGroup is matching this filter.

Specified by:
isMatching in interface ContactListFilter
Parameters:
uiGroup - the UIGroup to check
Returns:
true if the given uiGroup is matching this filter, otherwise returns false

setShowOffline

public void setShowOffline(boolean isShowOffline)
Sets the show offline property.

Parameters:
isShowOffline - indicates if offline contacts are shown

isShowOffline

public boolean isShowOffline()
Returns true if offline contacts are shown, otherwise returns false.

Returns:
true if offline contacts are shown, otherwise returns false

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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