Package com.independentsoft.office.odf.styles

# Class CellProperties

java.lang.Object
com.independentsoft.office.odf.styles.CellProperties

public class CellProperties extends Object
Represents formatting properties for cells.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CellProperties()`
  Initializes a new instance of the CellProperties class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CellProperties`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `String`
  `getBackgroundColor()`
  Gets the background color for cell.
  `BackgroundImage`
  `getBackgroundImage()`
  Gets the background image.
  `Border`
  `getBorder()`
  Gets the border for cell.
  `BorderLineWidth`
  `getBorderLineWidth()`
  Gets the widths of borders.
  `Border`
  `getBottomBorder()`
  Gets the bottom border for cell.
  `BorderLineWidth`
  `getBottomBorderLineWidth()`
  Gets the bottom widths of borders.
  `Size`
  `getBottomMargin()`
  Gets the bottom margin.
  `Size`
  `getBottomPadding()`
  Gets the bottom padding.
  `CellProtectType`
  `getCellProtect()`
  Specifies how a cell is protected.
  `int`
  `getDecimalPlaces()`
  Gets the maximum number of decimal places that are displayed if numbers are formatted by a data style that has no setting for number of decimal places itself.
  `Direction`
  `getDirection()`
  Gets the direction of characters.
  `Border`
  `getLeftBorder()`
  Gets the left border for cell.
  `BorderLineWidth`
  `getLeftBorderLineWidth()`
  Gets the left widths of borders.
  `Size`
  `getLeftMargin()`
  Gets the left margin.
  `Size`
  `getLeftPadding()`
  Gets the left padding.
  `Size`
  `getMargin()`
  Gets the margin.
  `Size`
  `getPadding()`
  Gets the padding.
  `Border`
  `getRightBorder()`
  Gets the right border for cell.
  `BorderLineWidth`
  `getRightBorderLineWidth()`
  Gets the right widths of borders.
  `Size`
  `getRightMargin()`
  Gets the right margin.
  `Size`
  `getRightPadding()`
  Gets the right padding.
  `RotationAlignment`
  `getRotationAlignment()`
  Specifies how the edge of the text in a cell is aligned after a rotation.
  `int`
  `getRotationAngle()`
  Get the rotation angle of content.
  `String`
  `getShadow()`
  Gets the shadow of the cell.
  `TextAlignmentSource`
  `getTextAlignmentSource()`
  Gets the source of a text-align attribute.
  `Border`
  `getTopBorder()`
  Gets the top border for cell.
  `BorderLineWidth`
  `getTopBorderLineWidth()`
  Gets the top widths of borders.
  `Size`
  `getTopMargin()`
  Gets the top margin.
  `Size`
  `getTopPadding()`
  Gets the top padding.
  `CellVerticalAlignment`
  `getVerticalAlignment()`
  Specifies how to vertically align a line that is less than 100% of its height within the columned area.
  `VerticalGlyphOrientation`
  `getVerticalGlyphOrientation()`
  Gets the vertical glyph orientation.
  `WritingMode`
  `getWritingMode()`
  Gets the writing mode.
  `boolean`
  `isEnableWrap()`
  If wrapping is disabled, it is implementation defined whether the clipped text is visible or hidden.
  `boolean`
  `isPrintContent()`
  Specifies if content is printed.
  `boolean`
  `isRepeatContent()`
  Specifies whether text content of a cell is displayed as many times as there is space left in the cell's writing direction.
  `boolean`
  `isShrinkToFit()`
  Specifies whether content is reduced in size to fit within a cell or drawing object.
  `void`
  `setBackgroundColor​(String backgroundColor)`
  Sets the background color for cell.
  `void`
  `setBackgroundImage​(BackgroundImage backgroundImage)`
  Sets the background image.
  `void`
  `setBorder​(Border border)`
  Sets the border for cell.
  `void`
  `setBorderLineWidth​(BorderLineWidth borderLineWidth)`
  Sets the widths of borders.
  `void`
  `setBottomBorder​(Border bottomBorder)`
  Sets the bottom border for cell.
  `void`
  `setBottomBorderLineWidth​(BorderLineWidth bottomBorderLineWidth)`
  Sets the bottom widths of borders.
  `void`
  `setBottomMargin​(Size bottomMargin)`
  Sets the bottom margin.
  `void`
  `setBottomPadding​(Size bottomPadding)`
  Sets the bottom padding.
  `void`
  `setCellProtect​(CellProtectType cellProtect)`
  Specifies how a cell is protected.
  `void`
  `setDecimalPlaces​(int decimalPlaces)`
  Sets the maximum number of decimal places that are displayed if numbers are formatted by a data style that has no setting for number of decimal places itself.
  `void`
  `setDirection​(Direction direction)`
  Sets the direction of characters.
  `void`
  `setEnableWrap​(boolean enableWrap)`
  If wrapping is disabled, it is implementation defined whether the clipped text is visible or hidden.
  `void`
  `setLeftBorder​(Border leftBorder)`
  Sets the left border for cell.
  `void`
  `setLeftBorderLineWidth​(BorderLineWidth leftBorderLineWidth)`
  Sets the left widths of borders.
  `void`
  `setLeftMargin​(Size leftMargin)`
  Sets the left margin.
  `void`
  `setLeftPadding​(Size leftPadding)`
  Sets the left padding.
  `void`
  `setMargin​(Size margin)`
  Sets the margin.
  `void`
  `setPadding​(Size padding)`
  Sets the padding.
  `void`
  `setPrintContent​(boolean printContent)`
  Specifies if content is printed.
  `void`
  `setRepeatContent​(boolean repeatContent)`
  Specifies whether text content of a cell is displayed as many times as there is space left in the cell's writing direction.
  `void`
  `setRightBorder​(Border rightBorder)`
  Sets the right border for cell.
  `void`
  `setRightBorderLineWidth​(BorderLineWidth rightBorderLineWidth)`
  Sets the right widths of borders.
  `void`
  `setRightMargin​(Size rightMargin)`
  Sets the right margin.
  `void`
  `setRightPadding​(Size rightPadding)`
  Sets the right padding.
  `void`
  `setRotationAlignment​(RotationAlignment rotationAlignment)`
  Specifies how the edge of the text in a cell is aligned after a rotation.
  `void`
  `setRotationAngle​(int rotationAngle)`
  Sets the rotation angle of content.
  `void`
  `setShadow​(String shadow)`
  Sets the shadow of the cell.
  `void`
  `setShrinkToFit​(boolean shrinkToFit)`
  Specifies whether content is reduced in size to fit within a cell or drawing object.
  `void`
  `setTextAlignmentSource​(TextAlignmentSource textAlignmentSource)`
  Sets the source of a text-align attribute.
  `void`
  `setTopBorder​(Border topBorder)`
  Sets the top border for cell.
  `void`
  `setTopBorderLineWidth​(BorderLineWidth topBorderLineWidth)`
  Sets the top widths of borders.
  `void`
  `setTopMargin​(Size topMargin)`
  Sets the top margin.
  `void`
  `setTopPadding​(Size topPadding)`
  Sets the top padding.
  `void`
  `setVerticalAlignment​(CellVerticalAlignment verticalAlignment)`
  Specifies how to vertically align a line that is less than 100% of its height within the columned area.
  `void`
  `setVerticalGlyphOrientation​(VerticalGlyphOrientation verticalGlyphOrientation)`
  Sets the vertical glyph orientation.
  `void`
  `setWritingMode​(WritingMode writingMode)`
  Sets the writing mode.
  `String`
  `toString()`
  Converts the value of the current CellProperties object to its equivalent string representation.

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

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

