Class NumberTableCellType<T extends Number>

java.lang.Object
org.tentackle.fx.table.type.AbstractTableCellType<T>
org.tentackle.fx.table.type.NumberTableCellType<T>
Type Parameters:
T - the item type
All Implemented Interfaces:
TableCellType<T>
Direct Known Subclasses:
BMoneyTableCellType

@TableCellTypeService(java.lang.Number.class) public class NumberTableCellType<T extends Number> extends AbstractTableCellType<T>
The Number cell type.
Provided as a fallback to application specific types that don't provide t
Author:
harald
  • Constructor Details

    • NumberTableCellType

      public NumberTableCellType()
      Creates the cell type for Number.
  • Method Details

    • updateItem

      public void updateItem(FxTableCell<?,T> tableCell, T item)
      Description copied from interface: TableCellType
      Updates the table cells view.
      Parameters:
      tableCell - the table cell, never null
      item - the item for the cell, never null
    • updateItem

      public void updateItem(FxTreeTableCell<?,T> treeTableCell, T item)
      Description copied from interface: TableCellType
      Updates the treetable cells view.
      Parameters:
      treeTableCell - the table cell, never null
      item - the item for the cell, never null
    • getFormat

      protected DecimalFormat getFormat(TableColumnConfiguration<?,T> config, T item)
      Gets the number format.
      Parameters:
      config - the column configuration
      item - the number
      Returns:
      the format, null if default toString()