Search in sources :

Example 1 with TableStyleConfiguration

use of org.eclipse.nebula.widgets.nattable.extension.builder.configuration.TableStyleConfiguration in project nebula.widgets.nattable by eclipse.

the class NatTableBuilder method setupLayerStacks.

public NatTable setupLayerStacks() {
    IColumnPropertyAccessor<T> columnAccessor = new ColumnAccessor<T>(columns);
    configRegistry = new ConfigRegistry();
    SortedList<T> sortedRows = new SortedList<T>(eventList, null);
    filterList = new FilterList<T>(sortedRows);
    setUpColumnGroupModel();
    setUpColumnCategoriesModel();
    // Body
    bodyLayer = new BodyLayerStack<T>(tableModel, filterList);
    // Column header
    columnHeaderLayer = new ColumnHeaderLayerStack<T>(sortedRows, filterList, tableModel, bodyLayer, columnAccessor, configRegistry);
    // Row header
    rowHeaderLayer = new RowHeaderLayerStack<T>(bodyLayer, tableModel);
    // Corner
    cornerLayer = new CornerLayerStack<T>(columnHeaderLayer, rowHeaderLayer);
    // Grid
    gridLayer = new GridLayer(bodyLayer, columnHeaderLayer, rowHeaderLayer, cornerLayer, false);
    natTable = new NatTable(parent, gridLayer, false);
    natTable.setConfigRegistry(configRegistry);
    natTable.setBackground(tableStyle.tableBgColor);
    // Configuration
    natTable.addConfiguration(new TableStyleConfiguration(tableStyle));
    configureColumnProperties();
    configureSorting();
    configureEditing();
    configureFiltering();
    configureColumnChooser();
    configureCategoriesBasedColumnChooser();
    configureColumnStyleCustomization();
    configureGridLayer();
    configureSelectionStyle();
    configureColumnHeaderRightClickMenu();
    return natTable;
}
Also used : SortedList(ca.odell.glazedlists.SortedList) TableStyleConfiguration(org.eclipse.nebula.widgets.nattable.extension.builder.configuration.TableStyleConfiguration) ConfigRegistry(org.eclipse.nebula.widgets.nattable.config.ConfigRegistry) IConfigRegistry(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry) ColumnAccessor(org.eclipse.nebula.widgets.nattable.extension.builder.util.ColumnAccessor) NatTable(org.eclipse.nebula.widgets.nattable.NatTable) GridLayer(org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer)

Aggregations

SortedList (ca.odell.glazedlists.SortedList)1 NatTable (org.eclipse.nebula.widgets.nattable.NatTable)1 ConfigRegistry (org.eclipse.nebula.widgets.nattable.config.ConfigRegistry)1 IConfigRegistry (org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)1 TableStyleConfiguration (org.eclipse.nebula.widgets.nattable.extension.builder.configuration.TableStyleConfiguration)1 ColumnAccessor (org.eclipse.nebula.widgets.nattable.extension.builder.util.ColumnAccessor)1 GridLayer (org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer)1