Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.event
Class WhiteboardParticipantChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.beans.PropertyChangeEvent
          extended by net.java.sip.communicator.service.protocol.event.WhiteboardParticipantChangeEvent
All Implemented Interfaces:
Serializable

public class WhiteboardParticipantChangeEvent
extends PropertyChangeEvent

WhiteboardParticipantChangeEvent-s are triggerred wheneve a change occurs in a WhiteboardParticipant. Dispatched events may be of one of the following types.

WHITEBOARD_PARTICIPANT_STATUS_CHANGE - indicates a change in the status of the participant.

WHITEBOARD_PARTICIPANT_DISPLAY_NAME_CHANGE - means that participant's display name has changed

WHITEBOARD_PARTICIPANT_IMAGE_CHANGE - participant updated photo.

Author:
Julien Waechter, Emil Ivov
See Also:
Serialized Form

Field Summary
static String WHITEBOARD_PARTICIPANT_DISPLAY_NAME_CHANGE
          An event type indicating that the corresponding event is caused by a change of the participant's display name.
static String WHITEBOARD_PARTICIPANT_IMAGE_CHANGE
          An event type indicating that the corresponding event is caused by a change of the participant's photo/picture.
static String WHITEBOARD_PARTICIPANT_STATE_CHANGE
          An event type indicating that the corresponding event is caused by a change of the WhiteboardParticipant's status.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WhiteboardParticipantChangeEvent(WhiteboardParticipant source, String type, Object oldValue, Object newValue)
          Creates a WhiteboardParticipantChangeEvent with the specified source, type, oldValue and newValue.
WhiteboardParticipantChangeEvent(WhiteboardParticipant source, String type, Object oldValue, Object newValue, String reason)
          Creates a WhiteboardParticipantChangeEvent with the specified source, type, oldValue and newValue.
 
Method Summary
 String getEventType()
          Returns the type of this event.
 String getReasonString()
          Returns a reason string further explaining the event (may be null).
 WhiteboardParticipant getSourceWhiteboardParticipant()
          Returns the WhiteboardParticipant that this event is about.
 String toString()
          Returns a String representation of this WhiteboardParticipantChangeEvent.
 
Methods inherited from class java.beans.PropertyChangeEvent
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WHITEBOARD_PARTICIPANT_STATE_CHANGE

public static final String WHITEBOARD_PARTICIPANT_STATE_CHANGE
An event type indicating that the corresponding event is caused by a change of the WhiteboardParticipant's status.

See Also:
Constant Field Values

WHITEBOARD_PARTICIPANT_DISPLAY_NAME_CHANGE

public static final String WHITEBOARD_PARTICIPANT_DISPLAY_NAME_CHANGE
An event type indicating that the corresponding event is caused by a change of the participant's display name.

See Also:
Constant Field Values

WHITEBOARD_PARTICIPANT_IMAGE_CHANGE

public static final String WHITEBOARD_PARTICIPANT_IMAGE_CHANGE
An event type indicating that the corresponding event is caused by a change of the participant's photo/picture.

See Also:
Constant Field Values
Constructor Detail

WhiteboardParticipantChangeEvent

public WhiteboardParticipantChangeEvent(WhiteboardParticipant source,
                                        String type,
                                        Object oldValue,
                                        Object newValue)
Creates a WhiteboardParticipantChangeEvent with the specified source, type, oldValue and newValue.

Parameters:
source - the participant that produced the event.
type - the type of the event (i.e. address change, state change etc.).
oldValue - the value of the changed property before the event occurred
newValue - current value of the changed property.

WhiteboardParticipantChangeEvent

public WhiteboardParticipantChangeEvent(WhiteboardParticipant source,
                                        String type,
                                        Object oldValue,
                                        Object newValue,
                                        String reason)
Creates a WhiteboardParticipantChangeEvent with the specified source, type, oldValue and newValue.

Parameters:
source - the participant that produced the event.
type - the type of the event (i.e. address change, state change etc.).
oldValue - the value of the changed property before the event occurred
newValue - current value of the changed property.
reason - a string containing a human readable explanation for the reason that triggerred this event (may be null).
Method Detail

getEventType

public String getEventType()
Returns the type of this event.

Returns:
a string containing one of the following values: WHITEBOARD_PARTICIPANT_STATUS_CHANGE, WHITEBOARD_PARTICIPANT_DISPLAY_NAME_CHANGE, WHITEBOARD_PARTICIPANT_ADDRESS_CHANGE, WHITEBOARD_PARTICIPANT_IMAGE_CHANGE

toString

public String toString()
Returns a String representation of this WhiteboardParticipantChangeEvent.

Overrides:
toString in class EventObject
Returns:
A a String representation of this WhiteboardParticipantChangeEvent.

getSourceWhiteboardParticipant

public WhiteboardParticipant getSourceWhiteboardParticipant()
Returns the WhiteboardParticipant that this event is about.

Returns:
a reference to the WhiteboardParticipant that is the source of this event.

getReasonString

public String getReasonString()
Returns a reason string further explaining the event (may be null). The string would be mostly used for events issued upon a WhiteboardParticipantState transition that has led to a FAILED state.

Returns:
a reason string further explaining the event or null if no reason was set.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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