/** * Create child element {@odf.element style:column}. * * @param styleRelWidthValue the <code>String</code> value of <code>StyleRelWidthAttribute</code>, see {@odf.attribute style:rel-width} at specification * Child element is new in Odf 1.2 * * @return the element {@odf.element style:column} */ public StyleColumnElement newStyleColumnElement(String styleRelWidthValue) { StyleColumnElement styleColumn = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleColumnElement.class); styleColumn.setStyleRelWidthAttribute(styleRelWidthValue); this.appendChild(styleColumn); return styleColumn; }
/** * Receives the value of the ODFDOM attribute representation <code>FoColumnGapAttribute</code> , See {@odf.attribute fo:column-gap} * * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined. */ public String getFoColumnGapAttribute() { FoColumnGapAttribute attr = (FoColumnGapAttribute) getOdfAttribute(OdfDocumentNamespace.FO, "column-gap"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; }
/** * Create child element {@odf.element style:columns}. * * @param foColumnCountValue the <code>Integer</code> value of <code>FoColumnCountAttribute</code>, see {@odf.attribute fo:column-count} at specification * Child element is new in Odf 1.2 * * @return the element {@odf.element style:columns} */ public StyleColumnsElement newStyleColumnsElement(int foColumnCountValue) { StyleColumnsElement styleColumns = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleColumnsElement.class); styleColumns.setFoColumnCountAttribute(foColumnCountValue); this.appendChild(styleColumns); return styleColumns; }
StyleColumnsElement columnEle = sProperties .newStyleColumnsElement(1); columnEle.setFoColumnGapAttribute("0in");
@Override public void visit( StyleColumnsElement ele ) { StyleSectionProperties sectionProperties = currentStyle.getSectionProperties(); if ( sectionProperties == null ) { sectionProperties = new StyleSectionProperties(); currentStyle.setSectionProperties( sectionProperties ); } // column-count Integer columnCount = ele.getFoColumnCountAttribute(); if ( columnCount != null ) { sectionProperties.setColumnCount( columnCount ); } // column-gap String columnGap = ele.getFoColumnGapAttribute(); if ( StringUtils.isNotEmpty( columnGap ) ) { sectionProperties.setColumnGap( ODFUtils.getDimensionAsPoint( columnGap ) ); } currentColumnPropertiesList = new ArrayList<StyleColumnProperties>(); super.visit( ele ); currentStyle.setColumnPropertiesList( currentColumnPropertiesList ); currentColumnPropertiesList = null; }
/** * Sets the value of ODFDOM attribute representation <code>FoColumnCountAttribute</code> , See {@odf.attribute fo:column-count} * * @param foColumnCountValue The type is <code>Integer</code> */ public void setFoColumnCountAttribute(Integer foColumnCountValue) { FoColumnCountAttribute attr = new FoColumnCountAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setIntValue(foColumnCountValue.intValue()); }
StylePageLayoutPropertiesElement vStlePageLprop = (StylePageLayoutPropertiesElement) vListStlePageLprop.item(0); StyleColumnsElement vStyleColumnsElement = vStlePageLprop.newStyleColumnsElement(columnsNumber); vStyleColumnsElement.setFoColumnGapAttribute(vSpacingColumn);
@Override public void visit( StyleColumnsElement ele ) { StyleSectionProperties sectionProperties = currentStyle.getSectionProperties(); if ( sectionProperties == null ) { sectionProperties = new StyleSectionProperties(); currentStyle.setSectionProperties( sectionProperties ); } // column-count Integer columnCount = ele.getFoColumnCountAttribute(); if ( columnCount != null ) { sectionProperties.setColumnCount( columnCount ); } // column-gap String columnGap = ele.getFoColumnGapAttribute(); if ( StringUtils.isNotEmpty( columnGap ) ) { sectionProperties.setColumnGap( ODFUtils.getDimensionAsPoint( columnGap ) ); } currentColumnPropertiesList = new ArrayList<StyleColumnProperties>(); super.visit( ele ); currentStyle.setColumnPropertiesList( currentColumnPropertiesList ); currentColumnPropertiesList = null; }
/** * Sets the value of ODFDOM attribute representation <code>FoColumnCountAttribute</code> , See {@odf.attribute fo:column-count} * * @param foColumnCountValue The type is <code>Integer</code> */ public void setFoColumnCountAttribute(Integer foColumnCountValue) { FoColumnCountAttribute attr = new FoColumnCountAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setIntValue(foColumnCountValue.intValue()); }
/** * Create child element {@odf.element style:columns}. * * @param foColumnCountValue the <code>Integer</code> value of <code>FoColumnCountAttribute</code>, see {@odf.attribute fo:column-count} at specification * Child element is new in Odf 1.2 * * @return the element {@odf.element style:columns} */ public StyleColumnsElement newStyleColumnsElement(int foColumnCountValue) { StyleColumnsElement styleColumns = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleColumnsElement.class); styleColumns.setFoColumnCountAttribute(foColumnCountValue); this.appendChild(styleColumns); return styleColumns; }
StyleColumnsElement columnEle = sProperties .newStyleColumnsElement(1); columnEle.setFoColumnGapAttribute("0in");
/** * Sets the value of ODFDOM attribute representation <code>FoColumnCountAttribute</code> , See {@odf.attribute fo:column-count} * * @param foColumnCountValue The type is <code>Integer</code> */ public void setFoColumnCountAttribute(Integer foColumnCountValue) { FoColumnCountAttribute attr = new FoColumnCountAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setIntValue(foColumnCountValue.intValue()); }
/** * Receives the value of the ODFDOM attribute representation <code>FoColumnGapAttribute</code> , See {@odf.attribute fo:column-gap} * * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined. */ public String getFoColumnGapAttribute() { FoColumnGapAttribute attr = (FoColumnGapAttribute) getOdfAttribute(OdfDocumentNamespace.FO, "column-gap"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; }
/** * Create child element {@odf.element style:column}. * * @param styleRelWidthValue the <code>String</code> value of <code>StyleRelWidthAttribute</code>, see {@odf.attribute style:rel-width} at specification * Child element is new in Odf 1.2 * * @return the element {@odf.element style:column} */ public StyleColumnElement newStyleColumnElement(String styleRelWidthValue) { StyleColumnElement styleColumn = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleColumnElement.class); styleColumn.setStyleRelWidthAttribute(styleRelWidthValue); this.appendChild(styleColumn); return styleColumn; }
/** * Create child element {@odf.element style:columns}. * * @param foColumnCountValue the <code>Integer</code> value of <code>FoColumnCountAttribute</code>, see {@odf.attribute fo:column-count} at specification * Child element is new in Odf 1.2 * * @return the element {@odf.element style:columns} */ public StyleColumnsElement newStyleColumnsElement(int foColumnCountValue) { StyleColumnsElement styleColumns = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleColumnsElement.class); styleColumns.setFoColumnCountAttribute(foColumnCountValue); this.appendChild(styleColumns); return styleColumns; }
StylePageLayoutPropertiesElement vStlePageLprop = (StylePageLayoutPropertiesElement) vListStlePageLprop.item(0); StyleColumnsElement vStyleColumnsElement = vStlePageLprop.newStyleColumnsElement(columnsNumber); vStyleColumnsElement.setFoColumnGapAttribute(vSpacingColumn);
/** * Sets the value of ODFDOM attribute representation <code>FoColumnGapAttribute</code> , See {@odf.attribute fo:column-gap} * * @param foColumnGapValue The type is <code>String</code> */ public void setFoColumnGapAttribute(String foColumnGapValue) { FoColumnGapAttribute attr = new FoColumnGapAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setValue(foColumnGapValue); }
/** * Receives the value of the ODFDOM attribute representation <code>FoColumnGapAttribute</code> , See {@odf.attribute fo:column-gap} * * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined. */ public String getFoColumnGapAttribute() { FoColumnGapAttribute attr = (FoColumnGapAttribute) getOdfAttribute(OdfDocumentNamespace.FO, "column-gap"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; }
/** * Create child element {@odf.element style:column}. * * @param styleRelWidthValue the <code>String</code> value of <code>StyleRelWidthAttribute</code>, see {@odf.attribute style:rel-width} at specification * Child element is new in Odf 1.2 * * @return the element {@odf.element style:column} */ public StyleColumnElement newStyleColumnElement(String styleRelWidthValue) { StyleColumnElement styleColumn = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleColumnElement.class); styleColumn.setStyleRelWidthAttribute(styleRelWidthValue); this.appendChild(styleColumn); return styleColumn; }
/** * Create child element {@odf.element style:columns}. * * @param foColumnCountValue the <code>Integer</code> value of <code>FoColumnCountAttribute</code>, see {@odf.attribute fo:column-count} at specification * Child element is new in Odf 1.2 * * @return the element {@odf.element style:columns} */ public StyleColumnsElement newStyleColumnsElement(int foColumnCountValue) { StyleColumnsElement styleColumns = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleColumnsElement.class); styleColumns.setFoColumnCountAttribute(foColumnCountValue); this.appendChild(styleColumns); return styleColumns; }