java.lang.Object
com.aspose.words.GeneralFormatCollection
public class GeneralFormatCollection
| Property Getters/Setters Summary | ||
|---|---|---|
int | getCount() | |
| Gets the total number of the items in the collection. | ||
int | get(int index) | |
| Gets a general format at the specified index. The value of the property is GeneralFormat integer constant. | ||
| Method Summary | ||
|---|---|---|
void | add(int item) | |
| Adds a general format to the collection. | ||
java.util.Iterator<GeneralFormat> | iterator() | |
| Returns an enumerator object. | ||
void | remove(int item) | |
| Removes all occurrences of the specified general format from the collection. | ||
void | removeAt(int index) | |
| Removes a general format occurrence at the specified index. | ||
| Property Getters/Setters Detail |
|---|
getCount | |
public int getCount() | |
get | |
public int get(int index) | |
index - The index of a general format.| Method Detail |
|---|
add | |
public void add(int item)
throws java.lang.Exception | |
item - A Example:
Shows how to formatting fields
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Field field = builder.insertField("MERGEFIELD Date");
FieldFormat format = field.getFormat();
format.setDateTimeFormat("dddd, MMMM dd, yyyy");
format.setNumericFormat("0.#");
format.getGeneralFormats().add(GeneralFormat.CHAR_FORMAT);iterator | |
public java.util.Iterator<GeneralFormat> iterator() | |
remove | |
public void remove(int item)
throws java.lang.Exception | |
item - A removeAt | |
public void removeAt(int index)
throws java.lang.Exception | |
index -