public class StyleCollection
extends java.lang.Object
implements java.lang.Cloneable, java.lang.Iterable
| Modifier and Type | Method and Description |
|---|---|
Style |
add(int type,
java.lang.String name) |
Style |
addCopy(Style style)
Copies a style into this collection.
|
void |
clearQuickStyleGallery()
Removes all styles from the Quick Style Gallery panel.
|
Style |
get(int index)
Gets a style by index.
|
Style |
get(java.lang.String name)
|
Style |
getByStyleIdentifier(int sti) |
int |
getCount()
Gets the number of styles in the collection.
|
Font |
getDefaultFont()
Gets document default text formatting.
|
ParagraphFormat |
getDefaultParagraphFormat()
Gets document default paragraph formatting.
|
DocumentBase |
getDocument()
Gets the owner document.
|
java.util.Iterator |
iterator()
Gets an enumerator object that will enumerate styles in the alphabetical order of their names.
|
protected java.lang.Object |
memberwiseClone() |
public void clearQuickStyleGallery()
public DocumentBase getDocument()
public Font getDefaultFont()
Note that document-wide defaults were introduced in Microsoft Word 2007 and are fully supported in OOXML formats ( LoadFormat.DOCX) only. Earlier document formats have limited support for this feature and only font names can be stored.
public ParagraphFormat getDefaultParagraphFormat()
Note that document-wide defaults were introduced in Microsoft Word 2007 and are fully supported in OOXML formats ( LoadFormat.DOCX) only. Earlier document formats have no support for document default paragraph formatting.
public int getCount()
public Style get(java.lang.String name)
Case sensitive, returns null if the style with the given name is not found.
If this is an English name of a built in style that does not yet exist, automatically creates it.
Style value.public Style getByStyleIdentifier(int sti)
public Style get(int index)
public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic Style add(int type, java.lang.String name)
public Style addCopy(Style style)
style - Style to be copied.protected java.lang.Object memberwiseClone()