|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--ru.novosoft.dc.rtf.dom.RTFObject
An inline object of rtf-file. It consists of a kind, an object, and a character context of this object. The predefined kinds are the following:
ActiveSymbols
constants;
The meaning of an rtf-object could be widen with the so-called special objects. A special object has a non-negative kind. It is constructed with the help of general constructor. The following special kinds are predefined now:
Picture object;
FieldMarker object;
Bookmark object.
RTFShape object.
RTFInline interface.
The following methods are used for the access to the encapsulated object:
kind() returns a kind of encapsulated object;
symbol() returns a code of symbol for the ACTIVE kind;
hasParameter() returns the true if an ACTIVE symbol has
a parameter;
parameter() returns a parameter of an ACTIVE symbol or
zero if no parameter specified;
text() returns a text string if the object has the STRING
or PROXY kind;
label() returns a list label content if the object has
the LABEL kind.
footnote() returns a footnote flow if the object has
the FOOTNOTE kind;
special() returns an encapsulated inline object for a
non-negative kind;
object() returns an encapsulated object as it is.
| Field Summary | |
static byte |
ACTIVE
The kind of active character object, |
static byte |
BOOKMARK
The kind of bookmark object. |
static byte |
END_CELL
The kind of cell mark. |
static byte |
END_FIELD
The kind of end of field mark. |
static byte |
END_PAR
The kind of paragraph mark. |
static byte |
END_SECTION
The kind of section break mark. |
static byte |
FIELD
The kind of field mark object. |
static byte |
FOOTNOTE
The kind of footnote object. |
static byte |
LABEL
The kind of marker object. |
static byte |
PICTURE
The kind of picture object. |
static byte |
PROXY
The kind of proxy RTFString object. |
static byte |
SHAPE
The kind of shape object. |
static byte |
STRING
The kind of raw string object. |
| Fields inherited from interface ru.novosoft.dc.rtf.dom.objects.ActiveSymbols |
ANNOTATION_REFERENCE,
BEGIN_FORMULA,
COLUMN_BREAK,
CURRENT_DATE,
CURRENT_DATE_LONG,
CURRENT_DATE_MEDIUM,
CURRENT_PAGE_NUMBER,
CURRENT_SECTION_NUMBER,
CURRENT_TIME,
FOOTNOTE_ANCHOR,
FOOTNOTE_CONTINUE,
FOOTNOTE_REFERENCE,
LEFT_TO_RIGHT,
LINE_BREAK,
LINE_BREAK_TYPE,
PAGE_BREAK,
RIGHT_TO_LEFT,
SOFT_COLUMN_BREAK,
SOFT_LINE_BREAK,
SOFT_LINE_HEIGHT,
SOFT_PAGE_BREAK,
SUBENTRY,
TAB |
| Constructor Summary | |
RTFObject(int kind)
Construct a marker having no encapculated object. |
|
RTFObject(int kind,
java.lang.Object object)
Construct an object of any kind (we recommend to use this constructor for objects of special kinds only). |
|
RTFObject(java.util.List label)
Construct a paragraph list label of the LABEL kind. |
|
RTFObject(RTFFlow flow,
boolean isEndnote)
Construct an object of the FOOTNOTE kind. |
|
RTFObject(RTFString proxy)
Construct an object of the PROXY kind. |
|
RTFObject(java.lang.String text)
Construct an object of the STRING kind. |
|
| Method Summary | |
void |
attachContext(CharacterContext context)
Attach a character context to this inline object. |
CharacterContext |
context()
Return the character context or null if no context attached. |
void |
exportTo(org.w3c.dom.Element elem)
Export the contents of this object to the specified DOM element. |
RTFFootnote |
footnote()
Return the encapsulated footnote for the FOOTNOTE kind or null otherwise. |
boolean |
hasParameter()
Return true if the encapsulated ACTIVE symbol has a parameter. |
int |
kind()
Return an object kind. |
java.util.List |
label()
Return the encapsulated label for the LABEL kind or null otherwise. |
boolean |
mergeWith(java.lang.String s)
Append a parameter string to the encapsulated string |
java.lang.Object |
object()
Return the encapsulated object (for the ACTIVE kind, this is an int[] object of length 1 or 2 containing a code and parameter of active symbol). |
int |
parameter()
Return the parameter of ACTIVE symbol or zero if no parameter specified. |
RTFInline |
special()
Return the encapsulated inline object for a non-negative kind or null otherwise. |
int |
symbol()
Return the value of encapsulated symbol for the ACTIVE kind or zero otherwise. |
java.lang.String |
text()
Return the encapsulated string for the STRING and PROXY kinds or null otherwise. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final byte SHAPE
public static final byte BOOKMARK
public static final byte FIELD
public static final byte PICTURE
public static final byte ACTIVE
public static final byte STRING
public static final byte PROXY
RTFString object.public static final byte LABEL
public static final byte FOOTNOTE
public static final byte END_PAR
public static final byte END_CELL
public static final byte END_SECTION
public static final byte END_FIELD
| Constructor Detail |
public RTFObject(int kind)
public RTFObject(java.lang.String text)
public RTFObject(RTFString proxy)
public RTFObject(java.util.List label)
public RTFObject(RTFFlow flow,
boolean isEndnote)
public RTFObject(int kind,
java.lang.Object object)
| Method Detail |
public final int kind()
public final void attachContext(CharacterContext context)
public final CharacterContext context()
public final int symbol()
public final boolean hasParameter()
public final int parameter()
public final java.lang.String text()
public final java.util.List label()
public final RTFFootnote footnote()
public final RTFInline special()
public final java.lang.Object object()
public final boolean mergeWith(java.lang.String s)
public void exportTo(org.w3c.dom.Element elem)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||