public interface TableCell
| 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)
Deprecated.
This is misleading: setPercentageValue(10) means 1000 %.
For n %, use setPercentageValue(n/100)
|
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
|
void markRowsSpanned(int n)
n - the number of rowsvoid setBooleanValue(boolean value)
value - true or falsevoid setCellValue(CellValue value)
CellValue object.value - the value as a CellValue object.void setCurrencyValue(float value,
String currency)
value - the value as a floatcurrency - The currency valuevoid setCurrencyValue(int value,
String currency)
value - the value as an intcurrency - The currency valuevoid setCurrencyValue(Number value, String currency)
value - the value as a Numbercurrency - the currency valuevoid setDateValue(Calendar cal)
cal - a Calendar object with the date to be usedvoid setDateValue(Date date)
date - a Date objectvoid setFloatValue(float value)
value - a double object with the value to be usedvoid setFloatValue(int value)
value - a double object with the value to be usedvoid setFloatValue(Number value)
value - a double object with the value to be usedvoid setPercentageValue(float value)
value - a float object with the value to be used@Deprecated void setPercentageValue(int value)
value - an int with the value to be usedvoid setPercentageValue(Number value)
value - a double object with the value to be used.void setStringValue(String value)
Note 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)
value - a double object with the value to be usedvoid setStyle(TableCellStyle style)
style - the stylevoid setTimeValue(long timeInMillis)
timeInMillis - the duration in millisecondsvoid setTimeValue(long years,
long months,
long days,
long hours,
long minutes,
double seconds)
years - number of yearsmonths - number of monthsdays - number of dayshours - number of hoursminutes - number of minutesseconds - number of secondsvoid setNegTimeValue(long years,
long months,
long days,
long hours,
long minutes,
double seconds)
years - number of yearsmonths - number of monthsdays - number of dayshours - number of hoursminutes - number of minutesseconds - number of secondsvoid setTooltip(String tooltipText)
tooltipText - the text of the tooltipvoid setTooltip(String tooltipText, Length width, Length height, boolean visible)
tooltipText - the text of the tooltipwidth - the width of the tooltipheight - the height of the tooltipvisible - if the tooltip should be visible.void setTooltip(Tooltip tooltip)
tooltip - the tooltipvoid setFormula(String formula)
walker.setFloatValue(2.0);
walker.setFormula("1+1");
One can type Shift+Ctrl+F9 to recalculate the right value in LibreOffice.
formula - the formula, without '=' sign.boolean isCovered()
void setCovered()
void setColumnsSpanned(int n)
n - the number of cells to be spannedIllegalArgumentException - if n < 0void markColumnsSpanned(int n)
n - the number of columnsIllegalArgumentException - if n < 0void setRowsSpanned(int n)
throws IOException
n - the number of cells to be spannedIOException - if the cell can't be merged (only when flushing data)IllegalArgumentException - if n < 0void setVoidValue()
void setMatrixFormula(String formula)
formula - the formulavoid setMatrixFormula(String formula, int matrixRowsSpanned, int matrixColumnsSpanned)
formula - the formulamatrixRowsSpanned - the number of rowsmatrixColumnsSpanned - the number of columnsboolean hasValue()
void setText(Text text)
text - the textvoid setCellMerge(int rowMerge,
int columnMerge)
throws IOException
rowMerge - number of rows belowcolumnMerge - number of rows at the rightIOException - if the cell can't be merged (only when flushing data)void setAttribute(String attribute, CharSequence value)
attribute - the attribute namevalue - the valuevoid setDataStyle(DataStyle dataStyle)
dataStyle - the data stylevoid setValidation(Validation validation)
validation - the validationint colIndex()
Copyright © 2016–2021. All rights reserved.