|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.TextEffect
de.enough.polish.ui.texteffects.HtmlTextEffect
de.enough.polish.ui.texteffects.MessageTextEffect
public class MessageTextEffect
Allows to use simple HTML markup, message markup such as *bold*, /italic/ or _underlined_ and smileys for the design of the text. Typically this effect will be used for visualizes received or sent messages. Usage in polish.css:
.myText {
text-effect: message;
}
Usage in Java:
//#style myText StringItem item = new StringItem(null, "hello <div style=\"color: red\">red, red</div> <b>world</b> :-)" );
| Nested Class Summary | |
|---|---|
static class |
MessageTextEffect.EmailMarkup
A markup that surrounds a matching email address with a tag. |
static interface |
MessageTextEffect.Markup
|
static class |
MessageTextEffect.MsisdnMarkup
A markup that surrounds a matching email address with a tag. |
static class |
MessageTextEffect.PatternMiddleMarkup
A markup that surrounds a matching pattern with a tag. |
static class |
MessageTextEffect.PatternStartMarkup
A markup that surrounds a matching pattern with a tag. |
static class |
MessageTextEffect.ReplacementMarkup
A markup that replaces a static search string with a replacement Example: |
static class |
MessageTextEffect.SurroundMarkup
A markup that inserts text at the beginning and end of found matches. |
| Nested classes/interfaces inherited from class de.enough.polish.ui.texteffects.HtmlTextEffect |
|---|
HtmlTextEffect.HtmlTextParser |
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.TextEffect |
|---|
isTextSensitive, style |
| Constructor Summary | |
|---|---|
MessageTextEffect()
Creates a new MessageTextEffect |
|
| Method Summary | |
|---|---|
static void |
addMarkup(MessageTextEffect.Markup markup)
Adds a specific markup |
static void |
clearDefaultMarkups()
Removes all default markups |
static String |
convertMarkup(String input)
|
static String |
convertMarkup(String inputText,
ArrayList markupList)
|
static void |
setMidlet(MIDlet midlet,
Command cmdOpenWebsite,
Command cmdOpenMailto,
Command cmdCall)
Sets a midlet, so that email and web addresses can be resolved by opening them in the native browser |
static void |
setMidlet(MIDlet midlet,
Command cmdOpenWebsite,
Command cmdOpenMailto,
Command cmdCall)
Sets a midlet, so that email and web addresses can be resolved by opening them in the native browser |
void |
wrap(StringItem parent,
String htmlText,
int textColor,
Font meFont,
int firstLineWidth,
int lineWidth,
int maxLines,
String maxLinesAppendix,
int maxLinesAppendixPosition,
WrappedText wrappedText)
Wraps the text into several lines and adds the result to the specified wrappedText. |
| Methods inherited from class de.enough.polish.ui.texteffects.HtmlTextEffect |
|---|
calculateLinesHeight, commandAction, drawString, drawStrings, getFontHeight, setGlobalParser, setParser, setStyle, stringWidth |
| Methods inherited from class de.enough.polish.ui.TextEffect |
|---|
animate, animate, charWidth, drawChar, drawStrings, drawStrings, getFont, getLeftX, getRgbData, getRgbData, getRgbData, getTopY, getTopY, hideNotify, onAttach, onDetach, releaseResources, setStyle, showNotify, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageTextEffect()
| Method Detail |
|---|
public static void clearDefaultMarkups()
public static void addMarkup(MessageTextEffect.Markup markup)
markup - the markup
public static void setMidlet(MIDlet midlet,
Command cmdOpenWebsite,
Command cmdOpenMailto,
Command cmdCall)
midlet - the midletcmdOpenWebsite - the command for opening websitescmdOpenMailto - the command for opening mailto/email addressescmdCall - the command for opening tel: numbers
public static void setMidlet(MIDlet midlet,
Command cmdOpenWebsite,
Command cmdOpenMailto,
Command cmdCall)
midlet - the midletcmdOpenWebsite - the command for opening websitescmdOpenMailto - the command for opening mailto/email addressescmdCall - the command for opening tel: numbers
public void wrap(StringItem parent,
String htmlText,
int textColor,
Font meFont,
int firstLineWidth,
int lineWidth,
int maxLines,
String maxLinesAppendix,
int maxLinesAppendixPosition,
WrappedText wrappedText)
TextEffect
wrap in class HtmlTextEffectparent - the parent of this effecthtmlText - the texttextColor - color of the textmeFont - used fontfirstLineWidth - width of the first linelineWidth - width of following linesmaxLines - the maximum number of linesmaxLinesAppendix - the appendix that should be added to the last line when the line number is greater than maxLinesmaxLinesAppendixPosition - either TextUtil.MAXLINES_APPENDIX_POSITION_AFTER or TextUtil.MAXLINES_APPENDIX_POSITION_BEFOREwrappedText - the wrapped text object to which the single text lines should be addedTextUtil.wrap(String, Font, int, int, int, String, int)public static String convertMarkup(String input)
public static String convertMarkup(String inputText,
ArrayList markupList)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||