本文整理汇总了Java中com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy类的典型用法代码示例。如果您正苦于以下问题:Java KeyboardSelectionPolicy类的具体用法?Java KeyboardSelectionPolicy怎么用?Java KeyboardSelectionPolicy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
KeyboardSelectionPolicy类属于com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy包,在下文中一共展示了KeyboardSelectionPolicy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupTable
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected void setupTable() {
table.setWidth("100%");
table.addStyleName("gwt-CellTable");
table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
table.setSelectionModel(new NoSelectionModel<CuratorAction>(keyProvider));
table.addColumn(new ActionDateColumn(), "Date");
table.addColumn(new CuratorColumn(), "Curator");
table.addColumn(new ActionColumn(), "Action");
table.addColumn(new EntityColumn(), "Entity");
table.addColumn(new OntologyColumn(), "Ontology/Codelist");
table.addColumn(new TermColumn(), "Term");
table.addColumn(new EntityValueColumn(), "Relationship/Synonym");
table.addColumn(new CommentsColumn(), "Comments");
ListHandler<CuratorAction> sortHandler = new ListHandler<CuratorAction>(dataProvider.getList());
for(int i = 0; i < table.getColumnCount(); i++) {
Column<CuratorAction, ?> column = table.getColumn(i);
if(column.isSortable() && column instanceof Comparator<?>) {
sortHandler.setComparator(column, (Comparator<CuratorAction>)column);
}
}
table.addColumnSortHandler(sortHandler);
table.getColumnSortList().push(table.getColumn(0));
}
示例2: setupTable
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void setupTable() {
Column<Relationship, Boolean> checkColumn = new Column<Relationship, Boolean>(
new CheckboxCell(true, false)) {
@Override
public Boolean getValue(Relationship object) {
return selection.isSelected(object);
}
};
table.addStyleName("gwt-CellTable");
table.addStyleName("decorator-panel");
table.setWidth("100%");
table.setKeyboardPagingPolicy(KeyboardPagingPolicy.CURRENT_PAGE);
table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
table.addColumn(checkColumn);
table.setColumnWidth(checkColumn, 16, Unit.PX);
table.addColumn(new RelationshipColumn(), "Relationship");
table.addColumn(new RelatedTermColumn(), "Related Term");
table.addColumn(new StatusColumn(), "Status");
table.setSelectionModel(selection,
DefaultSelectionEventManager.<Relationship>createCheckboxManager(0));
}
示例3: CodeListView
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
public CodeListView(EventBus eventBus, OntoBrowserServiceAsync service) {
super(eventBus,service);
Image emptyListWidget = new Image(ImageResources.INSTANCE.spinner());
emptyListWidget.setStyleName("float-right");
list.setEmptyListWidget(emptyListWidget);
list.setKeyboardPagingPolicy(KeyboardPagingPolicy.CURRENT_PAGE);
list.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
list.setSelectionModel(selection);
selection.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
Term selected = selection.getSelectedObject();
if(selected != null) {
History.newItem(selected.getReferenceId());
}
}
});
codelistContainer.add(list);
initWidget(codelistContainer);
addStyleName("padded-border vert-scroll");
eventBus.addHandler(ViewTermEvent.TYPE, this);
}
示例4: RelatedTermsView
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
public RelatedTermsView(EventBus eventBus, OntoBrowserServiceAsync service) {
super(eventBus, service);
table.addStyleName("gwt-CellTable");
table.setWidth("100%");
table.setKeyboardPagingPolicy(KeyboardPagingPolicy.CURRENT_PAGE);
table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
table.setSelectionModel(new NoSelectionModel<Relationship>());
table.addColumn(new RelationshipColumn(), "Relationship");
table.addColumn(new RelatedTermColumn(), "Related Term");
table.addColumn(new StatusColumn(), "Status");
panel.add(table);
initWidget(panel);
addStyleName("padded-border vert-scroll fixed-height");
eventBus.addHandler(ViewTermEvent.TYPE, this);
eventBus.addHandler(RelationshipUpdatedEvent.TYPE, this);
eventBus.addHandler(RelationshipDeletedEvent.TYPE, this);
}
示例5: ListView
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
public ListView(final ListPresenter<LISTITEM> presenter, Cell<LISTITEM> itemDisplayCell) {
this.presenter = presenter;
this.cellList = new CellList<LISTITEM>(itemDisplayCell);
cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
// Add a selection model to handle user selection.
final SingleSelectionModel<LISTITEM> selectionModel = new SingleSelectionModel<LISTITEM>();
cellList.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
LISTITEM selected = selectionModel.getSelectedObject();
if (selected != null) {
presenter.onSelectionChanged(event, selectionModel);
}
}
});
this.pagerTop = new SimplePager();
this.pagerTop.setDisplay(this.cellList);
this.pagerBottom = new SimplePager();
this.pagerBottom.setDisplay(this.cellList);
initWidget((Widget)uiBinder.createAndBindUi(this));
}
示例6: initialize
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialize() {
Resources resources = GWT.create(Resources.class);
EventCell eventCell = new EventCell(resources.tux());
cellList = new CellList<EventProxy>(eventCell);
cellList.setPageSize(10);
cellList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION);
final SingleSelectionModel<EventProxy> selectionModel = new SingleSelectionModel<EventProxy>();
cellList.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
presenter.goEventDetailView(selectionModel.getSelectedObject().getId());
}
});
eventPagerPanel.setDisplay(cellList);
}
示例7: initialiseAvailableTypes
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseAvailableTypes() {
availableTypesContainer.add(availableTypesWidget);
availableTypesWidget.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
availableTypesWidget.setMinimumWidth(270);
final Label lstEmpty = new Label(GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailablePatterns());
lstEmpty.setStyleName(WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem());
availableTypesWidget.setEmptyListWidget(lstEmpty);
final MultiSelectionModel<String> selectionModel = new MultiSelectionModel<String>();
availableTypesWidget.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(final SelectionChangeEvent event) {
availableTypesSelections = selectionModel.getSelectedSet();
btnAdd.setEnabled(availableTypesSelections.size() > 0);
}
});
}
示例8: initialiseAvailableFactTypes
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseAvailableFactTypes() {
availableFactTypesContainer.add( availableFactTypesWidget );
availableFactTypesWidget.setKeyboardSelectionPolicy( KeyboardSelectionPolicy.ENABLED );
availableFactTypesWidget.setMinimumWidth( 130 );
final Label lstEmpty = new Label( GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailablePatterns() );
lstEmpty.setStyleName( WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem() );
availableFactTypesWidget.setEmptyListWidget( lstEmpty );
final MultiSelectionModel<String> selectionModel = new MultiSelectionModel<String>();
availableFactTypesWidget.setSelectionModel( selectionModel );
selectionModel.addSelectionChangeHandler( new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange( final SelectionChangeEvent event ) {
availableFactTypesSelections = selectionModel.getSelectedSet();
btnAddFactTypes.setEnabled( availableFactTypesSelections.size() > 0 );
}
} );
}
示例9: initialiseAvailableFields
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseAvailableFields() {
availableFieldsContainer.add( availableFieldsWidget );
availableFieldsWidget.setKeyboardSelectionPolicy( KeyboardSelectionPolicy.ENABLED );
availableFieldsWidget.setMinimumWidth( 130 );
final Label lstEmpty = new Label( GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailableFields() );
lstEmpty.setStyleName( WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem() );
availableFieldsWidget.setEmptyListWidget( lstEmpty );
final MultiSelectionModel<AvailableField> selectionModel = new MultiSelectionModel<AvailableField>();
availableFieldsWidget.setSelectionModel( selectionModel );
selectionModel.addSelectionChangeHandler( new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange( final SelectionChangeEvent event ) {
availableFieldsSelections = selectionModel.getSelectedSet();
btnAdd.setEnabled( availableFieldsSelections.size() > 0 );
}
} );
}
示例10: initialiseAvailablePatterns
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseAvailablePatterns() {
availablePatternsContainer.add(availablePatternsWidget);
availablePatternsWidget.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
availablePatternsWidget.setMinimumWidth(170);
final Label lstEmpty = new Label(GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailablePatterns());
lstEmpty.setStyleName(WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem());
availablePatternsWidget.setEmptyListWidget(lstEmpty);
final SingleSelectionModel<Pattern52> selectionModel = new SingleSelectionModel<Pattern52>();
availablePatternsWidget.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(final SelectionChangeEvent event) {
availablePatternsSelection = selectionModel.getSelectedObject();
presenter.selectPattern(availablePatternsSelection);
}
});
}
示例11: initialiseAvailableFields
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseAvailableFields() {
availableFieldsContainer.add(availableFieldsWidget);
availableFieldsWidget.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
availableFieldsWidget.setMinimumWidth(170);
final Label lstEmpty = new Label(GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailableFields());
lstEmpty.setStyleName(WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem());
availableFieldsWidget.setEmptyListWidget(lstEmpty);
final MultiSelectionModel<AvailableField> selectionModel = new MultiSelectionModel<AvailableField>();
availableFieldsWidget.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(final SelectionChangeEvent event) {
availableFieldsSelections = selectionModel.getSelectedSet();
btnAdd.setEnabled(availableFieldsSelections.size() > 0);
}
});
}
示例12: initialiseAvailableColumns
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseAvailableColumns() {
availableColumnsContainer.add( availableColumnsWidget );
availableColumnsWidget.setKeyboardSelectionPolicy( KeyboardSelectionPolicy.ENABLED );
availableColumnsWidget.setMinimumWidth( 270 );
final Label lstEmpty = new Label( GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailableColumns() );
lstEmpty.setStyleName( WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem() );
availableColumnsWidget.setEmptyListWidget( lstEmpty );
availableColumnsWidget.setSelectionModel( availableSelectionModel );
availableSelectionModel.addSelectionChangeHandler( new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange( final SelectionChangeEvent event ) {
availableColumnsSelections = availableSelectionModel.getSelectedSet();
btnAdd.setEnabled( availableColumnsSelections.size() > 0 );
}
} );
}
示例13: initialiseChosenColumns
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseChosenColumns() {
chosenColumnsContainer.add( chosenColumnsWidget );
chosenColumnsWidget.setKeyboardSelectionPolicy( KeyboardSelectionPolicy.ENABLED );
chosenColumnsWidget.setMinimumWidth( 270 );
final Label lstEmpty = new Label( GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoChosenColumns() );
lstEmpty.setStyleName( WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem() );
chosenColumnsWidget.setEmptyListWidget( lstEmpty );
chosenColumnsWidget.setSelectionModel( chosenSelectionModel );
chosenSelectionModel.addSelectionChangeHandler( new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange( final SelectionChangeEvent event ) {
chosenColumnsSelections = chosenSelectionModel.getSelectedSet();
btnRemove.setEnabled( chosenColumnsSelections.size() > 0 );
}
} );
}
示例14: initialiseAvailableImports
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseAvailableImports() {
availableImportsContainer.add( availableImportsWidget );
availableImportsWidget.setKeyboardSelectionPolicy( KeyboardSelectionPolicy.ENABLED );
availableImportsWidget.setMinimumWidth( 270 );
final Label lstEmpty = new Label( GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailableImports() );
lstEmpty.setStyleName( WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem() );
availableImportsWidget.setEmptyListWidget( lstEmpty );
availableImportsWidget.setSelectionModel( availableImportsSelectionModel );
availableImportsSelectionModel.addSelectionChangeHandler( new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange( final SelectionChangeEvent event ) {
availableImportsSelections = availableImportsSelectionModel.getSelectedSet();
btnAdd.setEnabled( availableImportsSelections.size() > 0 );
}
} );
}
示例15: initialiseChosenImports
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy; //导入依赖的package包/类
private void initialiseChosenImports() {
chosenImportsContainer.add( chosenImportsWidget );
chosenImportsWidget.setKeyboardSelectionPolicy( KeyboardSelectionPolicy.ENABLED );
chosenImportsWidget.setMinimumWidth( 270 );
final Label lstEmpty = new Label( GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoChosenImports() );
lstEmpty.setStyleName( WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem() );
chosenImportsWidget.setEmptyListWidget( lstEmpty );
chosenImportsWidget.setSelectionModel( chosenImportsSelectionModel );
chosenImportsSelectionModel.addSelectionChangeHandler( new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange( final SelectionChangeEvent event ) {
chosenImportSelections = chosenImportsSelectionModel.getSelectedSet();
btnRemove.setEnabled( chosenImportSelections.size() > 0 );
}
} );
}