Package org.apache.poi.xssf.model
Class ThemesTable
java.lang.Object
org.apache.poi.ooxml.POIXMLDocumentPart
org.apache.poi.xssf.model.ThemesTable
- All Implemented Interfaces:
Themes
Class that represents theme of XLSX document. The theme includes specific
colors and fonts.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
POIXMLDocumentPart.RelationPart -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new, empty ThemesTableThemesTable(InputStream stream) Construct a ThemesTable.ThemesTable(PackagePart part) Construct a ThemesTable.ThemesTable(ThemeDocument theme) Construct a ThemesTable from an existing ThemeDocument. -
Method Summary
Modifier and TypeMethodDescriptiongetThemeColor(int idx) Convert a theme "index" (as used by fonts etc) into a color.voidIf the colour is based on a theme, then inherit information (currently just colours) from it as required.voidreadFrom(InputStream is) Read this themes table from an XML file.voidwriteTo(OutputStream out) Write this table out as XML.Methods inherited from class org.apache.poi.ooxml.POIXMLDocumentPart
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, isCommitted, setCommitted, toString
-
Constructor Details
-
ThemesTable
public ThemesTable()Create a new, empty ThemesTable -
ThemesTable
Construct a ThemesTable.- Parameters:
part- A PackagePart.- Throws:
IOException- Since:
- POI 3.14-Beta1
-
ThemesTable
Construct a ThemesTable.- Parameters:
stream- input stream.- Throws:
IOException- Since:
- POI 5.2.0
-
ThemesTable
Construct a ThemesTable from an existing ThemeDocument.- Parameters:
theme- A ThemeDocument.
-
-
Method Details
-
readFrom
Read this themes table from an XML file.- Parameters:
is- The input stream containing the XML document.- Throws:
IOException- if an error occurs while reading.- Since:
- POI 5.2.0
-
getThemeColor
Convert a theme "index" (as used by fonts etc) into a color.- Specified by:
getThemeColorin interfaceThemes- Parameters:
idx- A theme "index"- Returns:
- The mapped XSSFColor, or null if not mapped.
-
inheritFromThemeAsRequired
If the colour is based on a theme, then inherit information (currently just colours) from it as required.- Specified by:
inheritFromThemeAsRequiredin interfaceThemes
-
writeTo
Write this table out as XML.- Parameters:
out- The stream to write to.- Throws:
IOException- if an error occurs while writing.
-