Package org.eclnt.jsfserver.util
Class SmartText
java.lang.Object
org.eclnt.jsfserver.util.SmartText
- All Implemented Interfaces:
Serializable
,IValueByToString
Object representation of a "smart text" - i.e. a character sequencing
containing simple formatting instructions. The smart text is a "normal text" together
with some sequentially oriented formatting information.
Example: the text "abcdefg" is the text content, "ab" should be formatted as underlined text, "de" should be formatted as bold text, in red color. In this case the representation would be: "abcdefg" is the text, from 0 to 2 the format "20" is applied, from 3 to 5 the format "11" is applied.
Please check the F_* constants for seeing what is possible in terms of formatting the text. Use the base format (e.g. F_BOLD) and add the color format (e.g. F_ADDCOLOR_RED) in order to define the corresponding format.
Please pay attention: format informations must never overlap - the definition of formats is strictly sequential!
Example: the text "abcdefg" is the text content, "ab" should be formatted as underlined text, "de" should be formatted as bold text, in red color. In this case the representation would be: "abcdefg" is the text, from 0 to 2 the format "20" is applied, from 3 to 5 the format "11" is applied.
Please check the F_* constants for seeing what is possible in terms of formatting the text. Use the base format (e.g. F_BOLD) and add the color format (e.g. F_ADDCOLOR_RED) in order to define the corresponding format.
Please pay attention: format informations must never overlap - the definition of formats is strictly sequential!
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Formatting info for a certain part of the text. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTextFormatInfo
(int beginOffset, int endOffset, int format) void
getText()
void
setSmartTextCSV
(String csvText) toString()
-
Field Details
-
F_REGULAR
public static final int F_REGULAR- See Also:
-
F_BOLD
public static final int F_BOLD- See Also:
-
F_UNDERLINED
public static final int F_UNDERLINED- See Also:
-
F_SUBSCRIPT
public static final int F_SUBSCRIPT- See Also:
-
F_SUPERSCRIPT
public static final int F_SUPERSCRIPT- See Also:
-
F_HIGHLIGHTED
public static final int F_HIGHLIGHTED- See Also:
-
F_ADDCOLOR_RED
public static final int F_ADDCOLOR_RED- See Also:
-
F_ADDCOLOR_GREEN
public static final int F_ADDCOLOR_GREEN- See Also:
-
F_ADDCOLOR_BLUE
public static final int F_ADDCOLOR_BLUE- See Also:
-
-
Constructor Details
-
SmartText
-
-
Method Details