Package com.independentsoft.office.spreadsheet.styles

# Class Format

java.lang.Object
com.independentsoft.office.spreadsheet.styles.Format

public class Format extends Object
The Class Format.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Format()`
  Instantiates a new format.
  `Format​(InternalXMLStreamReader reader)`
  Instantiates a new format.
  `Format​(InternalXMLStreamReader reader, String startLocalName, String startNamespace)`
  Instantiates a new format.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Format`
  `clone()`
  `CellAlignment`
  `getAlignment()`
  Gets the alignment.
  `CellBorder`
  `getBorder()`
  Gets the border.
  `Fill`
  `getFill()`
  Gets the fill.
  `Font`
  `getFont()`
  Gets the font.
  `NumberFormat`
  `getNumberFormat()`
  Gets the number format.
  `Protection`
  `getProtection()`
  Gets the protection.
  `void`
  `setAlignment​(CellAlignment alignment)`
  Sets the alignment.
  `void`
  `setBorder​(CellBorder border)`
  Sets the border.
  `void`
  `setFill​(Fill fill)`
  Sets the fill.
  `void`
  `setFont​(Font font)`
  Sets the font.
  `void`
  `setNumberFormat​(NumberFormat numberFormat)`
  Sets the number format.
  `void`
  `setProtection​(Protection protection)`
  Sets the protection.
  `String`
  `toString()`
  `String`
  `toString​(String elementName)`
  Returns a string representation of this format using the specified element name.

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

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

- ## Constructor Details

  - ### Format

    public Format()
    Instantiates a new format.

  - ### Format

    public Format​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new format.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the xML stream exception

  - ### Format

    public Format​(InternalXMLStreamReader reader, String startLocalName, String startNamespace) throws XMLStreamException
    Instantiates a new format. The x14:dxf element (differential formats extension) reuses the main-namespace CT_Dxf content model, so the same parser runs with a different start element.
    Parameters:
      `reader` - the reader
      `startLocalName` - the start local name
      `startNamespace` - the start namespace
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### clone

    public Format clone()
    Overrides:
      `clone` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### toString

    public String toString​(String elementName)
    Returns a string representation of this format using the specified element name.
    Parameters:
      `elementName` - the element name
    Returns:
      the string

  - ### getAlignment

    public CellAlignment getAlignment()
    Gets the alignment.
    Returns:
      the alignment

  - ### setAlignment

    public void setAlignment​(CellAlignment alignment)
    Sets the alignment.
    Parameters:
      `alignment` - the new alignment

  - ### getBorder

    public CellBorder getBorder()
    Gets the border.
    Returns:
      the border

  - ### setBorder

    public void setBorder​(CellBorder border)
    Sets the border.
    Parameters:
      `border` - the new border

  - ### getFill

    public Fill getFill()
    Gets the fill.
    Returns:
      the fill

  - ### setFill

    public void setFill​(Fill fill)
    Sets the fill.
    Parameters:
      `fill` - the new fill

  - ### getFont

    public Font getFont()
    Gets the font.
    Returns:
      the font

  - ### setFont

    public void setFont​(Font font)
    Sets the font.
    Parameters:
      `font` - the new font

  - ### getNumberFormat

    public NumberFormat getNumberFormat()
    Gets the number format.
    Returns:
      the number format

  - ### setNumberFormat

    public void setNumberFormat​(NumberFormat numberFormat)
    Sets the number format.
    Parameters:
      `numberFormat` - the new number format

  - ### getProtection

    public Protection getProtection()
    Gets the protection.
    Returns:
      the protection

  - ### setProtection

    public void setProtection​(Protection protection)
    Sets the protection.
    Parameters:
      `protection` - the new protection