org.jopendocument.dom
Class ODFrame<D extends ODDocument>

java.lang.Object
  extended by org.jopendocument.dom.ODNode
      extended by org.jopendocument.dom.StyledNode<S,D>
          extended by org.jopendocument.dom.ImmutableDocStyledNode<GraphicStyle,D>
              extended by org.jopendocument.dom.ODFrame<D>
Type Parameters:
D - type of table parent

public class ODFrame<D extends ODDocument>
extends ImmutableDocStyledNode<GraphicStyle,D>

Represents a draw:frame, see 9.3 Frames.

Author:
Sylvain

Constructor Summary
ODFrame(D parent, org.jdom.Element frame)
           
 
Method Summary
 java.lang.String getCharacterContent(boolean ooMode)
           
 java.math.BigDecimal getHeight()
           
 java.math.BigDecimal getHeight(LengthUnit in)
           
 double getRatio()
           
 java.lang.String getSVGAttr(java.lang.String name)
           
 LengthUnit getUnit()
          The unit that all length methods use.
 java.math.BigDecimal getWidth()
           
 java.math.BigDecimal getWidth(LengthUnit in)
           
 java.math.BigDecimal getX()
           
 java.math.BigDecimal getY()
           
static float parseLength(java.lang.String l, LengthUnit to)
          Parse SVG and OD length.
 void setSVGAttr(java.lang.String name, java.lang.Number val)
          This set the svg:name attribute to val mm.
 void setSVGAttr(java.lang.String name, java.lang.String val)
           
 
Methods inherited from class org.jopendocument.dom.ImmutableDocStyledNode
getODDocument
 
Methods inherited from class org.jopendocument.dom.StyledNode
getPrivateStyle, getStyle, getStyleDesc, getStyleDesc, getStyleStyleDesc, setStyleName, setStyleName
 
Methods inherited from class org.jopendocument.dom.ODNode
getElement, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ODFrame

public ODFrame(D parent,
               org.jdom.Element frame)
Method Detail

parseLength

public static final float parseLength(java.lang.String l,
                                      LengthUnit to)
Parse SVG and OD length.

Parameters:
l - the string to parse, eg "1.53cm".
to - the unit, eg LengthUnit.MM.
Returns:
the length, eg 15.3.

getCharacterContent

public final java.lang.String getCharacterContent(boolean ooMode)

getWidth

public final java.math.BigDecimal getWidth()

getWidth

public final java.math.BigDecimal getWidth(LengthUnit in)

getHeight

public final java.math.BigDecimal getHeight()

getHeight

public final java.math.BigDecimal getHeight(LengthUnit in)

getSVGAttr

public java.lang.String getSVGAttr(java.lang.String name)

setSVGAttr

public void setSVGAttr(java.lang.String name,
                       java.lang.String val)

setSVGAttr

public void setSVGAttr(java.lang.String name,
                       java.lang.Number val)
This set the svg:name attribute to val mm.

Parameters:
name - the name of the attribute, eg "x".
val - the value of the attribute in getUnit(), eg 15.3.

getRatio

public final double getRatio()

getX

public final java.math.BigDecimal getX()

getY

public final java.math.BigDecimal getY()

getUnit

public final LengthUnit getUnit()
The unit that all length methods use.

Returns:
the unit used, eg "mm".