当前位置: 首页>>代码示例>>Java>>正文


Java DefaultColumnHeaderDataLayer类代码示例

本文整理汇总了Java中org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer的典型用法代码示例。如果您正苦于以下问题:Java DefaultColumnHeaderDataLayer类的具体用法?Java DefaultColumnHeaderDataLayer怎么用?Java DefaultColumnHeaderDataLayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultColumnHeaderDataLayer类属于org.eclipse.nebula.widgets.nattable.grid.layer包,在下文中一共展示了DefaultColumnHeaderDataLayer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: GlazedListsColumnHeaderLayerStack

import org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer; //导入依赖的package包/类
public GlazedListsColumnHeaderLayerStack(IDataProvider dataProvider,
        SortedList<T> sortedList,
        IColumnPropertyAccessor<T> columnPropertyAccessor,
        IConfigRegistry configRegistry, DefaultBodyLayerStack bodyLayerStack) {

    this.dataProvider = dataProvider;
    this.dataLayer = new DefaultColumnHeaderDataLayer(dataProvider);
    this.columnHeaderLayer = new ColumnHeaderLayer(this.dataLayer, bodyLayerStack,
            bodyLayerStack.getSelectionLayer());

    SortHeaderLayer<T> sortHeaderLayer = new SortHeaderLayer<T>(
            this.columnHeaderLayer, new GlazedListsSortModel<T>(sortedList,
                    columnPropertyAccessor, configRegistry, this.dataLayer),
            false);

    setUnderlyingLayer(sortHeaderLayer);
}
 
开发者ID:xored,项目名称:q7.quality.mockups,代码行数:18,代码来源:GlazedListsColumnHeaderLayerStack.java

示例2: init

import org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer; //导入依赖的package包/类
/**
 * Initialize.
 *
 * @param bodyDataProvider
 * @param columnHeaderDataProvider
 * @param rowHeaderDataProvider
 * @param cornerDataProvider
 * @param parent
 */
protected void init(IDataProvider bodyDataProvider,
                    IDataProvider columnHeaderDataProvider,
                    IDataProvider rowHeaderDataProvider,
                    IDataProvider cornerDataProvider,
                    Control parent) {
    init(new DataLayer(bodyDataProvider),
         new DefaultColumnHeaderDataLayer(columnHeaderDataProvider),
         new DefaultRowHeaderDataLayer(rowHeaderDataProvider),
         new DataLayer(cornerDataProvider),
         parent);
}
 
开发者ID:arx-deidentifier,项目名称:arx,代码行数:21,代码来源:DataTableGridLayer.java

示例3: SelectionExampleGridLayer

import org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer; //导入依赖的package包/类
public SelectionExampleGridLayer() {
    super(true);
    EventList<RowDataFixture> eventList = GlazedLists.eventList(RowDataListFixture.getList());
    String[] propertyNames = RowDataListFixture.getPropertyNames();
    Map<String, String> propertyToLabelMap = RowDataListFixture.getPropertyToLabelMap();

    IColumnPropertyAccessor<RowDataFixture> columnPropertyAccessor =
            new ReflectiveColumnPropertyAccessor<RowDataFixture>(propertyNames);
    this.bodyDataProvider =
            new ListDataProvider<RowDataFixture>(eventList, columnPropertyAccessor);

    this.bodyDataLayer = new DataLayer(this.bodyDataProvider);
    this.bodyLayer = new SelectionExampleBodyLayerStack(this.bodyDataLayer);

    // Column header
    IDataProvider columnHeaderDataProvider =
            new DefaultColumnHeaderDataProvider(propertyNames, propertyToLabelMap);
    this.columnHeaderDataLayer =
            new DefaultColumnHeaderDataLayer(columnHeaderDataProvider);
    ColumnHeaderLayer columnHeaderLayer =
            new ColumnHeaderLayer(this.columnHeaderDataLayer, this.bodyLayer, this.bodyLayer.getSelectionLayer());

    // Row header
    DefaultRowHeaderDataProvider rowHeaderDataProvider =
            new DefaultRowHeaderDataProvider(this.bodyDataProvider);
    DefaultRowHeaderDataLayer rowHeaderDataLayer =
            new DefaultRowHeaderDataLayer(rowHeaderDataProvider);
    RowHeaderLayer rowHeaderLayer =
            new RowHeaderLayer(rowHeaderDataLayer, this.bodyLayer, this.bodyLayer.getSelectionLayer());

    // Corner
    DefaultCornerDataProvider cornerDataProvider =
            new DefaultCornerDataProvider(columnHeaderDataProvider, rowHeaderDataProvider);
    DataLayer cornerDataLayer =
            new DataLayer(cornerDataProvider);
    CornerLayer cornerLayer =
            new CornerLayer(cornerDataLayer, rowHeaderLayer, columnHeaderLayer);

    // Grid
    setBodyLayer(this.bodyLayer);
    setColumnHeaderLayer(columnHeaderLayer);
    setRowHeaderLayer(rowHeaderLayer);
    setCornerLayer(cornerLayer);
}
 
