org.odftoolkit.simple.style
Class TableProperties

java.lang.Object
  extended by org.odftoolkit.simple.style.TableProperties

public class TableProperties
extends Object

This class represents the table style settings. It provides methods to access or modify the formatting properties applied to tables. More functions will be added latter.

This class is a corresponded high level class for element "style:table-properties". It provides methods to access the attributes and children of "style:table-properties".

Since:
0.8

Constructor Summary
protected TableProperties()
          Create an instance of TableProperties
protected TableProperties(StyleTablePropertiesElement properties)
          Create an instance of TableProperties from an element
 
Method Summary
 String getBreakAfter()
          Return the break property after the reference.
 String getBreakBefore()
          Return the break property before the reference.
static TableProperties getOrCreateTableProperties(OdfStyleBase style)
          Return an instance of TableProperties
 int getPageNumber()
          Return the page number that is used for a new page with a master style.
static TableProperties getTableProperties(OdfStyleBase style)
          Return an instance of TableProperties
 void setBreak(String breakPosition, String breakAttribute)
          Set the break.
 void setPageNumber(int pageNumber)
          Set the page number for a new page with a master style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableProperties

protected TableProperties()
Create an instance of TableProperties


TableProperties

protected TableProperties(StyleTablePropertiesElement properties)
Create an instance of TableProperties from an element

Parameters:
properties - - the element of style:table-properties
Method Detail

setBreak

public void setBreak(String breakPosition,
                     String breakAttribute)
Set the break.

Parameters:
breakPosition - the position to insert a break (before or after)
breakAttribute - the attribute name (page or column)

getBreakBefore

public String getBreakBefore()
Return the break property before the reference.

Null will be returned if there is no break setting before the reference.

Returns:
- the break property; null if there is no break setting.

getBreakAfter

public String getBreakAfter()
Return the break property after the reference.

Null will be returned if there is no break setting after the reference.

Returns:
- the break property; null if there is no break setting.

getPageNumber

public int getPageNumber()
Return the page number that is used for a new page with a master style.

If there is no valid page number, 0 will be returned;

Returns:
the page number

setPageNumber

public void setPageNumber(int pageNumber)
Set the page number for a new page with a master style.

Parameters:
pageNumber - the page number

getOrCreateTableProperties

public static TableProperties getOrCreateTableProperties(OdfStyleBase style)
Return an instance of TableProperties

to represent the "style:table-properties" in a style element.

If there is no "style:table-properties" defined in the style element, a new "style:table-properties" element will be created.

Parameters:
style - - a style element
Returns:
an instance of TableProperties


getTableProperties

public static TableProperties getTableProperties(OdfStyleBase style)
Return an instance of TableProperties

to represent the "style:table-properties" in a style element.

If there is no "style:table-properties" defined in the style element, null will be returned.

Parameters:
style - - a style element
Returns:
an instance of TableProperties

;Null if there is no "style:table-properties" defined


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