Package writer2latex.office
Class OfficeStyleFamily
- java.lang.Object
-
- writer2latex.office.OfficeStyleFamily
-
public class OfficeStyleFamily extends java.lang.Object
Container class representing a style family in OOo
-
-
Constructor Summary
Constructors Constructor Description OfficeStyleFamily(java.lang.Class styleClass)
Create a new OfficeStyleFamily based on a class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OfficeStyle
getDefaultStyle()
Get the default style for this familyjava.lang.String
getDisplayName(java.lang.String sName)
Get the display name for the style with the specified name.OfficeStyle
getStyle(java.lang.String sName)
Get a style by nameOfficeStyle
getStyleByDisplayName(java.lang.String sDisplayName)
Get a style by display name.java.util.Enumeration
getStylesEnumeration()
Get all named styles in the family (ie. excluding the default style)void
loadStyleFromDOM(org.w3c.dom.Node node, boolean bAutomatic)
Load a style from a DOM representationvoid
setDefaultStyle(OfficeStyle style)
Define the default style for this family, ie. an unnamed style providing defaults for some style properties.
-
-
-
Method Detail
-
setDefaultStyle
public void setDefaultStyle(OfficeStyle style)
Define the default style for this family, ie. an unnamed style providing defaults for some style properties. This style cannot be found using getStyle or getStyleByDisplayName.- Parameters:
style
- the new default style
-
getDefaultStyle
public OfficeStyle getDefaultStyle()
Get the default style for this family- Returns:
- the default style, or null if none is defined
-
getStyle
public OfficeStyle getStyle(java.lang.String sName)
Get a style by name- Parameters:
sName
- the name of the style- Returns:
- the style, or null if such a style does not exist
-
getStyleByDisplayName
public OfficeStyle getStyleByDisplayName(java.lang.String sDisplayName)
Get a style by display name. Automatic styles does not have a display name, so only common styles can be retrieved with this method- Parameters:
sDisplayName
- the display name of the style- Returns:
- the style, or null if such a style does not exist
-
getDisplayName
public java.lang.String getDisplayName(java.lang.String sName)
Get the display name for the style with the specified name. If this is an automatic style, the parent style is used- Parameters:
sName
- the style name- Returns:
- the display name, or null if the style does not exist
-
getStylesEnumeration
public java.util.Enumeration getStylesEnumeration()
Get all named styles in the family (ie. excluding the default style)- Returns:
- an enumeration of all styles represented by OfficeStyle objects
-
loadStyleFromDOM
public void loadStyleFromDOM(org.w3c.dom.Node node, boolean bAutomatic)
Load a style from a DOM representation- Parameters:
node
- the style:... node representing the stylebAutomatic
- if true, the style is an automatic style
-
-