@Test public void testDeclareVariable() { try { TextDocument doc = TextDocument.newTextDocument(); Footer footer = doc.getFooter(); footer.declareVariable("footername", VariableType.USER); StyleFooterElement styleFoot = footer.getOdfElement(); Node nod = styleFoot.getFirstChild().getFirstChild(); NamedNodeMap nameMap = nod.getAttributes(); Node nodtext = nameMap.getNamedItem("text:name"); Assert.assertEquals("footername", nodtext.getNodeValue()); doc.save(ResourceUtilities.newTestOutputFile("footerOutput.odt")); } catch (Exception e) { Logger.getLogger(FooterTest.class.getName()).log(Level.SEVERE, null, e); Assert.fail(e.getMessage()); } }
public VariableField declareVariable(String name, VariableType type) { return getVariableContainerImpl().declareVariable(name, type); }
Footer extends Component implements TableContainer, VariableContainer { public VariableField declareVariable(String name, VariableType type) { return getVariableContainerImpl().declareVariable(name, type); } }
Footer extends Component implements TableContainer, VariableContainer { public VariableField declareVariable(String name, VariableType type) { return getVariableContainerImpl().declareVariable(name, type); } Footer(StyleFooterElement element); }
Footer extends Component implements TableContainer, VariableContainer { public VariableField declareVariable(String name, VariableType type) { return getVariableContainerImpl().declareVariable(name, type); } Footer(StyleFooterElement element); StyleFooterElement getOdfElement(); boolean isVisible(); void setVisible(boolean isVisible); Table addTable(); Table addTable(int numRows, int numCols); Table getTableByName(String name); java.util.List<Table> getTableList(); TableBuilder getTableBuilder(); OdfElement getTableContainerElement(); OdfElement getVariableContainerElement(); VariableField declareVariable(String name, VariableType type); VariableField getVariableFieldByName(String name); Section appendSection(String name); }
Footer extends Component implements TableContainer, VariableContainer { public VariableField declareVariable(String name, VariableType type) { return getVariableContainerImpl().declareVariable(name, type); } Footer(StyleFooterElement element); StyleFooterElement getOdfElement(); boolean isVisible(); void setVisible(boolean isVisible); Table addTable(); Table addTable(int numRows, int numCols); Table getTableByName(String name); java.util.List<Table> getTableList(); TableBuilder getTableBuilder(); OdfElement getTableContainerElement(); OdfElement getVariableContainerElement(); VariableField declareVariable(String name, VariableType type); VariableField getVariableFieldByName(String name); Section appendSection(String name);  }