ymsg.support
Interface EmoticonLoader


public interface EmoticonLoader

Allows the intergration of bespoke smiley images as part of message decoding.

A concrete instance of this class can be used to supply icons to the message decoder code, for use when generating styled output which supports smileys. If an EmoticonLoader is set, the MessageDecoder will defer all image loading to it first, but fall-back to its own default icons whenever the loader returns null.

Since:
1.0

Method Summary
 javax.swing.Icon loadEmoticon(int icon)
          Load and return a given smiley icon.
 

Method Detail

loadEmoticon

public javax.swing.Icon loadEmoticon(int icon)
Load and return a given smiley icon. There are currently 75 icons, from 1 to 75. Return either a Swing Icon instance, which corresponds to the icon number (see the Emoticons class) or null if the default icon is to be used.

Parameters:
icon - integer from 1 to 35
Returns:
Icon object, or null
Since:
1.0