use of com.lowagie.text.rtf.RtfBasicElement in project itext2 by albfernandez.
the class RtfListItem method inheritListSettings.
/**
* Inherit the list settings from the parent list to RtfLists that
* are contained in this RtfListItem.
*
* @param listNumber The list number to inherit.
* @param listLevel The list level to inherit.
*/
public void inheritListSettings(int listNumber, int listLevel) {
for (int i = 0; i < chunks.size(); i++) {
RtfBasicElement rtfElement = (RtfBasicElement) chunks.get(i);
if (rtfElement instanceof RtfList) {
((RtfList) rtfElement).setListNumber(listNumber);
setLevel(listLevel);
// ((RtfList) rtfElement).setParent(this.parentList);
}
}
}
use of com.lowagie.text.rtf.RtfBasicElement in project itext2 by albfernandez.
the class RtfHeaderFooter method writeContent.
/**
* Writes the content of this RtfHeaderFooter
*/
public void writeContent(final OutputStream result) throws IOException {
result.write(OPEN_GROUP);
if (this.type == TYPE_HEADER) {
if (this.displayAt == DISPLAY_ALL_PAGES) {
result.write(HEADER_ALL);
} else if (this.displayAt == DISPLAY_FIRST_PAGE) {
result.write(HEADER_FIRST);
} else if (this.displayAt == DISPLAY_LEFT_PAGES) {
result.write(HEADER_LEFT);
} else if (this.displayAt == DISPLAY_RIGHT_PAGES) {
result.write(HEADER_RIGHT);
}
} else {
if (this.displayAt == DISPLAY_ALL_PAGES) {
result.write(FOOTER_ALL);
} else if (this.displayAt == DISPLAY_FIRST_PAGE) {
result.write(FOOTER_FIRST);
} else if (this.displayAt == DISPLAY_LEFT_PAGES) {
result.write(FOOTER_LEFT);
} else if (this.displayAt == DISPLAY_RIGHT_PAGES) {
result.write(FOOTER_RIGHT);
}
}
result.write(DELIMITER);
for (int i = 0; i < this.content.length; i++) {
if (this.content[i] instanceof RtfBasicElement) {
RtfBasicElement rbe = (RtfBasicElement) this.content[i];
rbe.writeContent(result);
}
}
result.write(CLOSE_GROUP);
}
Aggregations