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 java.lang.Object


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

Field Detail

TRANSPARENT

public static final java.awt.Color TRANSPARENT

TRANSPARENT_NAME

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

StyleProperties

public StyleProperties(Style style,
                       java.lang.String propPrefix)

StyleProperties

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

parseBoolean

public static final boolean parseBoolean(java.lang.String s,
                                         boolean def)

parseInt

public static final int parseInt(java.lang.String s,
                                 int def)

parseInteger

public static final java.lang.Integer parseInteger(java.lang.String s)

getEnclosingStyle

public final Style getEnclosingStyle()

getStyledNode

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

getElement

public final org.jdom.Element getElement()

getAttributeValue

public final java.lang.String getAttributeValue(java.lang.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.

setAttributeValue

public final void setAttributeValue(java.lang.Object o,
                                    java.lang.String attrName)

setAttributeValue

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

getRawBackgroundColor

public final java.lang.String getRawBackgroundColor()

getBackgroundColor

public final java.awt.Color getBackgroundColor()

setBackgroundColor

public final void setBackgroundColor(java.awt.Color color)

setBackgroundColor

public final void setBackgroundColor(java.lang.String color)