SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.systray
Class PopupMessage

java.lang.Object
  extended by net.java.sip.communicator.service.systray.PopupMessage

public class PopupMessage
extends Object

The PopupMessage class encloses informations to show in a popup. While a message title and a message body are mandatory informations, a popup message could provides more stuffs like a component or an image which may be used by a PopupMessageHandler capable to handle it.

Author:
Symphorien Wanko

Constructor Summary
PopupMessage(JComponent component, String title, String message)
          Creates a new PopupMessage with the given JComponent as its content.
PopupMessage(String title, String message)
          Creates a PopupMessage with the given title and message inside.
PopupMessage(String title, String message, byte[] imageIcon)
          Creates a new PopupMessage with the given title, message and icon.
PopupMessage(String title, String message, byte[] imageIcon, Object tag)
          Creates a new PopupMessage with the given JComponent as its content.
PopupMessage(String title, String message, int messageType)
          Creates a system tray message with the given title and message content.
PopupMessage(String title, String message, Object tag)
          Creates a new PopupMessage with the given JComponent as its content.
 
Method Summary
 JComponent getComponent()
          Returns the component contained in this popup message.
 byte[] getIcon()
          Returns the icon of this popup message.
 String getMessage()
          Returns the message contained in this popup.
 String getMessageTitle()
          Returns the title of this popup message.
 int getMessageType()
          Returns the type of this popup message.
 Object getTag()
          Returns the object used to tag this PopupMessage.
 void setComponent(JComponent component)
          Sets the component to be showed in this popup message.
 void setIcon(byte[] imageIcon)
          Sets the icon of this popup message.
 void setMessage(String message)
          Sets the message to show in the popup.
 void setMessageTitle(String messageTitle)
          Sets the title of this popup message.
 void setMessageType(int messageType)
          Sets the type of this popup message.
 void setTag(Object tag)
          Sets the object used to tag this popup message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupMessage

public PopupMessage(String title,
                    String message)
Creates a PopupMessage with the given title and message inside.

Parameters:
title - title of the message
message - message to show in the systray

PopupMessage

public PopupMessage(String title,
                    String message,
                    int messageType)
Creates a system tray message with the given title and message content. The message type will affect the icon used to present the message.

Parameters:
title - the title, which will be shown
message - the content of the message to display
messageType - the message type; one of XXX_MESSAGE_TYPE constants declared in SystrayService

PopupMessage

public PopupMessage(String title,
                    String message,
                    byte[] imageIcon)
Creates a new PopupMessage with the given title, message and icon.

Parameters:
title - the title of the message
message - message to show in the systray
imageIcon - an incon to show in the popup message.

PopupMessage

public PopupMessage(JComponent component,
                    String title,
                    String message)
Creates a new PopupMessage with the given JComponent as its content. This constructor also takes a title and a message as replacements in cases the component is not usable.

Parameters:
component - the component to put in the PopupMessage
title - of the message
message - message to use in place of the component

PopupMessage

public PopupMessage(String title,
                    String message,
                    Object tag)
Creates a new PopupMessage with the given JComponent as its content. This constructor also takes a title and a message as replacements in cases the component is not usable.

Parameters:
title - of the message
message - the message to show in this popup
tag - additional info to be used by the PopupMessageHandler

PopupMessage

public PopupMessage(String title,
                    String message,
                    byte[] imageIcon,
                    Object tag)
Creates a new PopupMessage with the given JComponent as its content. This constructor also takes a title and a message as replacements in cases the component is not usable.

Parameters:
title - the title of the message
message - the message to show in this popup
imageIcon - the image icon to show in this popup message
tag - additional info to be used by the PopupMessageHandler
Method Detail

getMessage

public String getMessage()
Returns the message contained in this popup.

Returns:
the message contained in this popup

setMessage

public void setMessage(String message)
Sets the message to show in the popup.

Parameters:
message - the message to show in the popup

getMessageTitle

public String getMessageTitle()
Returns the title of this popup message.

Returns:
the title of this popup message

setMessageTitle

public void setMessageTitle(String messageTitle)
Sets the title of this popup message.

Parameters:
messageTitle - the title to set

getComponent

public JComponent getComponent()
Returns the component contained in this popup message.

Returns:
the component contained in this popup message.

setComponent

public void setComponent(JComponent component)
Sets the component to be showed in this popup message.

Parameters:
component - the component to set

getIcon

public byte[] getIcon()
Returns the icon of this popup message.

Returns:
the icon of this popup message

setIcon

public void setIcon(byte[] imageIcon)
Sets the icon of this popup message.

Parameters:
imageIcon - the icon to set

getMessageType

public int getMessageType()
Returns the type of this popup message.

Returns:
the type of this popup message.

setMessageType

public void setMessageType(int messageType)
Sets the type of this popup message.

Parameters:
messageType - the type to set

getTag

public Object getTag()
Returns the object used to tag this PopupMessage.

Returns:
the object used to tag this PopupMessage

setTag

public void setTag(Object tag)
Sets the object used to tag this popup message.

Parameters:
tag - the object to set

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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