|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.transformers.StringTransformer
org.mmbase.applications.mmbob.util.transformers.Smilies
public class Smilies
Replaces known smilies with their graphical version. It uses the thememanager for defining the smilies.
| Field Summary | |
|---|---|
protected static Map |
smileyMatchers
Compiled regexps |
protected static Map |
smileyPatterns
Smiley patterns translated into their regexp version |
protected static Map |
smileySets
All known smileysets |
protected static Map |
smilies
All known smilies |
| Constructor Summary | |
|---|---|
Smilies()
|
|
Smilies(String defaultid,
String defaultcontext)
|
|
| Method Summary | |
|---|---|
protected void |
initMatchers(String themeID,
String smileySetID,
String smileyKey)
Initializes regexp matchers for the combination of (themeID,smileySetID,smileyKey,smilies) |
protected void |
initPatterns(String themeID,
String smileySetID,
String smileyKey)
Initializes regexp patterns for the combination of (themeID,smileySetID,smileyKey,smilies) |
protected void |
initSmileySets(String themeID,
String smileySetID,
String smileyKey)
Initializes a specific smileySet in a specific theme. |
String |
toString()
|
String |
transform(String originalString)
Default transform method (with no other params). |
String |
transform(String originalString,
String themeID,
String imagecontext)
Transform the originalString into a version with the graphical version of the smilies |
| Methods inherited from class org.mmbase.util.transformers.StringTransformer |
|---|
transform, transform, transformBack, transformBack, transformBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mmbase.util.transformers.CharTransformer |
|---|
transform, transform, transformBack, transformBack, transformBack |
| Field Detail |
|---|
protected static final Map smilies
protected static final Map smileySets
protected static final Map smileyPatterns
protected static final Map smileyMatchers
| Constructor Detail |
|---|
public Smilies()
public Smilies(String defaultid,
String defaultcontext)
| Method Detail |
|---|
protected void initSmileySets(String themeID,
String smileySetID,
String smileyKey)
themeID - id of of the theme to be used to access the smileysetsmileySetID - the id of the smileyset to be used to access the smileysmileyKey - the unique key of the smileyset
protected void initPatterns(String themeID,
String smileySetID,
String smileyKey)
themeID - id of of the theme to be used to access the smileysetsmileySetID - the id of the smileyset to be used to access the smileysmileyKey - the id of the smiley (this is the text version of the smiley)
protected void initMatchers(String themeID,
String smileySetID,
String smileyKey)
themeID - id of of the theme to be used to access the smileysetsmileySetID - the id of the smileyset to be used to access the smileysmileyKey - the id of the smiley (this is the text version of the smiley)public String transform(String originalString)
transform in interface CharTransformertransform in class StringTransformeroriginalString - the string which must be transformed
public String transform(String originalString,
String themeID,
String imagecontext)
originalString - the string which must be transformedthemeID - the id of the theme to be usedimagecontext - the image path to be used
public String toString()
toString in interface TransformertoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||