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
 String getCharacterContent(boolean ooMode)
           
 BigDecimal getHeight()
           
 BigDecimal getHeight(LengthUnit in)
           
 double getRatio()
           
 String getSVGAttr(String name)
           
 LengthUnit getUnit()
          The unit that all length methods use.
 BigDecimal getWidth()
           
 BigDecimal getWidth(LengthUnit in)
           
 BigDecimal getX()
           
 BigDecimal getY()
           
static float parseLength(String l, LengthUnit to)
          Parse SVG and OD length.
 void setSVGAttr(String name, Number val)
          This set the svg:name attribute to val mm.
 void setSVGAttr(String name, String val)
           
 
Methods inherited from class org.jopendocument.dom.ImmutableDocStyledNode
getContent, getODDocument
 
Methods inherited from class org.jopendocument.dom.StyledNode
getPrivateStyle, getStyle, getStyle, getStyle, getStyle, getStyleDesc, getStyleDesc, getStyleDesc, getStyleName, getStyleStyleDesc, setStyleName, setStyleName
 
Methods inherited from class org.jopendocument.dom.ODNode
getElement, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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(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 String getCharacterContent(boolean ooMode)

getWidth

public final BigDecimal getWidth()

getWidth

public final BigDecimal getWidth(LengthUnit in)

getHeight

public final BigDecimal getHeight()

getHeight

public final BigDecimal getHeight(LengthUnit in)

getSVGAttr

public String getSVGAttr(String name)

setSVGAttr

public void setSVGAttr(String name,
                       String val)

setSVGAttr

public void setSVGAttr(String name,
                       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 BigDecimal getX()

getY

public final BigDecimal getY()

getUnit

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

Returns:
the unit used, eg "mm".


Copyright © 2010 jOpenDocument All Rights Reserved.