Package com.independentsoft.office.odf.styles

# Class TableStyle

java.lang.Object
com.independentsoft.office.odf.styles.Style
com.independentsoft.office.odf.styles.BaseStyle
com.independentsoft.office.odf.styles.TableStyle

public class TableStyle extends BaseStyle
Represents the table style.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.odf.styles.BaseStyle

  `className, dataStyle, enableAutoUpdate, family, linkedStyleName, listStyle, masterPageName, nextStyle, outlineLevelEmpty, outlineNumberingLevel, parentStyle, styleMappings`

  ### Fields inherited from class com.independentsoft.office.odf.styles.Style

  `displayName, name`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TableStyle()`
  Initializes a new instance of the TableStyle class.
  `TableStyle​(String name)`
  Initializes a new instance of the TableStyle class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TableStyle`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `TableAlignment`
  `getAlignment()`
  Gets the horizontal alignment of a table.
  `String`
  `getBackgroundColor()`
  Gets the background color for table.
  `BackgroundImage`
  `getBackgroundImage()`
  Gets the background image.
  `BorderModel`
  `getBorderModel()`
  Specifies what border model to use when creating a table with a border.
  `Size`
  `getBottomMargin()`
  Gets the bottom margin.
  `Break`
  `getBreakAfter()`
  Gets the break after table.
  `Break`
  `getBreakBefore()`
  Gets the break before table.
  `KeepTogether`
  `getKeepTogether()`
  Gets the keep together.
  `Size`
  `getLeftMargin()`
  Gets the left margin.
  `Size`
  `getMargin()`
  Gets the margin.
  `String`
  `getPageNumber()`
  Gets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.
  `Size`
  `getRelativeWidth()`
  Gets the width of a table relative to the width of the area that the table is in.
  `Size`
  `getRightMargin()`
  Gets the right margin.
  `String`
  `getShadow()`
  Specifies if enables or disables a three-dimensional shadow for a three-dimensional object.
  `Size`
  `getTopMargin()`
  Gets the top margin.
  `Size`
  `getWidth()`
  Gets the fixed width of a table.
  `WritingMode`
  `getWritingMode()`
  Gets the writing mode of the table.
  `boolean`
  `isDisplay()`
  Specifies whether a table is displayed.
  `boolean`
  `isEnableBreakBetweenRows()`
  Specifies that a page break may occur inside a table.
  `void`
  `setAlignment​(TableAlignment alignment)`
  Sets the horizontal alignment of a table.
  `void`
  `setBackgroundColor​(String backgroundColor)`
  Sets the background color for table.
  `void`
  `setBackgroundImage​(BackgroundImage backgroundImage)`
  Sets the background image.
  `void`
  `setBorderModel​(BorderModel borderModel)`
  Specifies what border model to use when creating a table with a border.
  `void`
  `setBottomMargin​(Size bottomMargin)`
  Sets the bottom margin.
  `void`
  `setBreakAfter​(Break breakAfter)`
  Sets the break after table.
  `void`
  `setBreakBefore​(Break breakBefore)`
  Sets the break before table.
  `void`
  `setDisplay​(boolean display)`
  Specifies whether a table is displayed.
  `void`
  `setEnableBreakBetweenRows​(boolean enableBreakBetweenRows)`
  Specifies that a page break may occur inside a table.
  `void`
  `setKeepTogether​(KeepTogether keepTogether)`
  Sets the keep together.
  `void`
  `setLeftMargin​(Size leftMargin)`
  Sets the left margin.
  `void`
  `setMargin​(Size margin)`
  Sets the margin.
  `void`
  `setPageNumber​(String pageNumber)`
  Sets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.
  `void`
  `setRelativeWidth​(Size relativeWidth)`
  Sets the width of a table relative to the width of the area that the table is in.
  `void`
  `setRightMargin​(Size rightMargin)`
  Sets the right margin.
  `void`
  `setShadow​(String shadow)`
  Specifies if enables or disables a three-dimensional shadow for a three-dimensional object.
  `void`
  `setTopMargin​(Size topMargin)`
  Sets the top margin.
  `void`
  `setWidth​(Size width)`
  Sets the fixed width of a table.
  `void`
  `setWritingMode​(WritingMode writingMode)`
  Sets the writing mode of the table.
  `String`
  `toString()`
  Converts the value of the current TableStyle object to its equivalent string representation.

  ### Methods inherited from class com.independentsoft.office.odf.styles.BaseStyle

  `getClassName, getDataStyle, getFamily, getListStyle, getMasterPageName, getNextStyle, getOutlineNumberingLevel, getParentStyle, getStyleMappings, isEnableAutoUpdate, setClassName, setDataStyle, setEnableAutoUpdate, setListStyle, setMasterPageName, setNextStyle, setOutlineNumberingLevel, setParentStyle, toString`

  ### Methods inherited from class com.independentsoft.office.odf.styles.Style

  `getDisplayName, getName, setDisplayName, setName`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### TableStyle

    public TableStyle()
    Initializes a new instance of the TableStyle class.

  - ### TableStyle

    public TableStyle​(String name)
    Initializes a new instance of the TableStyle class.
    Parameters:
      `name` - the name

