public class CellImpl extends Object implements Cell
Cell class is a child of RowImpl
In order to customize the cell style of each cell, a cell has
the same methods that CellStyle. More formally, Cell
inherits from AbstractCellStyle.
| Constructor and Description |
|---|
CellImpl(RowImpl row,
Integer col) |
CellImpl(RowImpl row,
String col) |
| Modifier and Type | Method and Description |
|---|---|
T |
align(org.apache.poi.ss.usermodel.HorizontalAlignment align)
Sets the align and return the current instance.
|
protected CellStyle |
asCellStyle() |
T |
backgroundColor(ColorKey color)
Sets the background color and return the current instance.
|
T |
borderBottom(BorderKey borderBottom)
Sets the border bottom and return the current instance.
|
T |
borderLeft(BorderKey borderLeft)
Sets the border left and return the current instance.
|
T |
borderRight(BorderKey borderRight)
Sets the border right and return the current instance.
|
T |
borders(BorderKey border)
Sets the borders and return the current instance.
|
T |
borders(BorderKey border,
BorderKey border2)
Sets the borders and return the current instance.
|
T |
borders(BorderKey border,
BorderKey border2,
BorderKey border3)
Sets the borders and return the current instance.
|
T |
borders(BorderKey border,
BorderKey border2,
BorderKey border3,
BorderKey border4)
Sets the borders and return the current instance.
|
T |
borderTop(BorderKey borderTop)
Sets the border top and return the current instance.
|
Cell |
cellStyle(CellStyleKey cellStyle)
Sets the style.
|
boolean |
equals(Object o) |
T |
font(FontKey font)
Sets the font and return the current instance.
|
T |
format(FormatKey format)
Sets the format and return the current instance.
|
CellAddress |
getAddress()
Gets address.
|
org.apache.poi.ss.usermodel.HorizontalAlignment |
getAlign()
Gets align.
|
ColorKey |
getBackgroundColor()
Gets background color.
|
BorderKey |
getBorderBottom()
Gets border bottom.
|
BorderKey |
getBorderLeft()
Gets border left.
|
BorderKey |
getBorderRight()
Gets border right.
|
BorderKey |
getBorderTop()
Gets border top.
|
CellStyleKey |
getCellStyle()
Gets cell style.
|
FontKey |
getFont()
Gets font.
|
FormatKey |
getFormat()
Gets format.
|
CellAddress |
getHyperlink()
Gets hyperlink.
|
Integer |
getIndex()
Gets index.
|
org.apache.poi.ss.usermodel.CellType |
getType()
Gets type.
|
Object |
getValue()
Gets value.
|
org.apache.poi.ss.usermodel.VerticalAlignment |
getVerticalAlign()
Gets vertical align.
|
int |
hashCode() |
Cell |
hyperlink(CellAddressImpl hyperlink)
Sets an internal link to the indicated cell.
|
Cell |
hyperlink(String hyperlink)
Sets an internal link to the indicated cell.
|
protected boolean |
isSpecificStyleNull() |
Cell |
merge(int numCells)
Merges the indicated number of
Cells. |
Cell |
nextCell()
Returns the next sibling
Cell. |
Row |
nextRow()
Returns the next sibling
RowImpl. |
Row |
parentRow()
Returns the
RowImpl where the Cell is located. |
Sheet |
parentSheet()
Returns the
SheetImpl where the Cell is located. |
Cell |
prevCell()
Returns the previous sibling
Cell. |
Row |
prevRow()
Returns the previous sibling
RowImpl. |
void |
setAddress(CellAddress address) |
void |
setAlign(org.apache.poi.ss.usermodel.HorizontalAlignment align)
Sets align.
|
void |
setBackgroundColor(ColorKey backgroundColor)
Sets background color.
|
void |
setBorderBottom(BorderKey borderBottom)
Sets border bottom.
|
void |
setBorderLeft(BorderKey borderLeft)
Sets border left.
|
void |
setBorderRight(BorderKey borderRight)
Sets border right.
|
void |
setBorderTop(BorderKey borderTop)
Sets border top.
|
void |
setCellStyle(CellStyleKey cellStyle)
Sets cell style.
|
void |
setFont(FontKey font)
Sets font.
|
void |
setFormat(FormatKey format)
Sets format.
|
void |
setHyperlink(CellAddressImpl hyperlink)
Sets hyperlink.
|
void |
setIndex(Integer index)
Sets index.
|
void |
setInstance(T instance)
Sets instance.
|
void |
setType(org.apache.poi.ss.usermodel.CellType type)
Sets type.
|
void |
setValue(Object value)
Sets value.
|
void |
setVerticalAlign(org.apache.poi.ss.usermodel.VerticalAlignment verticalAlign)
Sets vertical align.
|
String |
toString() |
Cell |
value(Object value)
Sets the content of the cell.
|
T |
verticalAlign(org.apache.poi.ss.usermodel.VerticalAlignment verticalAlign)
Sets the vertical align and return the current instance.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitalign, backgroundColor, borderBottom, borderLeft, borderRight, borders, borders, borders, borders, borderTop, font, format, getAlign, getBackgroundColor, getBorderBottom, getBorderLeft, getBorderRight, getBorderTop, getFont, getFormat, getVerticalAlign, setAlign, setBackgroundColor, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setFont, setFormat, setInstance, setVerticalAlign, verticalAlignpublic Integer getIndex()
IntegerIndexgetIndex in interface IntegerIndexpublic CellAddress getAddress()
CellgetAddress in interface Cellpublic org.apache.poi.ss.usermodel.CellType getType()
Cellpublic CellStyleKey getCellStyle()
CellgetCellStyle in interface Cellpublic CellAddress getHyperlink()
CellgetHyperlink in interface Cellpublic void setType(org.apache.poi.ss.usermodel.CellType type)
Cellpublic void setCellStyle(CellStyleKey cellStyle)
CellsetCellStyle in interface CellcellStyle - the cell stylepublic void setHyperlink(CellAddressImpl hyperlink)
CellsetHyperlink in interface Cellhyperlink - the hyperlinkpublic void setAddress(CellAddress address)
public Cell cellStyle(CellStyleKey cellStyle)
NOTE: Before use this method, you must declare and create the
styles through SpreadsheetDecoration class.
public Cell value(Object value)
Has a smart class selector. You can pass a String,
Number or Date object and it selects the proper
POI value type.
public Cell hyperlink(CellAddressImpl hyperlink)
hyperlink in interface Cellhyperlink - to the CellAddressImpl.public Sheet parentSheet()
SheetImpl where the Cell is located.parentSheet in interface CellSheetImpl where the Cell is located.public Cell nextCell()
Cell.public Cell prevCell()
Cell.prevCell in interface CellCell.IllegalStateException - (optional) if you try get
the previous Cell when you are located
at the first Cell of the RowImpl.public Cell merge(int numCells)
Cells.
NOTE: the merged cells are located at the parent row of the current cell instance.
public boolean equals(Object o)
public int hashCode()
protected CellStyle asCellStyle()
protected boolean isSpecificStyleNull()
public T backgroundColor(ColorKey color)
StyleablebackgroundColor in interface Styleable<T extends Styleable>color - the colorpublic T font(FontKey font)
Styleablepublic T align(org.apache.poi.ss.usermodel.HorizontalAlignment align)
Styleablepublic T verticalAlign(org.apache.poi.ss.usermodel.VerticalAlignment verticalAlign)
StyleableverticalAlign in interface Styleable<T extends Styleable>verticalAlign - the vertical alignpublic T format(FormatKey format)
Styleablepublic T borderTop(BorderKey borderTop)
Styleablepublic T borderRight(BorderKey borderRight)
StyleableborderRight in interface Styleable<T extends Styleable>borderRight - the border rightpublic T borderBottom(BorderKey borderBottom)
StyleableborderBottom in interface Styleable<T extends Styleable>borderBottom - the border bottompublic T borderLeft(BorderKey borderLeft)
StyleableborderLeft in interface Styleable<T extends Styleable>borderLeft - the border leftpublic T borders(BorderKey border)
Styleablepublic T borders(BorderKey border, BorderKey border2)
Styleablepublic T borders(BorderKey border, BorderKey border2, BorderKey border3)
Styleablepublic T borders(BorderKey border, BorderKey border2, BorderKey border3, BorderKey border4)
Styleablepublic ColorKey getBackgroundColor()
StyleablegetBackgroundColor in interface Styleable<T extends Styleable>public org.apache.poi.ss.usermodel.HorizontalAlignment getAlign()
Styleablepublic org.apache.poi.ss.usermodel.VerticalAlignment getVerticalAlign()
StyleablegetVerticalAlign in interface Styleable<T extends Styleable>public BorderKey getBorderTop()
StyleablegetBorderTop in interface Styleable<T extends Styleable>public BorderKey getBorderRight()
StyleablegetBorderRight in interface Styleable<T extends Styleable>public BorderKey getBorderBottom()
StyleablegetBorderBottom in interface Styleable<T extends Styleable>public BorderKey getBorderLeft()
StyleablegetBorderLeft in interface Styleable<T extends Styleable>public void setInstance(T instance)
StyleablesetInstance in interface Styleable<T extends Styleable>instance - the instancepublic void setBackgroundColor(ColorKey backgroundColor)
StyleablesetBackgroundColor in interface Styleable<T extends Styleable>backgroundColor - the background colorpublic void setAlign(org.apache.poi.ss.usermodel.HorizontalAlignment align)
Styleablepublic void setVerticalAlign(org.apache.poi.ss.usermodel.VerticalAlignment verticalAlign)
StyleablesetVerticalAlign in interface Styleable<T extends Styleable>verticalAlign - the vertical alignpublic void setFormat(FormatKey format)
Styleablepublic void setBorderTop(BorderKey borderTop)
StyleablesetBorderTop in interface Styleable<T extends Styleable>borderTop - the border toppublic void setBorderRight(BorderKey borderRight)
StyleablesetBorderRight in interface Styleable<T extends Styleable>borderRight - the border rightpublic void setBorderBottom(BorderKey borderBottom)
StyleablesetBorderBottom in interface Styleable<T extends Styleable>borderBottom - the border bottompublic void setBorderLeft(BorderKey borderLeft)
StyleablesetBorderLeft in interface Styleable<T extends Styleable>borderLeft - the border leftCopyright © 2018. All rights reserved.