java.lang.Object
com.aspose.words.FieldBuilder
public class FieldBuilder
- extends java.lang.Object
Builds a field from field code tokens (arguments and switches).
Constructor Summary |
FieldBuilder(int fieldType)
Initializes an instance of the FieldBuilder class.
|
FieldBuilder
public FieldBuilder(int fieldType)
-
Initializes an instance of the FieldBuilder class.
- Parameters:
fieldType
- A FieldType value. The type of the field to build.
-
Adds a field's argument represented by FieldArgumentBuilder to the field's code.
This overload is used when the argument consists of a mixture of different parts such as child fields, nodes, and plain text.
-
Adds a child field represented by another FieldBuilder to the field's code.
This overload is used when the argument consists of a single child field.
addArgument | |
public FieldBuilder addArgument(double argument) |
-
Adds a field's argument.
- Parameters:
argument
- The argument value.
-
Adds a field's argument.
- Parameters:
argument
- The argument value.
addArgument | |
public FieldBuilder addArgument(java.lang.String argument) |
-
Adds a field's argument.
- Parameters:
argument
- The argument value.
addSwitch | |
public FieldBuilder addSwitch(java.lang.String switchName) |
-
Adds a field's switch.
This overload adds a flag (switch without argument).
- Parameters:
switchName
- The switch name.
addSwitch | |
public FieldBuilder addSwitch(java.lang.String switchName, double switchArgument) |
-
Adds a field's switch.
- Parameters:
switchName
- The switch name.switchArgument
- The switch value.
addSwitch | |
public FieldBuilder addSwitch(java.lang.String switchName, int switchArgument) |
-
Adds a field's switch.
- Parameters:
switchName
- The switch name.switchArgument
- The switch value.
addSwitch | |
public FieldBuilder addSwitch(java.lang.String switchName, java.lang.String switchArgument) |
-
Adds a field's switch.
- Parameters:
switchName
- The switch name.switchArgument
- The switch value.
buildAndInsert | |
public Field buildAndInsert(Inline refNode)
throws java.lang.Exception |
-
Builds and inserts a field into the document before the specified inline node.
- Returns:
- A Field object that represents the inserted field.
buildAndInsert | |
public Field buildAndInsert(Paragraph refNode)
throws java.lang.Exception |
-
Builds and inserts a field into the document to the end of the specified paragraph.
- Returns:
- A Field object that represents the inserted field.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.