- ## Method Details

  - ### clone

    public TableStyle clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in class `BaseStyle`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current TableStyle object to its equivalent string representation.
    Overrides:
      `toString` in class `BaseStyle`
    Returns:
      the string

  - ### getAlignment

    public TableAlignment getAlignment()
    Gets the horizontal alignment of a table.
    Returns:
      the alignment

  - ### setAlignment

    public void setAlignment​(TableAlignment alignment)
    Sets the horizontal alignment of a table.
    Parameters:
      `alignment` - the new alignment

  - ### getWidth

    public Size getWidth()
    Gets the fixed width of a table.
    Returns:
      the width

  - ### setWidth

    public void setWidth​(Size width)
    Sets the fixed width of a table.
    Parameters:
      `width` - the new width

  - ### getRelativeWidth

    public Size getRelativeWidth()
    Gets the width of a table relative to the width of the area that the table is in.
    Returns:
      the relative width

  - ### setRelativeWidth

    public void setRelativeWidth​(Size relativeWidth)
    Sets the width of a table relative to the width of the area that the table is in.
    Parameters:
      `relativeWidth` - the new relative width

  - ### getBackgroundColor

    public String getBackgroundColor()
    Gets the background color for table.
    Returns:
      the background color

  - ### setBackgroundColor

    public void setBackgroundColor​(String backgroundColor)
    Sets the background color for table.
    Parameters:
      `backgroundColor` - the new background color

  - ### getMargin

    public Size getMargin()
    Gets the margin.
    Returns:
      the margin

  - ### setMargin

    public void setMargin​(Size margin)
    Sets the margin.
    Parameters:
      `margin` - the new margin

  - ### getLeftMargin

    public Size getLeftMargin()
    Gets the left margin.
    Returns:
      the left margin

  - ### setLeftMargin

    public void setLeftMargin​(Size leftMargin)
    Sets the left margin.
    Parameters:
      `leftMargin` - the new left margin

  - ### getRightMargin

    public Size getRightMargin()
    Gets the right margin.
    Returns:
      the right margin

  - ### setRightMargin

    public void setRightMargin​(Size rightMargin)
    Sets the right margin.
    Parameters:
      `rightMargin` - the new right margin

  - ### getTopMargin

    public Size getTopMargin()
    Gets the top margin.
    Returns:
      the top margin

  - ### setTopMargin

    public void setTopMargin​(Size topMargin)
    Sets the top margin.
    Parameters:
      `topMargin` - the new top margin

  - ### getBottomMargin

    public Size getBottomMargin()
    Gets the bottom margin.
    Returns:
      the bottom margin

  - ### setBottomMargin

    public void setBottomMargin​(Size bottomMargin)
    Sets the bottom margin.
    Parameters:
      `bottomMargin` - the new bottom margin

  - ### isDisplay

    public boolean isDisplay()
    Specifies whether a table is displayed.
    Returns:
      true, if is display

  - ### setDisplay

    public void setDisplay​(boolean display)
    Specifies whether a table is displayed.
    Parameters:
      `display` - the new display

  - ### getWritingMode

    public WritingMode getWritingMode()
    Gets the writing mode of the table.
    Returns:
      the writing mode

  - ### setWritingMode

    public void setWritingMode​(WritingMode writingMode)
    Sets the writing mode of the table.
    Parameters:
      `writingMode` - the new writing mode

  - ### getBorderModel

    public BorderModel getBorderModel()
    Specifies what border model to use when creating a table with a border.
    Returns:
      the border model

  - ### setBorderModel

    public void setBorderModel​(BorderModel borderModel)
    Specifies what border model to use when creating a table with a border.
    Parameters:
      `borderModel` - the new border model

  - ### isEnableBreakBetweenRows

    public boolean isEnableBreakBetweenRows()
    Specifies that a page break may occur inside a table.
    Returns:
      true, if is enable break between rows

  - ### setEnableBreakBetweenRows

    public void setEnableBreakBetweenRows​(boolean enableBreakBetweenRows)
    Specifies that a page break may occur inside a table.
    Parameters:
      `enableBreakBetweenRows` - the new enable break between rows

  - ### getKeepTogether

    public KeepTogether getKeepTogether()
    Gets the keep together.
    Returns:
      the keep together

  - ### setKeepTogether

    public void setKeepTogether​(KeepTogether keepTogether)
    Sets the keep together.
    Parameters:
      `keepTogether` - the new keep together

  - ### getShadow

    public String getShadow()
    Specifies if enables or disables a three-dimensional shadow for a three-dimensional object.
    Returns:
      the shadow

  - ### setShadow

    public void setShadow​(String shadow)
    Specifies if enables or disables a three-dimensional shadow for a three-dimensional object.
    Parameters:
      `shadow` - the new shadow

  - ### getBreakBefore

    public Break getBreakBefore()
    Gets the break before table.
    Returns:
      the break before

  - ### setBreakBefore

    public void setBreakBefore​(Break breakBefore)
    Sets the break before table.
    Parameters:
      `breakBefore` - the new break before

  - ### getBreakAfter

    public Break getBreakAfter()
    Gets the break after table.
    Returns:
      the break after

  - ### setBreakAfter

    public void setBreakAfter​(Break breakAfter)
    Sets the break after table.
    Parameters:
      `breakAfter` - the new break after

  - ### getPageNumber

    public String getPageNumber()
    Gets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.
    Returns:
      the page number

  - ### setPageNumber

    public void setPageNumber​(String pageNumber)
    Sets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.
    Parameters:
      `pageNumber` - the new page number

  - ### getBackgroundImage

    public BackgroundImage getBackgroundImage()
    Gets the background image.
    Returns:
      the background image

  - ### setBackgroundImage

    public void setBackgroundImage​(BackgroundImage backgroundImage)
    Sets the background image.
    Parameters:
      `backgroundImage` - the new background image