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


Java ProvidesKey类代码示例

本文整理汇总了Java中com.google.gwt.view.client.ProvidesKey的典型用法代码示例。如果您正苦于以下问题:Java ProvidesKey类的具体用法?Java ProvidesKey怎么用?Java ProvidesKey使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ProvidesKey类属于com.google.gwt.view.client包,在下文中一共展示了ProvidesKey类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PagedTable

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
public PagedTable(final int pageSize,
                  final ProvidesKey<T> providesKey,
                  final GridGlobalPreferences gridGlobalPreferences,
                  final boolean showPageSizesSelector,
                  final boolean showFFButton,
                  final boolean showLButton) {
    super(providesKey,
          gridGlobalPreferences);
    this.showPageSizesSelector = showPageSizesSelector;
    this.pageSize = pageSize;
    this.dataGrid.setPageStart(0);
    this.dataGrid.setPageSize(pageSize);
    PagedTableHelper.setSelectedValue(pageSizesSelector,
                                      String.valueOf(pageSize));
    this.pager.setDisplay(dataGrid);
    this.pageSizesSelector.setVisible(this.showPageSizesSelector);
    setShowFastFordwardPagerButton(showFFButton);
    setShowLastPagerButton(showLButton);
    createPageSizesListBox(5,
                           20,
                           5);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:PagedTable.java

示例2: UberfirePagedTable

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
public UberfirePagedTable(final int pageSize,
                          final ProvidesKey<T> providesKey,
                          final boolean showPageSizesSelector,
                          final boolean showFFButton,
                          final boolean showLButton) {
    super(providesKey);
    this.showPageSizesSelector = showPageSizesSelector;
    this.pageSize = pageSize;
    this.dataGrid.setPageSize(pageSize);
    PagedTableHelper.setSelectedValue(pageSizesSelector,
                                      String.valueOf(pageSize));
    this.pager.setDisplay(dataGrid);
    this.pageSizesSelector.setVisible(this.showPageSizesSelector);
    setShowFastFordwardPagerButton(showFFButton);
    setShowLastPagerButton(showLButton);
    createPageSizesListBox(5,
                           20,
                           5);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:UberfirePagedTable.java

示例3: AbstractDataTable

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
protected AbstractDataTable(String label) {
    _layout = new VerticalPanel();
    _layout.setStyleName("fill-layout-width"); //$NON-NLS-1$
    _layout.getElement().setAttribute("style", "padding-top:5px;"); //$NON-NLS-1$ //$NON-NLS-2$

    _table = new DefaultCellTable<T>(5);

    ProvidesKey<T> keyProvider = createKeyProvider();

    _selectionModel = createSelectionModel(keyProvider);
    _table.setSelectionModel(_selectionModel);

    _dataProvider = new ListDataProvider<T>(keyProvider);
    _dataProvider.addDataDisplay(_table);

    createColumns(_table, _dataProvider);

    DefaultPager pager = new DefaultPager();
    pager.setDisplay(_table);

    _layout.add(new ContentGroupLabel(label));
    _layout.add(_table);
    _layout.add(pager);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:25,代码来源:AbstractDataTable.java

示例4: MultiValueListBox

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
/**
 * Instantiates a new MultiValueListBox.
 */
public MultiValueListBox(Renderer<T> renderer, ProvidesKey<T> keyProvider) {
  this.keyProvider = keyProvider;
  this.renderer = renderer;
  ListBox listBox = new ListBox();
  listBox.setMultipleSelect(true);
  initWidget(listBox);
  getListBox().addChangeHandler(new ChangeHandler() {
    public void onChange(ChangeEvent event) {
      List<T> newValue = new ArrayList<>();
      for (int i = 0; i < values.size(); i++) {
        if (getListBox().isItemSelected(i)) {
          newValue.add(values.get(i));
        }
      }
      setValue(newValue, true);
    }
  });
}
 
开发者ID:kaaproject,项目名称:kaa,代码行数:22,代码来源:MultiValueListBox.java

示例5: ValueMultiListBox

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
public ValueMultiListBox(Renderer<T> renderer2, ProvidesKey<T> keyProvider2) {
    this.keyProvider = keyProvider2;
    this.renderer = renderer2;
    initWidget(new ListBox(true));
    getListBox().setVisibleItemCount(2);

    getListBox().addChangeHandler(new ChangeHandler() {
        @Override
        public void onChange(ChangeEvent event) {
            ListBox lb = getListBox();
            Collection<T> newValue = new ArrayList<T>();
            for (int i = 0; i < values.size(); i++) {
                if (lb.isItemSelected(i)) {
                    newValue.add(values.get(i));
                }
            }

            setValue(newValue, true);
        }
    });
}
 
开发者ID:salk31,项目名称:RedQueryBuilder,代码行数:22,代码来源:ValueMultiListBox.java

示例6: AbstractDataView

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
public AbstractDataView(String id, ProvidesKey<T> keyProvider) {
    this.id = id;
    this.keyProvider = keyProvider;
    this.categoryFactory = new CategoryComponentFactory();
    this.rowFactory = new RowComponentFactory<>();
    //this.componentFactories = new ArrayList<>();

    setRenderer(new BaseRenderer<>());
    onConstructed();
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:11,代码来源:AbstractDataView.java

示例7: InfiniteDataView

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
public InfiniteDataView(String name, int totalRows, int viewSize, ProvidesKey<T> keyProvider, DataSource<T> dataSource) {
    super(name, keyProvider);
    this.viewSize = viewSize;

    setTotalRows(totalRows);
    setDataSource(dataSource);
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:8,代码来源:InfiniteDataView.java

示例8: PagedTable

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
public PagedTable( final int pageSize,
                   final ProvidesKey<T> providesKey ) {
    dataGrid = new DataGrid<T>( Integer.MAX_VALUE, providesKey );
    setupGridTable();
    this.pageSize = pageSize;
    this.dataGrid.setPageSize( pageSize );
    this.pager.setDisplay( dataGrid );
    this.pager.setPageSize( pageSize );
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:10,代码来源:PagedTable.java

示例9: SimpleTable

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
public SimpleTable(final ProvidesKey<T> providesKey,
                   final GridGlobalPreferences gridGlobalPreferences) {

    super(providesKey);
    if (gridGlobalPreferences != null) {
        this.gridPreferencesStore = new GridPreferencesStore(gridGlobalPreferences);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:9,代码来源:SimpleTable.java

示例10: setupDataGrid

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
protected void setupDataGrid(ProvidesKey<T> providesKey) {
    if (providesKey != null) {
        dataGrid = new DataGrid<T>(providesKey);
    } else {
        dataGrid = new DataGrid<T>();
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:8,代码来源:UberfireSimpleTable.java

示例11: createKeyProvider

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
@Override
protected ProvidesKey<Application> createKeyProvider() {
    return new ProvidesKey<Application>() {
        @Override
        public Object getKey(Application item) {
            return item.getName();
        }
    };

}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:11,代码来源:ApplicationsList.java

示例12: createKeyProvider

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
@Override
protected ProvidesKey<ArtifactReference> createKeyProvider() {
    return new ProvidesKey<ArtifactReference>() {
        @Override
        public Object getKey(ArtifactReference item) {
            return item.key();
        }
    };

}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:11,代码来源:ArtifactReferencesList.java

示例13: createKeyProvider

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
@Override
protected ProvidesKey<Binding> createKeyProvider() {
    return new ProvidesKey<Binding>() {
        @Override
        public Object getKey(Binding item) {
            return item.getType() + ":" + item.getConfiguration();
        }
    };
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:10,代码来源:GatewaysList.java

示例14: createKeyProvider

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
@Override
protected ProvidesKey<Component> createKeyProvider() {
    return new ProvidesKey<Component>() {
        @Override
        public Object getKey(Component item) {
            return item.getName();
        }
    };

}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:11,代码来源:ExtensionsList.java

示例15: createKeyProvider

import com.google.gwt.view.client.ProvidesKey; //导入依赖的package包/类
@Override
protected ProvidesKey<Transformer> createKeyProvider() {
    return new ProvidesKey<Transformer>() {
        @Override
        public Object getKey(Transformer item) {
            return item.getType() + ":" + item.getFrom() + ":" + item.getTo(); //$NON-NLS-1$ //$NON-NLS-2$
        }
    };
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:10,代码来源:TransformersList.java


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