public class EmoticonManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.io.File |
EMOTICON_DIRECTORY
The root emoticon directory.
|
Modifier and Type | Method and Description |
---|---|
void |
addEmoticonPack(java.lang.String packName)
Loads an emoticon set.
|
java.util.Collection<Emoticon> |
getActiveEmoticonSet()
Returns the active emoticon set within Spark.
|
java.lang.String |
getActiveEmoticonSetName()
Returns the name of the active emoticon set.
|
Emoticon |
getEmoticon(java.lang.String key)
Returns the
Emoticon associated with the given key. |
Emoticon |
getEmoticon(java.lang.String packName,
java.lang.String key)
Retrieves the associated key emoticon.
|
javax.swing.ImageIcon |
getEmoticonImage(java.lang.String key)
Returns the Icon that is mapped to a given key.
|
java.util.Collection<java.lang.String> |
getEmoticonPacks()
Returns a list of all available emoticon packs.
|
java.net.URL |
getEmoticonURL(Emoticon emoticon)
Retrieve the URL to an emoticon.
|
static EmoticonManager |
getInstance()
Returns the singleton instance of
EmoticonManager , creating
it if necessary. |
java.lang.String |
installPack(java.io.File pack)
Installs a new Adium style emoticon pack into Spark.
|
void |
setActivePack(java.lang.String pack)
Sets the active emoticon set.
|
public static java.io.File EMOTICON_DIRECTORY
public static EmoticonManager getInstance()
EmoticonManager
, creating
it if necessary.
EmoticonManager
public java.util.Collection<Emoticon> getActiveEmoticonSet()
public java.lang.String getActiveEmoticonSetName()
public void setActivePack(java.lang.String pack)
pack
- the archive containing the emotiocon pack.public java.lang.String installPack(java.io.File pack)
pack
- the emotiocn pack (contains Emotiocons.plist)public void addEmoticonPack(java.lang.String packName)
packName
- the name of the pack.public java.net.URL getEmoticonURL(Emoticon emoticon)
emoticon
- the emoticon.public Emoticon getEmoticon(java.lang.String packName, java.lang.String key)
packName
- the name of the Archive Pack File.key
- the key.public Emoticon getEmoticon(java.lang.String key)
Emoticon
associated with the given key. Note:
This gets the emoticon from the active emoticon pack.key
- the key.public javax.swing.ImageIcon getEmoticonImage(java.lang.String key)
key
- the key to search for.public java.util.Collection<java.lang.String> getEmoticonPacks()