org.odftoolkit.simple
Class Component

java.lang.Object
  extended by org.odftoolkit.simple.Component
Direct Known Subclasses:
Cell, Column, Control, Field, Footer, FormControl, Frame, Header, Image, Notes, OOForm, Paragraph, Row, Section, Slide, Span, Table, TextHyperlink

public abstract class Component
extends Object

This class is the parent of classes that present all kinds of document structures.

Since:
0.5

Constructor Summary
Component()
           
 
Method Summary
protected static Component getComponentByElement(OdfElement element)
          Get the component instance by the element instance.
abstract  OdfElement getOdfElement()
          Return the instance of OdfElement which presents this structure.
 Document getOwnerDocument()
          Get the owner document of this component
protected static void registerComponent(Component component, OdfElement element)
          Register component to the map repository
protected static void unregisterComponent(OdfElement element)
          Unregister component from the map repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Component

public Component()
Method Detail

getOdfElement

public abstract OdfElement getOdfElement()
Return the instance of OdfElement which presents this structure.

Returns:
the instance of OdfElement

registerComponent

protected static void registerComponent(Component component,
                                        OdfElement element)
Register component to the map repository

Parameters:
component - the component to be registered.
element - the instance of OdfElement which presents this component.
See Also:
Document.getComponentMap()

unregisterComponent

protected static void unregisterComponent(OdfElement element)
Unregister component from the map repository

Parameters:
element - the instance of OdfElement which presents this component.
Since:
0.6.5
See Also:
Document.getComponentMap()

getComponentByElement

protected static Component getComponentByElement(OdfElement element)
Get the component instance by the element instance. Return null if there is no such element registered.

Parameters:
element - the instance of OdfElement which presents this component.
Returns:
the component instance

getOwnerDocument

public Document getOwnerDocument()
Get the owner document of this component

Returns:
- the owner document


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