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
protected  void checkElemName()
           
 boolean equals(Object obj)
           
 StyleStyle getDefaultStyle()
           
protected  StyleStyleDesc<?> getDesc()
           
 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, getNonNullStyleDesc, getNS, getPackage, getReferencedStyle, getReferencedStyleElement, getReferences, getSTYLE, 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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyleStyle

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

checkElemName

protected void checkElemName()
Overrides:
checkElemName in class Style

getDesc

protected StyleStyleDesc<?> getDesc()
Overrides:
getDesc in class Style

getFamily

public final 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:
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(Object obj)
Overrides:
equals in class Style

hashCode

public int hashCode()
Overrides:
hashCode in class Style


Copyright © 2010 jOpenDocument All Rights Reserved.