public abstract class AbstractTableCell extends Object implements WritableTableCell
| Constructor and Description |
|---|
AbstractTableCell() |
| Modifier and Type | Method and Description |
|---|---|
int |
colIndex() |
boolean |
hasValue() |
boolean |
isCovered() |
void |
markColumnsSpanned(int n)
Mark the columns a spanned
|
void |
markRowsSpanned(int n)
Marks a number of rows with a span
|
void |
setAttribute(String attribute,
CharSequence value)
Add an attribute to a cell
|
void |
setBooleanValue(boolean value)
Set the boolean value of the cell.
|
void |
setCellMerge(int rowMerge,
int columnMerge)
Merge cells
|
void |
setCellValue(CellValue value)
Set the value for a cell.
|
void |
setColumnsSpanned(int n)
Create a span over cells at the right
|
void |
setCovered()
Set the cell covered flag
|
void |
setCurrencyValue(float value,
String currency)
Set the currency value of the cell.
|
void |
setCurrencyValue(int value,
String currency)
Set the currency value of the cell.
|
void |
setCurrencyValue(Number value,
String currency)
Set the currency value of the cell.
|
void |
setDataStyle(DataStyle dataStyle)
Set a custom data style.
|
void |
setDateValue(Calendar cal)
Set the date value of the cell.
|
void |
setDateValue(Date date)
Set the date value of the cell.
|
void |
setFloatValue(float value)
Set the float value of the cell.
|
void |
setFloatValue(int value)
Set the float value of the cell.
|
void |
setFloatValue(Number value)
Set the float value of the cell.
|
void |
setFormula(String formula)
Sets a formula in an existing cell.
|
void |
setMatrixFormula(String formula)
Set a matrix formula
|
void |
setMatrixFormula(String formula,
int matrixRowsSpanned,
int matrixColumnsSpanned)
Set a matrix formula
|
void |
setNegTimeValue(long years,
long months,
long days,
long hours,
long minutes,
double seconds)
Set the time value of the cell.
|
void |
setPercentageValue(float value)
Set the percentage value of the cell.
|
void |
setPercentageValue(int value)
Set the percentage value of the cell.
|
void |
setPercentageValue(Number value)
Set the percentage value of the cell.
|
void |
setRowsSpanned(int n)
Create a span over cells below
|
void |
setStringValue(String value)
Set the string value for a cell.
|
void |
setStyle(TableCellStyle style)
Set a style for this cell
|
void |
setText(Text text)
Set a text in this cell.
|
void |
setTimeValue(long timeInMillis)
Set the time value of the cell.
|
void |
setTimeValue(long years,
long months,
long days,
long hours,
long minutes,
double seconds)
Set the time value of the cell.
|
void |
setTooltip(String tooltipText)
Add a tooltip to the cell
|
void |
setTooltip(String tooltipText,
Length width,
Length height,
boolean visible)
Add a tooltip to the cell
|
void |
setTooltip(Tooltip tooltip)
Add a tooltip to the cell
|
void |
setValidation(Validation validation)
Set a content validation on this cell
|
void |
setVoidValue()
Set a void value in this cell
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendXMLToTableRowpublic void markRowsSpanned(int n)
TableCellmarkRowsSpanned in interface TableCelln - the number of rowspublic void setBooleanValue(boolean value)
TableCellsetBooleanValue in interface TableCellvalue - true or falsepublic void setCellValue(CellValue value)
TableCellCellValue object.setCellValue in interface TableCellvalue - the value as a CellValue object.public void setCurrencyValue(float value,
String currency)
TableCellsetCurrencyValue in interface TableCellvalue - the value as a floatcurrency - The currency valuepublic void setCurrencyValue(int value,
String currency)
TableCellsetCurrencyValue in interface TableCellvalue - the value as an intcurrency - The currency valuepublic void setCurrencyValue(Number value, String currency)
TableCellsetCurrencyValue in interface TableCellvalue - the value as a Numbercurrency - the currency valuepublic void setDateValue(Calendar cal)
TableCellsetDateValue in interface TableCellcal - a Calendar object with the date to be usedpublic void setDateValue(Date date)
TableCellsetDateValue in interface TableCelldate - a Date objectpublic void setFloatValue(float value)
TableCellsetFloatValue in interface TableCellvalue - a double object with the value to be usedpublic void setFloatValue(int value)
TableCellsetFloatValue in interface TableCellvalue - a double object with the value to be usedpublic void setFloatValue(Number value)
TableCellsetFloatValue in interface TableCellvalue - a double object with the value to be usedpublic void setPercentageValue(float value)
TableCellsetPercentageValue in interface TableCellvalue - a float object with the value to be usedpublic void setPercentageValue(int value)
TableCellsetPercentageValue in interface TableCellvalue - an int with the value to be usedpublic void setPercentageValue(Number value)
TableCellsetPercentageValue in interface TableCellvalue - a double object with the value to be used.public void setStringValue(String value)
TableCellNote that this will not set the data style of the cell to "text" but let it to "standard", hence the quote before numbers in LO. This is the same behavior as LO (see https://github.com/jferard/fastods/issues/148)
setStringValue in interface TableCellvalue - a double object with the value to be usedpublic void setStyle(TableCellStyle style)
TableCellpublic void setTimeValue(long timeInMillis)
TableCellsetTimeValue in interface TableCelltimeInMillis - the duration in millisecondspublic void setTimeValue(long years,
long months,
long days,
long hours,
long minutes,
double seconds)
TableCellsetTimeValue in interface TableCellyears - number of yearsmonths - number of monthsdays - number of dayshours - number of hoursminutes - number of minutesseconds - number of secondspublic void setNegTimeValue(long years,
long months,
long days,
long hours,
long minutes,
double seconds)
TableCellsetNegTimeValue in interface TableCellyears - number of yearsmonths - number of monthsdays - number of dayshours - number of hoursminutes - number of minutesseconds - number of secondspublic void setTooltip(String tooltipText)
TableCellsetTooltip in interface TableCelltooltipText - the text of the tooltippublic void setTooltip(String tooltipText, Length width, Length height, boolean visible)
TableCellsetTooltip in interface TableCelltooltipText - the text of the tooltipwidth - the width of the tooltipheight - the height of the tooltipvisible - if the tooltip should be visible.public void setTooltip(Tooltip tooltip)
TableCellsetTooltip in interface TableCelltooltip - the tooltippublic void setFormula(String formula)
TableCell
walker.setFloatValue(2.0);
walker.setFormula("1+1");
One can type Shift+Ctrl+F9 to recalculate the right value in LibreOffice.
setFormula in interface TableCellformula - the formula, without '=' sign.public boolean isCovered()
public void setCovered()
TableCellsetCovered in interface TableCellpublic void setColumnsSpanned(int n)
TableCellsetColumnsSpanned in interface TableCelln - the number of cells to be spannedpublic void markColumnsSpanned(int n)
TableCellmarkColumnsSpanned in interface TableCelln - the number of columnspublic void setRowsSpanned(int n)
throws IOException
TableCellsetRowsSpanned in interface TableCelln - the number of cells to be spannedIOException - if the cell can't be merged (only when flushing data)public void setVoidValue()
TableCellsetVoidValue in interface TableCellpublic void setMatrixFormula(String formula)
TableCellsetMatrixFormula in interface TableCellformula - the formulapublic void setMatrixFormula(String formula, int matrixRowsSpanned, int matrixColumnsSpanned)
TableCellsetMatrixFormula in interface TableCellformula - the formulamatrixRowsSpanned - the number of rowsmatrixColumnsSpanned - the number of columnspublic boolean hasValue()
public void setText(Text text)
TableCellpublic void setCellMerge(int rowMerge,
int columnMerge)
throws IOException
TableCellsetCellMerge in interface TableCellrowMerge - number of rows belowcolumnMerge - number of rows at the rightIOException - if the cell can't be merged (only when flushing data)public void setDataStyle(DataStyle dataStyle)
TableCellsetDataStyle in interface TableCelldataStyle - the data stylepublic int colIndex()
public void setAttribute(String attribute, CharSequence value)
TableCellsetAttribute in interface TableCellattribute - the attribute namevalue - the valuepublic void setValidation(Validation validation)
TableCellsetValidation in interface TableCellvalidation - the validationCopyright © 2016–2021. All rights reserved.