當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。