BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.util.Emoticons Class Reference

Static Public Member Functions

static String replaceEmoticons (IConstructor constructor, String text)
 
static String showEmoticons (IConstructor constructor)
 

Static Public Attributes

static final String INIT_EXP = "(\\t|\\r|\\n| |^)"
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 27 of file Emoticons.java.

Member Function Documentation

◆ replaceEmoticons()

static String org.turro.elephant.impl.util.Emoticons.replaceEmoticons ( IConstructor  constructor,
String  text 
)
static

Definition at line 36 of file Emoticons.java.

36  {
37  String emoticonsRoot = ElephantContext.getRootWebPath() + "/_internal/emoticons/";
38  text = text.replaceAll(INIT_EXP + "\\:\\-?\\)" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "smile.gif\"/>$2");
39  text = text.replaceAll(INIT_EXP + "\\:\\-?D" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "big_smile.gif\"/>$2");
40  text = text.replaceAll(INIT_EXP + "\\;\\-?\\)" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "winking.gif\"/>$2");
41  text = text.replaceAll(INIT_EXP + "\\;\\-?D" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "big_winking.gif\"/>$2");
42  text = text.replaceAll(INIT_EXP + "\\:\\-?\\(" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "sad.gif\"/>$2");
43  text = text.replaceAll(INIT_EXP + "\\:\\-?\\/" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "humm.gif\"/>$2");
44  text = text.replaceAll(INIT_EXP + "8\\-?\\|" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "sun_glasses.gif\"/>$2");
45  text = text.replaceAll(INIT_EXP + "\\:\\-?o" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "puzzled.gif\"/>$2");
46  text = text.replaceAll(INIT_EXP + "\\:\\-?\\|" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "frozen.gif\"/>$2");
47  text = text.replaceAll(INIT_EXP + "\\:\\-?\\," + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "unaware.gif\"/>$2");
48  text = text.replaceAll(INIT_EXP + "\\|\\-\\|" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "sleeping.gif\"/>$2");
49  text = text.replaceAll(INIT_EXP + "\\:\\-?s" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "dizzy.gif\"/>$2");
50  text = text.replaceAll(INIT_EXP + "\\(\\>\\)" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "watch.gif\"/>$2");
51  text = text.replaceAll(INIT_EXP + "\\:8\\)" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "ashamed.gif\"/>$2");
52  text = text.replaceAll(INIT_EXP + "\\:\\-?b" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "dummy.gif\"/>$2");
53  text = text.replaceAll(INIT_EXP + "\\:\\-?\\#" + END_EXP, "$1<img border=\"0\" src=\"" + emoticonsRoot + "angry.gif\"/>$2");
54  return text;
55  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showEmoticons()

static String org.turro.elephant.impl.util.Emoticons.showEmoticons ( IConstructor  constructor)
static

Definition at line 57 of file Emoticons.java.

57  {
58  String emoticonsRoot = constructor.getRequest().getContextPath() + "/_internal/emoticons/";
59  return
60  "<style type=\"text/css\">\n" +
61  "<!--\n" +
62  "SPAN.emoticon {\n" +
63  "border:1px solid gray;\n" +
64  "}\n" +
65  "-->\n" +
66  "</style>\n" +
67  "<span class=\"emoticon\">:-) :) <img src=\"" + emoticonsRoot + "smile.gif\"/></span>\n" +
68  "<span class=\"emoticon\">:D :-D <img src=\"" + emoticonsRoot + "big_smile.gif\"/></span>\n" +
69  "<span class=\"emoticon\">;-) ;) <img src=\"" + emoticonsRoot + "winking.gif\"/></span>\n" +
70  "<span class=\"emoticon\">;-D ;D <img src=\"" + emoticonsRoot + "big_winking.gif\"/></span>\n" +
71  "<span class=\"emoticon\">:-( :( <img src=\"" + emoticonsRoot + "sad.gif\"/></span>\n" +
72  "<span class=\"emoticon\">:-/ :/ <img src=\"" + emoticonsRoot + "humm.gif\"/></span>\n" +
73  "<span class=\"emoticon\">8| 8-| <img src=\"" + emoticonsRoot + "sun_glasses.gif\"/></span>\n" +
74  "<span class=\"emoticon\">:-o :o <img src=\"" + emoticonsRoot + "puzzled.gif\"/></span>\n" +
75  "<span class=\"emoticon\">:| :-| <img src=\"" + emoticonsRoot + "frozen.gif\"/></span>\n" +
76  "<span class=\"emoticon\">:-, :, <img src=\"" + emoticonsRoot + "unaware.gif\"/></span>\n" +
77  "<span class=\"emoticon\">|-| <img src=\"" + emoticonsRoot + "sleeping.gif\"/></span>\n" +
78  "<span class=\"emoticon\">:-s :s <img src=\"" + emoticonsRoot + "dizzy.gif\"/></span>\n" +
79  "<span class=\"emoticon\">(>) <img src=\"" + emoticonsRoot + "watch.gif\"/></span>\n" +
80  "<span class=\"emoticon\">:8) <img src=\"" + emoticonsRoot + "ashamed.gif\"/></span>\n" +
81  "<span class=\"emoticon\">:-b :b <img src=\"" + emoticonsRoot + "dummy.gif\"/></span>\n" +
82  "<span class=\"emoticon\">:-# :# <img src=\"" + emoticonsRoot + "angry.gif\"/></span>\n" +
83  "";
84  }
Here is the call graph for this function:

Member Data Documentation

◆ INIT_EXP

final String org.turro.elephant.impl.util.Emoticons.INIT_EXP = "(\\t|\\r|\\n| |^)"
static

Definition at line 29 of file Emoticons.java.


The documentation for this class was generated from the following file: