org.odftoolkit.simple.common.field
Class ChapterField

java.lang.Object
  extended by org.odftoolkit.simple.Component
      extended by org.odftoolkit.simple.common.field.Field
          extended by org.odftoolkit.simple.common.field.ChapterField

public class ChapterField
extends Field

ChapterField is placed inside a header or footer, it displays the current chapter name or number on every page.

NOTE: Before the document is opened in any editor, the value of this field maybe invalid.

Since:
0.5

Nested Class Summary
static class ChapterField.DisplayType
          A DisplayType specifies the information that a chapter field should display.
 
Nested classes/interfaces inherited from class org.odftoolkit.simple.common.field.Field
Field.FieldType
 
Method Summary
 Field.FieldType getFieldType()
          Return the type of this field.
 TextChapterElement getOdfElement()
          Return an instance of TextChapterElement which represents this feature.
 void setDisplayPage(ChapterField.DisplayType type)
          Specifies the information that a chapter field should display.
 void setOutlineLevel(int level)
          Specifies the outline level to be displayed.
 
Methods inherited from class org.odftoolkit.simple.Component
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setDisplayPage

public void setDisplayPage(ChapterField.DisplayType type)
Specifies the information that a chapter field should display.

Parameters:
type - the display type which is predefined in DisplayType.

setOutlineLevel

public void setOutlineLevel(int level)
Specifies the outline level to be displayed.

Parameters:
level - the outline level to be displayed.

getOdfElement

public TextChapterElement getOdfElement()
Return an instance of TextChapterElement which represents this feature.

Specified by:
getOdfElement in class Component
Returns:
an instance of TextChapterElement

getFieldType

public Field.FieldType getFieldType()
Description copied from class: Field
Return the type of this field.

Specified by:
getFieldType in class Field
Returns:
the type of this field.


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