Package io.keikai.model.impl.sys
Class FormatEngineImpl
- java.lang.Object
-
- io.keikai.model.impl.sys.FormatEngineImpl
-
- All Implemented Interfaces:
FormatEngine
- Direct Known Subclasses:
FormatEngineEx
public class FormatEngineImpl extends Object implements FormatEngine
- Since:
- 3.5.0
- Author:
- Hawk
-
-
Constructor Summary
Constructors Constructor Description FormatEngineImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatResultformat(SCell cell, FormatContext context)Format the cell by it's formatFormatResultformat(String format, Object value, FormatContext context, int cellWidth)Format the valueprotected CellFormatgetCellFormat(String formatStr, Locale locale)static intgetCellWidth256(SCell cell)static StringgetDateTimeString(double val, Locale locale)StringgetEditText(SCell cell, FormatContext context)Get the editText of cellSTableStylegetExistTableStyle(SBook book, String name)Returns TableStyle of the specified name of the specified book if exists; or return null if not exists.StringgetFormat(SCell cell, FormatContext context)Get the format of the cell, ifSCellStyle.isDirectDataFormat()if false, the return value will be localizedprotected StringgetFormulaEditText(SCell cell)StringgetLocalizedFormat(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)STableStylegetTableStyle(SBook book, String name)Returns TableStyle of the specified name of the specified book.
-
-
-
Method Detail
-
format
public FormatResult format(SCell cell, FormatContext context)
Description copied from interface:FormatEngineFormat the cell by it's format- Specified by:
formatin interfaceFormatEngine- See Also:
FormatEngine.getFormat(SCell, FormatContext)
-
format
public FormatResult format(String format, Object value, FormatContext context, int cellWidth)
Description copied from interface:FormatEngineFormat the value- Specified by:
formatin interfaceFormatEngine- See Also:
FormatEngine.getLocalizedFormat(String, FormatContext)
-
getCellFormat
protected CellFormat getCellFormat(String formatStr, Locale locale)
-
getLocalizedFormat
public String getLocalizedFormat(String format, FormatContext context)
Description copied from interface:FormatEngineGet 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)- Specified by:
getLocalizedFormatin interfaceFormatEngine
-
getFormat
public String getFormat(SCell cell, FormatContext context)
Description copied from interface:FormatEngineGet the format of the cell, ifSCellStyle.isDirectDataFormat()if false, the return value will be localized- Specified by:
getFormatin interfaceFormatEngine- See Also:
FormatEngine.getLocalizedFormat(String, FormatContext)
-
getEditText
public String getEditText(SCell cell, FormatContext context)
Description copied from interface:FormatEngineGet the editText of cell- Specified by:
getEditTextin interfaceFormatEngine
-
getCellWidth256
public static int getCellWidth256(SCell cell)
-
getTableStyle
public STableStyle getTableStyle(SBook book, String name)
Description copied from interface:FormatEngineReturns TableStyle of the specified name of the specified book.- Specified by:
getTableStylein interfaceFormatEngine- Returns:
-
getExistTableStyle
public STableStyle getExistTableStyle(SBook book, String name)
Description copied from interface:FormatEngineReturns TableStyle of the specified name of the specified book if exists; or return null if not exists.- Specified by:
getExistTableStylein interfaceFormatEngine- Returns:
-
-