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)
FormatEngine
format
in interface FormatEngine
FormatEngine.getFormat(SCell, FormatContext)
public FormatResult format(String format, Object value, FormatContext context, int cellWidth)
FormatEngine
format
in interface FormatEngine
FormatEngine.getLocalizedFormat(String, FormatContext)
protected CellFormat getCellFormat(String formatStr, Locale locale)
public String getLocalizedFormat(String format, FormatContext context)
FormatEngine
getLocalizedFormat
in interface FormatEngine
public String getFormat(SCell cell, FormatContext context)
FormatEngine
SCellStyle.isDirectDataFormat()
if false, the return value will be localizedgetFormat
in interface FormatEngine
FormatEngine.getLocalizedFormat(String, FormatContext)
public String getEditText(SCell cell, FormatContext context)
FormatEngine
getEditText
in interface FormatEngine
public static int getCellWidth256(SCell cell)
@Deprecated public STableStyle getTableStyle(String name)
FormatEngine
getTableStyle
in interface FormatEngine
public STableStyle getTableStyle(SBook book, String name)
FormatEngine
getTableStyle
in interface FormatEngine
public STableStyle getExistTableStyle(SBook book, String name)
FormatEngine
getExistTableStyle
in interface FormatEngine
Copyright © 2020. All rights reserved.