|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.POIXMLDocumentPart
org.apache.poi.xssf.model.ThemesTable
public class ThemesTable
Class that represents theme of XLSX document. The theme includes specific colors and fonts.
Nested Class Summary | |
---|---|
static class |
ThemesTable.ThemeElement
|
Nested classes/interfaces inherited from class org.apache.poi.POIXMLDocumentPart |
---|
POIXMLDocumentPart.RelationPart |
Constructor Summary | |
---|---|
ThemesTable()
Create a new, empty ThemesTable |
|
ThemesTable(PackagePart part)
Construct a ThemesTable. |
|
ThemesTable(PackagePart part,
PackageRelationship rel)
Deprecated. in POI 3.14, scheduled for removal in POI 3.16 |
|
ThemesTable(org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument theme)
Construct a ThemesTable from an existing ThemeDocument. |
Method Summary | |
---|---|
protected void |
commit()
Save the content in the underlying package part. |
XSSFColor |
getThemeColor(int idx)
Convert a theme "index" (as used by fonts etc) into a color. |
void |
inheritFromThemeAsRequired(XSSFColor color)
If the colour is based on a theme, then inherit information (currently just colours) from it as required. |
void |
writeTo(java.io.OutputStream out)
Write this table out as XML. |
Methods inherited from class org.apache.poi.POIXMLDocumentPart |
---|
_invokeOnDocumentRead, addRelation, addRelation, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationId, getRelationParts, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ThemesTable()
public ThemesTable(PackagePart part) throws java.io.IOException
part
- A PackagePart.
java.io.IOException
@Deprecated public ThemesTable(PackagePart part, PackageRelationship rel) throws java.io.IOException
java.io.IOException
public ThemesTable(org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument theme)
theme
- A ThemeDocument.Method Detail |
---|
public XSSFColor getThemeColor(int idx)
idx
- A theme "index"
public void inheritFromThemeAsRequired(XSSFColor color)
public void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- The stream to write to.
java.io.IOException
- if an error occurs while writing.protected void commit() throws java.io.IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit
in class POIXMLDocumentPart
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |