public class FormatEngineImpl extends Object implements FormatEngine
| Constructor and Description |
|---|
FormatEngineImpl() |
| Modifier and Type | Method and Description |
|---|---|
FormatResult |
format(SCell cell,
FormatContext context)
Format the cell by it's format
|
FormatResult |
format(String format,
Object value,
FormatContext context,
int cellWidth)
Format the value
|
protected CellFormat |
getCellFormat(String formatStr,
Locale locale) |
static int |
getCellWidth256(SCell cell) |
static String |
getDateTimeString(double val,
Locale locale) |
String |
getEditText(SCell cell,
FormatContext context)
Get the editText of cell
|
STableStyle |
getExistTableStyle(SBook book,
String name)
Returns TableStyle of the specified name of the specified book if exists;
or return null if not exists.
|
String |
getFormat(SCell cell,
FormatContext context)
Get the format of the cell, if
SCellStyle.isDirectDataFormat() if false, the return value will be localized |
protected String |
getFormulaEditText(SCell cell) |
String |
getLocalizedFormat(String format,
FormatContext context)
Get the localized-format , if the format is global-format, it will be transfer it to localized one (for example, m/d/yyyy will becom yyyy/m/d in zh_TW)
|
STableStyle |
getTableStyle(SBook book,
String name)
Returns TableStyle of the specified name of the specified book.
|
STableStyle |
getTableStyle(String name)
Deprecated.
|
public FormatResult format(SCell cell, FormatContext context)
FormatEngineformat in interface FormatEngineFormatEngine.getFormat(SCell, FormatContext)public FormatResult format(String format, Object value, FormatContext context, int cellWidth)
FormatEngineformat in interface FormatEngineFormatEngine.getLocalizedFormat(String, FormatContext)protected CellFormat getCellFormat(String formatStr, Locale locale)
public String getLocalizedFormat(String format, FormatContext context)
FormatEnginegetLocalizedFormat in interface FormatEnginepublic String getFormat(SCell cell, FormatContext context)
FormatEngineSCellStyle.isDirectDataFormat() if false, the return value will be localizedgetFormat in interface FormatEngineFormatEngine.getLocalizedFormat(String, FormatContext)public String getEditText(SCell cell, FormatContext context)
FormatEnginegetEditText in interface FormatEnginepublic static int getCellWidth256(SCell cell)
@Deprecated public STableStyle getTableStyle(String name)
FormatEnginegetTableStyle in interface FormatEnginepublic STableStyle getTableStyle(SBook book, String name)
FormatEnginegetTableStyle in interface FormatEnginepublic STableStyle getExistTableStyle(SBook book, String name)
FormatEnginegetExistTableStyle in interface FormatEngineCopyright © 2020. All rights reserved.