开发者ID:xored,项目名称:q7.quality.mockups,代码行数:45,代码来源:SelectionExampleGridLayer.java

示例4: FilterRowExampleGridLayer

import org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer; //导入依赖的package包/类
public FilterRowExampleGridLayer(IConfigRegistry configRegistry) {
    super(true);

    // Underlying data source
    EventList<RowDataFixture> eventList = GlazedLists.eventList(RowDataListFixture.getList());
    FilterList<RowDataFixture> filterList = new FilterList<RowDataFixture>(eventList);
    String[] propertyNames = RowDataListFixture.getPropertyNames();
    Map<String, String> propertyToLabelMap = RowDataListFixture.getPropertyToLabelMap();

    // Body layer
    IColumnPropertyAccessor<RowDataFixture> columnPropertyAccessor =
            new ReflectiveColumnPropertyAccessor<RowDataFixture>(propertyNames);
    this.bodyDataProvider =
            new ListDataProvider<RowDataFixture>(filterList, columnPropertyAccessor);
    DataLayer bodyDataLayer =
            new DataLayer(this.bodyDataProvider);
    DefaultBodyLayerStack bodyLayer =
            new DefaultBodyLayerStack(bodyDataLayer);
    ColumnOverrideLabelAccumulator bodyLabelAccumulator =
            new ColumnOverrideLabelAccumulator(bodyDataLayer);
    bodyDataLayer.setConfigLabelAccumulator(bodyLabelAccumulator);

    bodyLabelAccumulator.registerColumnOverrides(
            RowDataListFixture.getColumnIndexOfProperty(RowDataListFixture.PRICING_TYPE_PROP_NAME),
            "PRICING_TYPE_PROP_NAME");

    // Column header layer
    IDataProvider columnHeaderDataProvider =
            new DefaultColumnHeaderDataProvider(propertyNames, propertyToLabelMap);
    DataLayer columnHeaderDataLayer =
            new DefaultColumnHeaderDataLayer(columnHeaderDataProvider);
    ColumnHeaderLayer columnHeaderLayer =
            new ColumnHeaderLayer(columnHeaderDataLayer, bodyLayer, bodyLayer.getSelectionLayer());

    // Note: The column header layer is wrapped in a filter row composite.
    // This plugs in the filter row functionality
    FilterRowHeaderComposite<RowDataFixture> filterRowHeaderLayer =
            new FilterRowHeaderComposite<RowDataFixture>(
                    new DefaultGlazedListsFilterStrategy<RowDataFixture>(filterList, columnPropertyAccessor, configRegistry),
                    columnHeaderLayer, columnHeaderDataProvider, configRegistry);

    ColumnOverrideLabelAccumulator labelAccumulator =
            new ColumnOverrideLabelAccumulator(columnHeaderDataLayer);
    columnHeaderDataLayer.setConfigLabelAccumulator(labelAccumulator);

    // Register labels
    labelAccumulator.registerColumnOverrides(
            RowDataListFixture.getColumnIndexOfProperty(RowDataListFixture.RATING_PROP_NAME),
            "CUSTOM_COMPARATOR_LABEL");

    // Row header layer
    DefaultRowHeaderDataProvider rowHeaderDataProvider =
            new DefaultRowHeaderDataProvider(this.bodyDataProvider);
    DefaultRowHeaderDataLayer rowHeaderDataLayer =
            new DefaultRowHeaderDataLayer(rowHeaderDataProvider);
    RowHeaderLayer rowHeaderLayer =
            new RowHeaderLayer(rowHeaderDataLayer, bodyLayer, bodyLayer.getSelectionLayer());

    // Corner layer
    DefaultCornerDataProvider cornerDataProvider =
            new DefaultCornerDataProvider(columnHeaderDataProvider, rowHeaderDataProvider);
    DataLayer cornerDataLayer =
            new DataLayer(cornerDataProvider);
    CornerLayer cornerLayer =
            new CornerLayer(cornerDataLayer, rowHeaderLayer, filterRowHeaderLayer);

    // Grid
    setBodyLayer(bodyLayer);
    // Note: Set the filter row as the column header
    setColumnHeaderLayer(filterRowHeaderLayer);
    setRowHeaderLayer(rowHeaderLayer);
    setCornerLayer(cornerLayer);
}
 
开发者ID:xored,项目名称:q7.quality.mockups,代码行数:74,代码来源:FilterRowExampleGridLayer.java


注:本文中的org.eclipse.nebula.widgets.nattable.grid.layer.DefaultColumnHeaderDataLayer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。