hamsam.api
Class SmileyComponent

java.lang.Object
  |
  +--hamsam.api.SmileyComponent
All Implemented Interfaces:
MessageComponent

public class SmileyComponent
extends java.lang.Object
implements MessageComponent

A component to represent smileys (emoticons) in instant messages.

A smiley is a small picture, sometimes referred to as an emoticon, used to represent a user's emotions. For each smiley, there will be one or more alternate text representations, and a descriptive name.

For example, for a smiley showing a "sad face", the textual representation may be something like ":(" or ":-(", while the descriptive name may be "sad".

Clients that don't want to display smileys (may be because the client is a text based one), may use the text representation. Alternatively, they may use the descriptive name to convey the exact mood represented by the smiley.


Constructor Summary
SmileyComponent(javax.swing.Icon icon, java.lang.String[] text, java.lang.String name)
          Construct a new smiley with a given icon and alternate text.
 
Method Summary
 javax.swing.Icon getIcon()
          Returns the icon of this smiley.
 java.lang.String getName()
          Returns the descriptive name for this smiley.
 java.lang.String[] getText()
          Returns the alternate text for this smiley.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmileyComponent

public SmileyComponent(javax.swing.Icon icon,
                       java.lang.String[] text,
                       java.lang.String name)
Construct a new smiley with a given icon and alternate text.

Parameters:
icon - the icon for this smiley.
text - the alternate text for this smiley.
name - the descriptive name for this smiley.
Method Detail

getIcon

public javax.swing.Icon getIcon()
Returns the icon of this smiley.

Returns:
icon representing this smiley.

getText

public java.lang.String[] getText()
Returns the alternate text for this smiley.

Returns:
alternate text representing this smiley.

getName

public java.lang.String getName()
Returns the descriptive name for this smiley.

Returns:
descriptive name representing this smiley.