- ## Constructor Details

  - ### CellProperties

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

- ## Method Details

  - ### clone

    public CellProperties clone()
    Creates a new object that is a deep copy of the current instance.
    Overrides:
      `clone` in class `Object`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

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

  - ### getVerticalAlignment

    public CellVerticalAlignment getVerticalAlignment()
    Specifies how to vertically align a line that is less than 100% of its height within the columned area.
    Returns:
      the vertical alignment

  - ### setVerticalAlignment

    public void setVerticalAlignment​(CellVerticalAlignment verticalAlignment)
    Specifies how to vertically align a line that is less than 100% of its height within the columned area.
    Parameters:
      `verticalAlignment` - the new vertical alignment

  - ### getBackgroundColor

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

  - ### setBackgroundColor

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

  - ### getBorder

    public Border getBorder()
    Gets the border for cell.
    Returns:
      the border

  - ### setBorder

    public void setBorder​(Border border)
    Sets the border for cell.
    Parameters:
      `border` - the new border

  - ### getLeftBorder

    public Border getLeftBorder()
    Gets the left border for cell.
    Returns:
      the left border

  - ### setLeftBorder

    public void setLeftBorder​(Border leftBorder)
    Sets the left border for cell.
    Parameters:
      `leftBorder` - the new left border

  - ### getRightBorder

    public Border getRightBorder()
    Gets the right border for cell.
    Returns:
      the right border

  - ### setRightBorder

    public void setRightBorder​(Border rightBorder)
    Sets the right border for cell.
    Parameters:
      `rightBorder` - the new right border

  - ### getTopBorder

    public Border getTopBorder()
    Gets the top border for cell.
    Returns:
      the top border

  - ### setTopBorder

    public void setTopBorder​(Border topBorder)
    Sets the top border for cell.
    Parameters:
      `topBorder` - the new top border

  - ### getBottomBorder

    public Border getBottomBorder()
    Gets the bottom border for cell.
    Returns:
      the bottom border

  - ### setBottomBorder

    public void setBottomBorder​(Border bottomBorder)
    Sets the bottom border for cell.
    Parameters:
      `bottomBorder` - the new bottom border

  - ### getBorderLineWidth

    public BorderLineWidth getBorderLineWidth()
    Gets the widths of borders.
    Returns:
      the border line width

  - ### setBorderLineWidth

    public void setBorderLineWidth​(BorderLineWidth borderLineWidth)
    Sets the widths of borders.
    Parameters:
      `borderLineWidth` - the new border line width

  - ### getLeftBorderLineWidth

    public BorderLineWidth getLeftBorderLineWidth()
    Gets the left widths of borders.
    Returns:
      the left border line width

  - ### setLeftBorderLineWidth

    public void setLeftBorderLineWidth​(BorderLineWidth leftBorderLineWidth)
    Sets the left widths of borders.
    Parameters:
      `leftBorderLineWidth` - the new left border line width

  - ### getRightBorderLineWidth

    public BorderLineWidth getRightBorderLineWidth()
    Gets the right widths of borders.
    Returns:
      the right border line width

  - ### setRightBorderLineWidth

    public void setRightBorderLineWidth​(BorderLineWidth rightBorderLineWidth)
    Sets the right widths of borders.
    Parameters:
      `rightBorderLineWidth` - the new right border line width

  - ### getTopBorderLineWidth

    public BorderLineWidth getTopBorderLineWidth()
    Gets the top widths of borders.
    Returns:
      the top border line width

  - ### setTopBorderLineWidth

    public void setTopBorderLineWidth​(BorderLineWidth topBorderLineWidth)
    Sets the top widths of borders.
    Parameters:
      `topBorderLineWidth` - the new top border line width

  - ### getBottomBorderLineWidth

    public BorderLineWidth getBottomBorderLineWidth()
    Gets the bottom widths of borders.
    Returns:
      the bottom border line width

  - ### setBottomBorderLineWidth

    public void setBottomBorderLineWidth​(BorderLineWidth bottomBorderLineWidth)
    Sets the bottom widths of borders.
    Parameters:
      `bottomBorderLineWidth` - the new bottom border line width

  - ### getPadding

    public Size getPadding()
    Gets the padding.
    Returns:
      the padding

  - ### setPadding

    public void setPadding​(Size padding)
    Sets the padding.
    Parameters:
      `padding` - the new padding

  - ### getLeftPadding

    public Size getLeftPadding()
    Gets the left padding.
    Returns:
      the left padding

  - ### setLeftPadding

    public void setLeftPadding​(Size leftPadding)
    Sets the left padding.
    Parameters:
      `leftPadding` - the new left padding

  - ### getRightPadding

    public Size getRightPadding()
    Gets the right padding.
    Returns:
      the right padding

  - ### setRightPadding

    public void setRightPadding​(Size rightPadding)
    Sets the right padding.
    Parameters:
      `rightPadding` - the new right padding

  - ### getTopPadding

    public Size getTopPadding()
    Gets the top padding.
    Returns:
      the top padding

  - ### setTopPadding

    public void setTopPadding​(Size topPadding)
    Sets the top padding.
    Parameters:
      `topPadding` - the new top padding

  - ### getBottomPadding

    public Size getBottomPadding()
    Gets the bottom padding.
    Returns:
      the bottom padding

  - ### setBottomPadding

    public void setBottomPadding​(Size bottomPadding)
    Sets the bottom padding.
    Parameters:
      `bottomPadding` - the new bottom padding

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

  - ### getTextAlignmentSource

    public TextAlignmentSource getTextAlignmentSource()
    Gets the source of a text-align attribute.
    Returns:
      the text alignment source

  - ### setTextAlignmentSource

    public void setTextAlignmentSource​(TextAlignmentSource textAlignmentSource)
    Sets the source of a text-align attribute.
    Parameters:
      `textAlignmentSource` - the new text alignment source

  - ### getDirection

    public Direction getDirection()
    Gets the direction of characters.
    Returns:
      the direction

  - ### setDirection

    public void setDirection​(Direction direction)
    Sets the direction of characters.
    Parameters:
      `direction` - the new direction

  - ### getVerticalGlyphOrientation

    public VerticalGlyphOrientation getVerticalGlyphOrientation()
    Gets the vertical glyph orientation.
    Returns:
      the vertical glyph orientation

  - ### setVerticalGlyphOrientation

    public void setVerticalGlyphOrientation​(VerticalGlyphOrientation verticalGlyphOrientation)
    Sets the vertical glyph orientation.
    Parameters:
      `verticalGlyphOrientation` - the new vertical glyph orientation

  - ### isShrinkToFit

    public boolean isShrinkToFit()
    Specifies whether content is reduced in size to fit within a cell or drawing object.
    Returns:
      true, if is shrink to fit

  - ### setShrinkToFit

    public void setShrinkToFit​(boolean shrinkToFit)
    Specifies whether content is reduced in size to fit within a cell or drawing object.
    Parameters:
      `shrinkToFit` - the new shrink to fit

  - ### isRepeatContent

    public boolean isRepeatContent()
    Specifies whether text content of a cell is displayed as many times as there is space left in the cell's writing direction.
    Returns:
      true, if is repeat content

  - ### setRepeatContent

    public void setRepeatContent​(boolean repeatContent)
    Specifies whether text content of a cell is displayed as many times as there is space left in the cell's writing direction.
    Parameters:
      `repeatContent` - the new repeat content

  - ### getDecimalPlaces

    public int getDecimalPlaces()
    Gets the maximum number of decimal places that are displayed if numbers are formatted by a data style that has no setting for number of decimal places itself.
    Returns:
      the decimal places

  - ### setDecimalPlaces

    public void setDecimalPlaces​(int decimalPlaces)
    Sets the maximum number of decimal places that are displayed if numbers are formatted by a data style that has no setting for number of decimal places itself.
    Parameters:
      `decimalPlaces` - the new decimal places

  - ### isPrintContent

    public boolean isPrintContent()
    Specifies if content is printed.
    Returns:
      true, if is prints the content

  - ### setPrintContent

    public void setPrintContent​(boolean printContent)
    Specifies if content is printed.
    Parameters:
      `printContent` - the new prints the content

  - ### getCellProtect

    public CellProtectType getCellProtect()
    Specifies how a cell is protected.
    Returns:
      the cell protect

  - ### setCellProtect

    public void setCellProtect​(CellProtectType cellProtect)
    Specifies how a cell is protected.
    Parameters:
      `cellProtect` - the new cell protect

  - ### getRotationAlignment

    public RotationAlignment getRotationAlignment()
    Specifies how the edge of the text in a cell is aligned after a rotation.
    Returns:
      the rotation alignment

  - ### setRotationAlignment

    public void setRotationAlignment​(RotationAlignment rotationAlignment)
    Specifies how the edge of the text in a cell is aligned after a rotation.
    Parameters:
      `rotationAlignment` - the new rotation alignment

  - ### getRotationAngle

    public int getRotationAngle()
    Get the rotation angle of content.
    Returns:
      the rotation angle

  - ### setRotationAngle

    public void setRotationAngle​(int rotationAngle)
    Sets the rotation angle of content.
    Parameters:
      `rotationAngle` - the new rotation angle

  - ### isEnableWrap

    public boolean isEnableWrap()
    If wrapping is disabled, it is implementation defined whether the clipped text is visible or hidden. If the text is hidden consumers may support a scrolling mechanism to access the text.
    Returns:
      true, if is enable wrap

  - ### setEnableWrap

    public void setEnableWrap​(boolean enableWrap)
    If wrapping is disabled, it is implementation defined whether the clipped text is visible or hidden. If the text is hidden consumers may support a scrolling mechanism to access the text.
    Parameters:
      `enableWrap` - the new enable wrap

  - ### getShadow

    public String getShadow()
    Gets the shadow of the cell.
    Returns:
      the shadow

  - ### setShadow

    public void setShadow​(String shadow)
    Sets the shadow of the cell.
    Parameters:
      `shadow` - the new shadow

  - ### getWritingMode

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

  - ### setWritingMode

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

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