org.jopendocument.dom
Class StyleProperties

java.lang.Object
  extended by org.jopendocument.dom.StyleProperties
Direct Known Subclasses:
ColumnStyle.StyleTableColumnProperties, GraphicStyle.StyleGraphicProperties, ParagraphStyle.StyleParagraphProperties, RowStyle.StyleTableRowProperties, SideStyleProperties, TextStyle.StyleTextProperties

public abstract class StyleProperties
extends Object


Field Summary
static Color TRANSPARENT
           
static String TRANSPARENT_NAME
           
 
Constructor Summary
StyleProperties(S style, String propPrefix, StyledNode<S,?> styledNode)
           
StyleProperties(Style style, String propPrefix)
           
 
Method Summary
protected  boolean fallbackToDefaultStyle(String attrName, org.jdom.Namespace attrNS)
           
 String getAttributeValue(String attrName, org.jdom.Namespace attrNS)
          Search the value of a formatting property.
protected  String getAttributeValueInAncestors(StyleStyle s, boolean includeFirst, String attrName, org.jdom.Namespace attrNS)
           
protected  String getAttributeValueNotInAncestors(String attrName, org.jdom.Namespace attrNS)
           
 Color getBackgroundColor()
           
 org.jdom.Element getElement()
           
protected  org.jdom.Element getElement(Style s, boolean create)
           
 Style getEnclosingStyle()
           
protected  org.jdom.Namespace getNS(String prefix)
           
 String getRawBackgroundColor()
           
 StyledNode<? extends StyleStyle,?> getStyledNode()
           
static boolean parseBoolean(String s, boolean def)
           
static int parseInt(String s, int def)
           
static Integer parseInteger(String s)
           
 void setAttributeValue(Object o, String attrName)
           
 void setAttributeValue(Object o, String attrName, org.jdom.Namespace attrNS)
           
 void setBackgroundColor(Color color)
           
 void setBackgroundColor(String color)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSPARENT

public static final Color TRANSPARENT

TRANSPARENT_NAME

public static final String TRANSPARENT_NAME
See Also:
Constant Field Values
Constructor Detail

StyleProperties

public StyleProperties(Style style,
                       String propPrefix)

StyleProperties

public StyleProperties(S style,
                       String propPrefix,
                       StyledNode<S,?> styledNode)
Method Detail

parseBoolean

public static final boolean parseBoolean(String s,
                                         boolean def)

parseInt

public static final int parseInt(String s,
                                 int def)

parseInteger

public static final Integer parseInteger(String s)

getEnclosingStyle

public final Style getEnclosingStyle()

getStyledNode

public final StyledNode<? extends StyleStyle,?> getStyledNode()

getElement

public final org.jdom.Element getElement()

getElement

protected final org.jdom.Element getElement(Style s,
                                            boolean create)

getAttributeValueInAncestors

protected final String getAttributeValueInAncestors(StyleStyle s,
                                                    boolean includeFirst,
                                                    String attrName,
                                                    org.jdom.Namespace attrNS)

getAttributeValue

public final String getAttributeValue(String attrName,
                                      org.jdom.Namespace attrNS)
Search the value of a formatting property. See ยง16.2 of OpenDocument v1.2.

Parameters:
attrName - the attribute name, e.g. "rotation-angle".
attrNS - the name space, e.g. "style".
Returns:
the value or null if not found.

getAttributeValueNotInAncestors

protected String getAttributeValueNotInAncestors(String attrName,
                                                 org.jdom.Namespace attrNS)

fallbackToDefaultStyle

protected boolean fallbackToDefaultStyle(String attrName,
                                         org.jdom.Namespace attrNS)

getNS

protected final org.jdom.Namespace getNS(String prefix)

setAttributeValue

public final void setAttributeValue(Object o,
                                    String attrName)

setAttributeValue

public final void setAttributeValue(Object o,
                                    String attrName,
                                    org.jdom.Namespace attrNS)

getRawBackgroundColor

public final String getRawBackgroundColor()

getBackgroundColor

public final Color getBackgroundColor()

setBackgroundColor

public final void setBackgroundColor(Color color)

setBackgroundColor

public final void setBackgroundColor(String color)


Copyright © 2010 jOpenDocument All Rights Reserved.