Class TableInitializer


  • public class TableInitializer
    extends java.lang.Object
    Initializes table cell renderers and editors.
    • Constructor Summary

      Constructors 
      Constructor Description
      TableInitializer​(java.util.Map<java.lang.Class<?>,​javax.swing.table.TableCellRenderer> tableCellRenderers, java.util.Map<java.lang.Class<?>,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> tableCellEditors, java.util.Map<java.lang.String,​javax.swing.table.TableCellRenderer> columnRenderers, java.util.Map<java.lang.String,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> columnEditors)  
      TableInitializer​(java.util.Map<java.lang.Class<?>,​javax.swing.table.TableCellRenderer> tableCellRenderers, java.util.Map<java.lang.Class<?>,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> tableCellEditors, java.util.Map<java.lang.String,​javax.swing.table.TableCellRenderer> columnRenderers, java.util.Map<java.lang.String,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> columnEditors, java.util.function.BiFunction<javax.swing.JTable,​ColumnConfiguration,​ColumnWidthCalculator> columnWidthCalculatorBuilder)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void applyDefaultEditor​(javax.swing.JTable table, java.lang.Class<?> columnClass)  
      protected void applyDefaultEditors​(javax.swing.JTable table)  
      protected javax.swing.table.TableCellEditor getColumnEditor​(java.lang.Object columnId)  
      protected javax.swing.table.TableCellRenderer getColumnRenderer​(java.lang.Object columnId)  
      <B,​M extends BeanTableModel<B>,​T extends DecoratedTable<B,​M>>
      T
      initialize​(T table)  
      protected void initializeColumn​(javax.swing.table.TableColumn column)  
      static void setFixedWidth​(javax.swing.table.TableColumn column, int width)
      Set the minimum, preferred and maximum widths on a column.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNDO_CHANGE_ACTION_KEY

        public static final java.lang.String UNDO_CHANGE_ACTION_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • TableInitializer

        public TableInitializer​(java.util.Map<java.lang.Class<?>,​javax.swing.table.TableCellRenderer> tableCellRenderers,
                                java.util.Map<java.lang.Class<?>,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> tableCellEditors,
                                java.util.Map<java.lang.String,​javax.swing.table.TableCellRenderer> columnRenderers,
                                java.util.Map<java.lang.String,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> columnEditors)
      • TableInitializer

        public TableInitializer​(java.util.Map<java.lang.Class<?>,​javax.swing.table.TableCellRenderer> tableCellRenderers,
                                java.util.Map<java.lang.Class<?>,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> tableCellEditors,
                                java.util.Map<java.lang.String,​javax.swing.table.TableCellRenderer> columnRenderers,
                                java.util.Map<java.lang.String,​java.util.function.Supplier<javax.swing.table.TableCellEditor>> columnEditors,
                                java.util.function.BiFunction<javax.swing.JTable,​ColumnConfiguration,​ColumnWidthCalculator> columnWidthCalculatorBuilder)
    • Method Detail

      • applyDefaultEditors

        protected void applyDefaultEditors​(javax.swing.JTable table)
      • applyDefaultEditor

        protected void applyDefaultEditor​(javax.swing.JTable table,
                                          java.lang.Class<?> columnClass)
      • initializeColumn

        protected void initializeColumn​(javax.swing.table.TableColumn column)
      • getColumnRenderer

        protected javax.swing.table.TableCellRenderer getColumnRenderer​(java.lang.Object columnId)
      • getColumnEditor

        protected javax.swing.table.TableCellEditor getColumnEditor​(java.lang.Object columnId)
      • setFixedWidth

        public static void setFixedWidth​(javax.swing.table.TableColumn column,
                                         int width)
        Set the minimum, preferred and maximum widths on a column.
        Parameters:
        column - the table column
        width - the width for the column