org.jopendocument.dom
Class StyleStyle

java.lang.Object
  extended by org.jopendocument.dom.ODNode
      extended by org.jopendocument.dom.Style
          extended by org.jopendocument.dom.StyleStyle
Direct Known Subclasses:
CellStyle, ColumnStyle, GraphicStyle, RowStyle, TableStyle, TextStyle

public class StyleStyle
extends Style

A style:style, see section 14.1. Maintains a map of family to classes.

Author:
Sylvain

Constructor Summary
StyleStyle(ODPackage pkg, org.jdom.Element styleElem)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 StyleStyle getDefaultStyle()
           
 java.lang.String getFamily()
           
 org.jdom.Element getFormattingProperties()
           
 StyleStyle getParentStyle()
          Get the parent style.
<S extends StyleStyle>
S
getParentStyle(StyledNode<S,?> styledNode)
          Get the parent style, evaluating conditions.
 int hashCode()
           
 
Methods inherited from class org.jopendocument.dom.Style
dup, getFormattingProperties, getFormattingProperties, getName, getNS, getReferencedStyle, getReferencedStyleElement, getReferences, getStyle, getStyleDesc, getStyleStyleDesc, isReferencedAtMostOnce, isStandardStyleResolution, register, registerAllVersions, setStandardStyleResolution, warp
 
Methods inherited from class org.jopendocument.dom.ODNode
getElement, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyleStyle

public StyleStyle(ODPackage pkg,
                  org.jdom.Element styleElem)
Method Detail

getFamily

public final java.lang.String getFamily()

getFormattingProperties

public final org.jdom.Element getFormattingProperties()
Overrides:
getFormattingProperties in class Style

getParentStyle

public final StyleStyle getParentStyle()
Get the parent style. Note: if this style supports conditions they will be ignored.

Returns:
the parent style or null if none exists.
See Also:
StyleDesc.findStyleWithName(ODPackage, org.jdom.Document, String)

getParentStyle

public final <S extends StyleStyle> S getParentStyle(StyledNode<S,?> styledNode)
Get the parent style, evaluating conditions.

Type Parameters:
S - style of the node, must be equal to this class.
Parameters:
styledNode - the node to use for evaluations, not null.
Returns:
the parent style or null if none exists.
Throws:
java.lang.IllegalArgumentException - if styledNode cannot have this as its style, e.g. cellStyle.getParentStyle(row).
See Also:
StyleDesc.findStyleForNode(StyledNode, String)

getDefaultStyle

public final StyleStyle getDefaultStyle()

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class Style

hashCode

public int hashCode()
Overrides:
hashCode in class Style