org.odftoolkit.simple.draw
Class AbstractFrameContainer

java.lang.Object
  extended by org.odftoolkit.simple.draw.AbstractFrameContainer
All Implemented Interfaces:
FrameContainer
Direct Known Subclasses:
AbstractTextboxContainer

public abstract class AbstractFrameContainer
extends Object
implements FrameContainer

AbstractFrameContainer is an abstract implementation of the FrameContainer interface, with a default implementation for every method defined in FrameContainer, except getFrameContainerElement(). A subclass must implement the abstract method getFrameContainerElement().

Since:
0.5

Constructor Summary
AbstractFrameContainer()
           
 
Method Summary
 Frame addFrame()
          Add a frame to the container
 Frame addFrame(FrameRectangle rectangle)
          Add a frame with the specific position to the container
 Frame getFrameByName(String name)
          Return a frame whose name (specified with "draw:name") is a given value.
 List<Frame> getFrameByPresentationclass(PresentationDocument.PresentationClass usage)
          Return a list of frame whose usage (specified with "presentation:class") is a given value.
abstract  OdfElement getFrameContainerElement()
          Get the ODF element which can have as child element directly according to ODF specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFrameContainer

public AbstractFrameContainer()
Method Detail

getFrameContainerElement

public abstract OdfElement getFrameContainerElement()
Description copied from interface: FrameContainer
Get the ODF element which can have as child element directly according to ODF specification. This Element will help to find the position to insert a new draw:frame element.

Specified by:
getFrameContainerElement in interface FrameContainer
Returns:
the parent of draw:frame

addFrame

public Frame addFrame()
Add a frame to the container

Returns:
the instance of DrawFrameElement

addFrame

public Frame addFrame(FrameRectangle rectangle)
Add a frame with the specific position to the container

Parameters:
rectangle - - the rectangle (position and size) of this frame
Returns:
an object of frame

getFrameByName

public Frame getFrameByName(String name)
Return a frame whose name (specified with "draw:name") is a given value.

Parameters:
name - - the name of this frame
Returns:
a frame whose name is the given value

getFrameByPresentationclass

public List<Frame> getFrameByPresentationclass(PresentationDocument.PresentationClass usage)
Return a list of frame whose usage (specified with "presentation:class") is a given value.

Null will be returned if the owner document is not a presentation document.

Parameters:
usage - - the usage value
Returns:
a list of frame whose usage is a given value. Null will be returned if the owner document is not a presentation document.
See Also:
PresentationDocument.PresentationClass


Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.