|
||||||||||
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.xwpf.usermodel.XWPFStyles
public class XWPFStyles
Field Summary |
---|
Fields inherited from class org.apache.poi.POIXMLDocumentPart |
---|
DEFAULT_XML_OPTIONS |
Constructor Summary | |
---|---|
XWPFStyles()
Construct XWPFStyles from scratch for a new document. |
|
XWPFStyles(PackagePart part,
PackageRelationship rel)
Construct XWPFStyles from a package part |
Method Summary | |
---|---|
void |
addStyle(XWPFStyle style)
add a style to the document |
XWPFLatentStyles |
getLatentStyles()
get latentstyles |
XWPFStyle |
getStyle(java.lang.String styleID)
get style by a styleID |
XWPFStyle |
getStyleWithSameName(XWPFStyle style)
get the style with the same name if this style is not existing, return null |
java.util.List |
getUsedStyleList(XWPFStyle style)
get the styles which are related to the parameter style and their relatives this method can be used to copy all styles from one document to another document |
void |
setDefaultFonts(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts fonts)
Sets the default font on ctStyles DocDefaults parameter |
void |
setEastAsia(java.lang.String strEastAsia)
Sets the default East Asia spelling language on ctStyles DocDefaults parameter |
void |
setSpellingLanguage(java.lang.String strSpellingLanguage)
Sets the default spelling language on ctStyles DocDefaults parameter |
void |
setStyles(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTStyles styles)
Sets the ctStyles |
boolean |
styleExist(java.lang.String styleID)
checks whether style with styleID exist |
Methods inherited from class org.apache.poi.POIXMLDocumentPart |
---|
addRelation, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationId, getRelations, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XWPFStyles(PackagePart part, PackageRelationship rel) throws java.io.IOException, OpenXML4JException
part
- the package part holding the data of the styles,rel
- the package relationship of type "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
java.io.IOException
OpenXML4JException
public XWPFStyles()
Method Detail |
---|
public void setStyles(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTStyles styles)
styles
- public boolean styleExist(java.lang.String styleID)
styleID
- styleID of the Style in the style-Document
public void addStyle(XWPFStyle style)
style
-
java.io.IOException
public XWPFStyle getStyle(java.lang.String styleID)
styleID
- styleID of the searched style
public java.util.List getUsedStyleList(XWPFStyle style)
style
-
public void setSpellingLanguage(java.lang.String strSpellingLanguage)
strSpellingLanguage
- public void setEastAsia(java.lang.String strEastAsia)
strEastAsia
- public void setDefaultFonts(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts fonts)
fonts
- public XWPFLatentStyles getLatentStyles()
public XWPFStyle getStyleWithSameName(XWPFStyle style)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |