本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
});
}
示例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);
}
});
}
示例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();
}
示例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);
}
示例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 );
}
示例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);
}
}
示例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>();
}
}
示例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();
}
};
}
示例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();
}
};
}
示例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();
}
};
}
示例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();
}
};
}
示例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$
}
};
}