Package com.independentsoft.office.odf.styles

# Class ColumnStyle

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

public class ColumnStyle extends BaseStyle
Represents the column styles.

- ## 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
  `ColumnStyle()`
  Initializes a new instance of the ColumnStyle class.
  `ColumnStyle​(String name)`
  Initializes a new instance of the ColumnStyle class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ColumnStyle`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `Break`
  `getBreakAfter()`
  Gets the break after.
  `Break`
  `getBreakBefore()`
  Gets the break before.
  `int`
  `getRelativeWidth()`
  Gets the relative width of a column with a number value, followed by a (ASTERISK, U+002A) character.
  `Size`
  `getWidth()`
  Gets the fixed width for a column.
  `void`
  `setBreakAfter​(Break breakAfter)`
  Sets the break after.
  `void`
  `setBreakBefore​(Break breakBefore)`
  Sets the break before.
  `void`
  `setRelativeWidth​(int relativeWidth)`
  Sets the relative width of a column with a number value, followed by a (ASTERISK, U+002A) character.
  `void`
  `setUseOptimalWidth​(boolean useOptimalWidth)`
  Specifies that a column width should be recalculated automatically if content in the column changes.
  `void`
  `setWidth​(Size width)`
  Sets the fixed width for a column.
  `String`
  `toString()`
  Converts the value of the current ColumnStyle object to its equivalent string representation.
  `boolean`
  `useOptimalWidth()`
  Specifies that a column width should be recalculated automatically if content in the column changes.

  ### 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

  - ### ColumnStyle

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

  - ### ColumnStyle

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

- ## Method Details

  - ### clone

    public ColumnStyle 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 ColumnStyle object to its equivalent string representation.
    Overrides:
      `toString` in class `BaseStyle`
    Returns:
      the string

  - ### getWidth

    public Size getWidth()
    Gets the fixed width for a column.
    Returns:
      the width

  - ### setWidth

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

  - ### getRelativeWidth

    public int getRelativeWidth()
    Gets the relative width of a column with a number value, followed by a (ASTERISK, U+002A) character.
    Returns:
      the relative width

  - ### setRelativeWidth

    public void setRelativeWidth​(int relativeWidth)
    Sets the relative width of a column with a number value, followed by a (ASTERISK, U+002A) character.
    Parameters:
      `relativeWidth` - the new relative width

  - ### useOptimalWidth

    public boolean useOptimalWidth()
    Specifies that a column width should be recalculated automatically if content in the column changes.
    Returns:
      true, if successful

  - ### setUseOptimalWidth

    public void setUseOptimalWidth​(boolean useOptimalWidth)
    Specifies that a column width should be recalculated automatically if content in the column changes.
    Parameters:
      `useOptimalWidth` - the new use optimal width

  - ### getBreakBefore

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

  - ### setBreakBefore

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

  - ### getBreakAfter

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

  - ### setBreakAfter

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