@Test public void testAddPageCountField() { try { TextDocument doc = TextDocument.loadDocument(ResourceUtilities.getTestResourceAsStream(TEST_DOCUMENT)); PageCountField countField = Fields.createPageCountField(doc.newParagraph("Page Count:")); Assert.assertNotNull(countField); countField.setNumberFormat(NumberFormat.UPPERCASE_LATIN_ALPHABET); String format = countField.getOdfElement().getStyleNumFormatAttribute(); Assert.assertEquals("A", format); } catch (Exception e) { Logger.getLogger(FieldsTest.class.getName()).log(Level.SEVERE, null, e); Assert.fail(e.getMessage()); } }
public static PageCountField createPageCountField(OdfElement odfElement) { return new PageCountField(odfElement); }
Fields { public static PageCountField createPageCountField(OdfElement odfElement) { return new PageCountField(odfElement); } }
Fields { public static PageCountField createPageCountField(OdfElement odfElement) { return new PageCountField(odfElement); } private  Fields(); }
Fields { public static PageCountField createPageCountField(OdfElement odfElement) { return new PageCountField(odfElement); } private  Fields(); static DateField createDateField(OdfElement odfElement); static DateField createFixedDateField(OdfElement odfElement); static TimeField createTimeField(OdfElement odfElement); static TimeField createFixedTimeField(OdfElement odfElement); static PageNumberField createPreviousPageNumberField(OdfElement odfElement); static PageNumberField createCurrentPageNumberField(OdfElement odfElement); static PageNumberField createNextPageNumberField(OdfElement odfElement); static PageCountField createPageCountField(OdfElement odfElement); static TitleField createTitleField(OdfElement odfElement); static SubjectField createSubjectField(OdfElement odfElement); static AuthorField createAuthorNameField(OdfElement odfElement); static AuthorField createAuthorInitialsField(OdfElement odfElement); static ChapterField createChapterField(OdfElement odfElement); static ReferenceField createReferenceField(OdfElement odfElement, String referenceName); static VariableField createSimpleVariableField(VariableContainer container, String name); static VariableField createUserVariableField(VariableContainer container, String name, String value); static ConditionField createConditionField(OdfElement odfElement, String condition, String trueText,
			String falseText); static ConditionField createHiddenTextField(OdfElement odfElement, String condition, String text); }
Fields { public static PageCountField createPageCountField(OdfElement odfElement) { return new PageCountField(odfElement); } private  Fields(); static DateField createDateField(OdfElement odfElement); static DateField createFixedDateField(OdfElement odfElement); static TimeField createTimeField(OdfElement odfElement); static TimeField createFixedTimeField(OdfElement odfElement); static PageNumberField createPreviousPageNumberField(OdfElement odfElement); static PageNumberField createCurrentPageNumberField(OdfElement odfElement); static PageNumberField createNextPageNumberField(OdfElement odfElement); static PageCountField createPageCountField(OdfElement odfElement); static TitleField createTitleField(OdfElement odfElement); static SubjectField createSubjectField(OdfElement odfElement); static AuthorField createAuthorNameField(OdfElement odfElement); static AuthorField createAuthorInitialsField(OdfElement odfElement); static ChapterField createChapterField(OdfElement odfElement); static ReferenceField createReferenceField(OdfElement odfElement, String referenceName); static VariableField createSimpleVariableField(VariableContainer container, String name); static VariableField createUserVariableField(VariableContainer container, String name, String value); static ConditionField createConditionField(OdfElement odfElement, String condition, String trueText,
			String falseText); static ConditionField createHiddenTextField(OdfElement odfElement, String condition, String text);  }