|
java.lang.Object
Node
Inline
SpecialChar
FieldChar
com.aspose.words.FieldSeparator
- All Implemented Interfaces:
- java.lang.Iterable, java.lang.Cloneable
public class FieldSeparator - extends FieldChar
Represents a Word field separator that separates the field code from the field result.
FieldSeparator is an inline-level node and represented
by the ControlChar.FIELD_SEPARATOR_CHAR control character in the document. FieldSeparator can only be a child of Paragraph. A complete field in a Microsoft Word document is a complex structure consisting of
a field start character, field code, field separator character, field result
and field end character. Some fields only have field start, field code and field end. To easily insert a new field into a document, use the DocumentBuilder.insertField(java.lang.String, java.lang.String)
method.
|
Property Getters/Setters Detail |
getNodeType | |
public int getNodeType()
|
-
Returns NodeType.FIELD_SEPARATOR.
The value of the property is NodeType integer constant.
getFieldType | → inherited from FieldChar |
public int getFieldType()
|
-
Returns the type of the field.
The value of the property is FieldType integer constant.
getParentParagraph | → inherited from Inline |
public Paragraph getParentParagraph()
|
-
Returns the immediate parent paragraph.
Equivalent to
(Paragraph)ParentNode.
getFont | → inherited from Inline |
public Font getFont()
|
-
Provides access to the font formatting of this object.
Example: Creates a simple document from scratch using the Aspose.Words object model.
// Create an "empty" document. Note that like in Microsoft Word,
// the empty document has one section, body and one paragraph in it.
Document doc = new Document();
// This truly makes the document empty. No sections (not possible in Microsoft Word).
doc.removeAllChildren();
// Create a new section node.
// Note that the section has not yet been added to the document,
// but we have to specify the parent document.
Section section = new Section(doc);
// Append the section to the document.
doc.appendChild(section);
// Lets set some properties for the section.
section.getPageSetup().setSectionStart(SectionStart.NEW_PAGE);
section.getPageSetup().setPaperSize(PaperSize.LETTER);
// The section that we created is empty, lets populate it. The section needs at least the Body node.
Body body = new Body(doc);
section.appendChild(body);
// The body needs to have at least one paragraph.
// Note that the paragraph has not yet been added to the document,
// but we have to
|