|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgraph.components.labels.RichTextValue
public class RichTextValue
Rich text replacement for string values in RichTextBusinessObject
.
This requirs the MultiLineVertexView
to provide a rich text editor
and renderer.
RichTextGraphModel
,
VertexRenderer
,
RTFEditorKit
,
Serialized FormField Summary | |
---|---|
static RTFEditorKit |
editorKit
Holds the shared editor kit for creating new documents. |
protected String |
plainText
A plain-text representation of the rich text is always keps along with the rich text value to speedup the toString() method. |
protected String |
richText
Holds the rich text as an RTF encoded text. |
Constructor Summary | |
---|---|
RichTextValue()
Constructs a new empty rich text value. |
|
RichTextValue(Document document)
Constructs a new rich text value using the specified document. |
|
RichTextValue(String stringValue)
Constructs a new rich text document using the string text. |
Method Summary | |
---|---|
protected static Document |
createDefaultDocument()
Hook for subclassers to create a default document. |
static Document |
createDefaultDocument(String value)
Hook for subclassers to create a default document. |
static String |
getPlainText(RichTextValue richText)
Returns a plain text representation of the specified rich text value. |
String |
getRichText()
Returns the richt text value as an RTF encoded string. |
static String |
getRichText(Document document)
Returns the rich text encoded RTF string from the specified document. |
void |
insertInto(Document document)
Inserts this rich text into the specified component. |
void |
setRichText(String richText)
Sets the richt text value as an RTF encoded string and updates plainText . |
String |
toString()
Returns the plain text representation of this rich text value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static RTFEditorKit editorKit
protected String richText
protected String plainText
toString()
method.
Constructor Detail |
---|
public RichTextValue()
public RichTextValue(Document document)
document
- The document to obtain the rich text from.public RichTextValue(String stringValue)
stringValue
- The string to use as the initial value.Method Detail |
---|
public void insertInto(Document document)
document
- The document to insert the rich text into.public String getRichText()
public void setRichText(String richText)
plainText
.
richText
- The rich text to set.public String toString()
toString
in class Object
plainText
.public static String getRichText(Document document)
document
- The document to be converted.
public static String getPlainText(RichTextValue richText)
richText
- The rich text value to be converted.
protected static Document createDefaultDocument()
createDefaultDocument(String)
with a value of null.
public static Document createDefaultDocument(String value)
editorKit
to create the document and sets its value.
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |