|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.zion.jbuddy.richcontent.RichContent
public final class RichContent
Represents rich content, including styled text and hyperlinks. Methods in this class are used to create rich content.
Some methods return the RichContent object itself. Thus, calls to these methods may be chained together:
RichContent can be sent in an IMessage
through an
IClient
or
IConference
(though not all protocols
support each attribute).
The content and attributes of rich content can be traversed using a
RichContentTokenizer
.
All methods in this class are synchronized and thread-safe.
IMessageFactory.factory(int type, com.zion.jbuddy.IClient client, String recipient, RichContent richContent)
,
IMessageFactory.factory(int type, com.zion.jbuddy.conference.IConference conference, RichContent richContent)
,
RichContentTokenizer
,
Serialized FormConstructor Summary | |
---|---|
RichContent()
Creates a new RichContent object. |
Method Summary | |
---|---|
RichContent |
append(RichContent content)
Appends existing rich content to this content. |
RichContent |
append(String text)
Appends text to this content. |
RichContent |
clear()
Clears all existing content. |
Object |
clone()
Returns a new RichContent object that is equal to this one. |
boolean |
equals(Object object)
Returns true if the specified object is a RichContent object and contains the same text and attributes as this one. |
boolean |
isEmpty()
Returns true if there is no content. |
int |
length()
Returns the length of this content (in characters). |
void |
parseXml(String xml)
Sets this RichContent's contents from the specified XML representation. |
RichContent |
resetAttributes()
Resets all attributes. |
RichContent |
setBackgroundColor(int color)
Sets the background color for new text. |
RichContent |
setBold(boolean isBold)
Sets whether new text will be bold. |
RichContent |
setColor(int color)
Sets the foreground color for new text. |
RichContent |
setFont(String font)
Sets the font face for new text. |
RichContent |
setFontSize(int size)
Sets the font size for new text. |
RichContent |
setItalic(boolean isItalic)
Sets whether new text will be italic. |
RichContent |
setStrikeThrough(boolean isStrikeThrough)
Sets whether new text will have a strike-through effect. |
RichContent |
setSubscript(boolean isSubscript)
Sets whether new text will be subscript. |
RichContent |
setSuperscript(boolean isSuperscript)
Sets whether new text will be superscript. |
RichContent |
setUnderline(boolean isUnderline)
Sets whether new text will be underlined. |
RichContent |
setUrl(String url)
Sets the hyperlink URL for new text. |
String |
toString()
Returns the text contents of this RichContent object. |
String |
toXml()
Returns an XML representation of this RichContent object. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RichContent()
Method Detail |
---|
public RichContent setColor(int color)
public RichContent setBackgroundColor(int color)
public RichContent setFont(String font)
public RichContent setFontSize(int size)
public RichContent setUrl(String url)
public RichContent setBold(boolean isBold)
public RichContent setItalic(boolean isItalic)
public RichContent setStrikeThrough(boolean isStrikeThrough)
public RichContent setSubscript(boolean isSubscript)
public RichContent setSuperscript(boolean isSuperscript)
public RichContent setUnderline(boolean isUnderline)
public RichContent append(RichContent content)
public RichContent append(String text)
public int length()
public boolean isEmpty()
public void parseXml(String xml) throws Exception
Exception
public String toXml()
public RichContent resetAttributes()
public RichContent clear()
public Object clone()
clone
in class Object
public boolean equals(Object object)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |