public class NotificationContact extends UIContactImpl implements RegistrationStateChangeListener, ProviderPresenceStatusListener
STATUS_MESSAGE
Constructor and Description |
---|
NotificationContact(NotificationGroup group,
ProtocolProviderService protocolProvider,
OperationSetMessageWaiting.MessageType messageType,
NotificationMessage notificationMessage)
Creates an instance of NotificationContact by specifying the
parent group and the corresponding ProtocolProviderService.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<SIPCommButton> |
getContactCustomActionButtons()
Returns all custom action buttons for this notification contact.
|
java.util.List<UIContactDetail> |
getContactDetails()
Returns a list of all contained UIContactDetails.
|
java.util.List<UIContactDetail> |
getContactDetailsForOperationSet(java.lang.Class<? extends OperationSet> opSetClass)
Returns a list of UIContactDetails supporting the given
OperationSet class.
|
ContactNode |
getContactNode()
Returns the corresponding ContactNode.
|
UIContactDetail |
getDefaultContactDetail(java.lang.Class<? extends OperationSet> opSetClass)
Returns the default ContactDetail to use for any operations
depending to the given OperationSet class.
|
java.lang.Object |
getDescriptor()
Returns the descriptor of this contact.
|
java.lang.String |
getDisplayDetails()
Returns the display details of this contact.
|
java.lang.String |
getDisplayName()
Returns the display name of this contact.
|
NotificationMessage |
getNotificationMessage()
Returns the notification message corresponding to this notification
contact.
|
UIGroup |
getParentGroup()
Returns the parent group.
|
javax.swing.JPopupMenu |
getRightButtonMenu()
Returns null to indicate that no right button menu is provided for this
contact.
|
javax.swing.ImageIcon |
getScaledAvatar(boolean isSelected,
int width,
int height)
Returns the icon indicating that this is a notification contact.
|
java.util.Iterator<java.lang.String> |
getSearchStrings()
No search strings are provided for this contact.
|
int |
getSourceIndex()
Returns the index of this contact in its source.
|
javax.swing.ImageIcon |
getStatusIcon()
Returns the status icon of this contact or null if no status is
available.
|
ExtendedTooltip |
getToolTip()
Returns the tool tip opened on mouse over.
|
int |
getUnreadMessageCount()
Returns the number of unread messages, this notification is about.
|
int |
getUrgentUnreadMessageCount()
Returns the number of urgent unread messages, this notification is
about.
|
void |
providerStatusChanged(ProviderPresenceStatusChangeEvent evt)
Refresh the notification contact corresponding the the attached provider
in order to better reflect its status.
|
void |
providerStatusMessageChanged(java.beans.PropertyChangeEvent evt)
The method is called by a ProtocolProvider implementation whenever a
change in the status message of the corresponding provider has occurred
and has been confirmed by the server.
|
void |
registrationStateChanged(RegistrationStateChangeEvent evt)
Refresh the notification contact corresponding the the attached provider
in order to better reflect its state.
|
void |
setContactNode(ContactNode contactNode)
Sets the given contactNode.
|
void |
setMessageAccount(java.lang.String messageAccount)
Sets the corresponding message account.
|
void |
setParentGroup(UIGroup parentGroup)
Sets the given UIGroup to be the parent group of this
UIContact.
|
void |
setReadMessageCount(int count)
Sets the number of read messages, this notification is about.
|
void |
setUnreadMessageCount(int count)
Sets the number of unread messages, this notification is about.
|
void |
setUnreadUrgentMessageCount(int count)
Sets the number of urgent unread messages, this notification is about.
|
filterAddressDisplay, getAvatar
getContactCustomActionMenuItems, getPreferredHeight
public NotificationContact(NotificationGroup group, ProtocolProviderService protocolProvider, OperationSetMessageWaiting.MessageType messageType, NotificationMessage notificationMessage)
group
- the parent groupprotocolProvider
- the corresponding protocol providermessageType
- the type of the messagenotificationMessage
- the actual notification messagepublic java.lang.Object getDescriptor()
getDescriptor
in class UIContact
public java.lang.String getDisplayName()
getDisplayName
in class UIContactImpl
public java.lang.String getDisplayDetails()
getDisplayDetails
in class UIContact
public int getSourceIndex()
getSourceIndex
in class UIContact
public javax.swing.ImageIcon getScaledAvatar(boolean isSelected, int width, int height)
getScaledAvatar
in class UIContactImpl
isSelected
- indicates if the contact is selectedwidth
- the width of the avatarheight
- the height of the avatarpublic javax.swing.ImageIcon getStatusIcon()
getStatusIcon
in class UIContactImpl
public ExtendedTooltip getToolTip()
getToolTip
in class UIContact
public javax.swing.JPopupMenu getRightButtonMenu()
getRightButtonMenu
in class UIContact
public UIGroup getParentGroup()
getParentGroup
in class UIContact
public void setParentGroup(UIGroup parentGroup)
setParentGroup
in class UIContact
parentGroup
- the parent UIGroup of this contactpublic java.util.Iterator<java.lang.String> getSearchStrings()
getSearchStrings
in class UIContact
public ContactNode getContactNode()
getContactNode
in class UIContactImpl
public void setContactNode(ContactNode contactNode)
setContactNode
in class UIContactImpl
contactNode
- the ContactNode that corresponds to this
UIGrouppublic UIContactDetail getDefaultContactDetail(java.lang.Class<? extends OperationSet> opSetClass)
getDefaultContactDetail
in class UIContact
opSetClass
- the OperationSet class we're interested inpublic java.util.List<UIContactDetail> getContactDetails()
getContactDetails
in class UIContact
public java.util.List<UIContactDetail> getContactDetailsForOperationSet(java.lang.Class<? extends OperationSet> opSetClass)
getContactDetailsForOperationSet
in class UIContact
opSetClass
- the OperationSet class we're interested inpublic void setMessageAccount(java.lang.String messageAccount)
messageAccount
- the message account corresponding to the contained
notificationpublic void setUnreadUrgentMessageCount(int count)
count
- the number of urgent unread messages, this notification is
aboutpublic int getUrgentUnreadMessageCount()
public void setUnreadMessageCount(int count)
count
- the number of unread messages, this notification is aboutpublic int getUnreadMessageCount()
public void setReadMessageCount(int count)
count
- the number of read messages, this notification is aboutpublic NotificationMessage getNotificationMessage()
public void registrationStateChanged(RegistrationStateChangeEvent evt)
registrationStateChanged
in interface RegistrationStateChangeListener
evt
- the ProviderPresenceStatusChangeEvent that has
notified us of the state changepublic void providerStatusChanged(ProviderPresenceStatusChangeEvent evt)
providerStatusChanged
in interface ProviderPresenceStatusListener
evt
- the ProviderPresenceStatusChangeEvent that has
notified us of the status changepublic java.util.Collection<SIPCommButton> getContactCustomActionButtons()
getContactCustomActionButtons
in class UIContact
public void providerStatusMessageChanged(java.beans.PropertyChangeEvent evt)
ProviderPresenceStatusListener
providerStatusMessageChanged
in interface ProviderPresenceStatusListener
evt
- a PropertyChangeEvent with a STATUS_MESSAGE property name,
containing the old and new status messages.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.