24.08.2015 Views

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Author</strong> Developer Guide | 223if ("td".equals(tableCellsTagName)) {if (colWidths != null && tableElement != null) {if (colsStartOffset >= 0 && colsEndOffset >= 0 && colsStartOffset 0) {// Insert the cols elements before the 'header' elementoffset = header[0].getStartOffset();}if (offset == -1) {throw new <strong>Author</strong>OperationException("No valid offset to insert the columnswidth specification.");}authorDocumentController.insert<strong>XML</strong>Fragment(xmlFragment, offset);}}}private String create<strong>XML</strong>Fragment(WidthRepresentation[] widthRepresentations){StringBuffer fragment = new StringBuffer();String ns = tableElement.getNamespace();for (int i = 0; i < widthRepresentations.length; i++) {WidthRepresentation width = widthRepresentations[i];fragment.append("");}return fragment.toString();}7. The following three methods are used to determine what type of column width specifications the table column widthprovider support. In our case all types of specifications are allowed:public boolean isAcceptingFixedColumnWidths(String tableCellsTagName) {return true;}public boolean isAcceptingPercentageColumnWidths(String tableCellsTagName){return true;}public boolean isAcceptingProportionalColumnWidths(String tableCellsTagName){return true;}Note: The complete source code can be found in the Simple Documentation Framework project, includedin the <strong>Oxygen</strong> <strong>Author</strong> SDK zip available for download on the <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> website.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!