public class XSSFCellAlignment
extends java.lang.Object
Constructor and Description |
---|
XSSFCellAlignment(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCellAlignment cellAlignment)
Creates a Cell Alignment from the supplied XML definition
|
Modifier and Type | Method and Description |
---|---|
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCellAlignment |
getCTCellAlignment()
Access to low-level data
|
HorizontalAlignment |
getHorizontal()
Get the type of horizontal alignment for the cell
|
long |
getIndent()
Get the number of spaces to indent the text in the cell
|
ReadingOrder |
getReadingOrder()
Get the reading order for the cell
|
boolean |
getShrinkToFit() |
long |
getTextRotation()
Get the degree of rotation for the text in the cell
|
VerticalAlignment |
getVertical()
Get the type of vertical alignment for the cell
|
boolean |
getWrapText()
Whether the text should be wrapped
|
void |
setHorizontal(HorizontalAlignment align)
Set the type of horizontal alignment for the cell
|
void |
setIndent(long indent)
Set the number of spaces to indent the text in the cell
|
void |
setReadingOrder(ReadingOrder order)
Set the type of reading order for the cell
|
void |
setShrinkToFit(boolean shrink) |
void |
setTextRotation(long rotation)
Set the degree of rotation for the text in the cell
|
void |
setVertical(VerticalAlignment align)
Set the type of vertical alignment for the cell
|
void |
setWrapText(boolean wrapped)
Set whether the text should be wrapped
|
public XSSFCellAlignment(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCellAlignment cellAlignment)
cellAlignment
- The low-level XML definition of the cell alignmentpublic VerticalAlignment getVertical()
VerticalAlignment
public void setVertical(VerticalAlignment align)
align
- - the type of alignmentVerticalAlignment
public HorizontalAlignment getHorizontal()
HorizontalAlignment
public void setHorizontal(HorizontalAlignment align)
align
- - the type of alignmentHorizontalAlignment
public void setReadingOrder(ReadingOrder order)
order
- - the type of reading orderReadingOrder
public ReadingOrder getReadingOrder()
ReadingOrder
public long getIndent()
public void setIndent(long indent)
indent
- - number of spacespublic long getTextRotation()
Expressed in degrees. Values range from 0 to 180. The first letter of
the text is considered the center-point of the arc.
For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the
horizon is calculated as:
[degrees below horizon] = 90 - textRotation.
public void setTextRotation(long rotation)
Expressed in degrees. Values range from 0 to 180. The first letter of
the text is considered the center-point of the arc.
For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the
horizon is calculated as:
[degrees below horizon] = 90 - textRotation.
rotation
- - the rotation degrees (between 0 and 180 degrees)public boolean getWrapText()
public void setWrapText(boolean wrapped)
wrapped
- a boolean value indicating if the text in a cell should be line-wrapped within the cell.public boolean getShrinkToFit()
public void setShrinkToFit(boolean shrink)
@Internal public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCellAlignment getCTCellAlignment()
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.