Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist.notifsource
Class NotificationGroup

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.contactlist.notifsource.NotificationGroup
All Implemented Interfaces:
UIGroup

public class NotificationGroup
extends Object
implements UIGroup

The NotificationGroup represents a group of notification entries shown in the contact list history view. It could represent the voice messages,.emails, etc.

Author:
Yana Stamcheva

Constructor Summary
NotificationGroup(OperationSetMessageWaiting.MessageType type)
          Creates an instance of NotificationGroup by specifying the message type.
 
Method Summary
 int countChildContacts()
          Returns the child contacts count.
 int countOnlineChildContacts()
          Returns the count of online child contacts.
 Object getDescriptor()
          Returns the descriptor of the group.
 String getDisplayName()
          The display name of the group.
 GroupNode getGroupNode()
          Returns the GroupNode corresponding to this UIGroup.
 String getId()
          Returns the identifier of this group.
 OperationSetMessageWaiting.MessageType getMessageType()
          Returns the message type indicating the identity of this group.
 Iterator<? extends UIContact> getNotifications()
          Returns an Iterator over a list of all notification contacts contained in this group.
 UIGroup getParentGroup()
          Returns null to indicate that the parent group is the root group.
 JPopupMenu getRightButtonMenu()
          Returns null to indicate that there's no right button menu provided for this group.
 int getSourceIndex()
          Returns the index of this group in its source.
 boolean isGroupCollapsed()
          Returns false to indicate that this group is never collapsed.
 void messageWaitingNotify(MessageWaitingEvent event)
          Creates all necessary notification contacts coming from the given MessageWaitingEvent.
 void setGroupNode(GroupNode groupNode)
          Sets the GroupNode corresponding to this UIGroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationGroup

public NotificationGroup(OperationSetMessageWaiting.MessageType type)
Creates an instance of NotificationGroup by specifying the message type.

Parameters:
type - the type of messages that this group would contain
Method Detail

getDescriptor

public Object getDescriptor()
Returns the descriptor of the group. This would be the underlying object that should provide all other necessary information for the group.

Specified by:
getDescriptor in interface UIGroup
Returns:
the descriptor of the group

getDisplayName

public String getDisplayName()
The display name of the group. The display name is the name to be shown in the contact list group row.

Specified by:
getDisplayName in interface UIGroup
Returns:
the display name of the group

getSourceIndex

public int getSourceIndex()
Returns the index of this group in its source. In other words this is the descriptor index.

Specified by:
getSourceIndex in interface UIGroup
Returns:
the index of this group in its source

getParentGroup

public UIGroup getParentGroup()
Returns null to indicate that the parent group is the root group.

Specified by:
getParentGroup in interface UIGroup
Returns:
null

isGroupCollapsed

public boolean isGroupCollapsed()
Returns false to indicate that this group is never collapsed.

Specified by:
isGroupCollapsed in interface UIGroup
Returns:
false

countOnlineChildContacts

public int countOnlineChildContacts()
Returns the count of online child contacts.

Specified by:
countOnlineChildContacts in interface UIGroup
Returns:
the count of online child contacts

countChildContacts

public int countChildContacts()
Returns the child contacts count.

Specified by:
countChildContacts in interface UIGroup
Returns:
child contacts count

getId

public String getId()
Returns the identifier of this group.

Specified by:
getId in interface UIGroup
Returns:
the identifier of this group

getGroupNode

public GroupNode getGroupNode()
Returns the GroupNode corresponding to this UIGroup. The is the actual node used in the contact list component data model.

Specified by:
getGroupNode in interface UIGroup
Returns:
the GroupNode corresponding to this UIGroup

setGroupNode

public void setGroupNode(GroupNode groupNode)
Sets the GroupNode corresponding to this UIGroup.

Specified by:
setGroupNode in interface UIGroup
Parameters:
groupNode - the GroupNode to set. The is the actual node used in the contact list component data model.

getRightButtonMenu

public JPopupMenu getRightButtonMenu()
Returns null to indicate that there's no right button menu provided for this group.

Specified by:
getRightButtonMenu in interface UIGroup
Returns:
null

getNotifications

public Iterator<? extends UIContact> getNotifications()
Returns an Iterator over a list of all notification contacts contained in this group.

Returns:
an Iterator over a list of all notification contacts contained in this group

getMessageType

public OperationSetMessageWaiting.MessageType getMessageType()
Returns the message type indicating the identity of this group.

Returns:
the message type corresponding to this group

messageWaitingNotify

public void messageWaitingNotify(MessageWaitingEvent event)
Creates all necessary notification contacts coming from the given MessageWaitingEvent.

Parameters:
event - the MessageWaitingEvent that notified us

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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