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


Java KeyboardPagingPolicy类代码示例

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


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

示例1: setupTable

import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy; //导入依赖的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));
	
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:27,代码来源:ReplaceRelationshipPopup.java

示例2: CodeListView

import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy; //导入依赖的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);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:25,代码来源:CodeListView.java

示例3: RelatedTermsView

import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy; //导入依赖的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);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:22,代码来源:RelatedTermsView.java

示例4: initialize

import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy; //导入依赖的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);
}
 
开发者ID:burakince,项目名称:open-course-organizer,代码行数:21,代码来源:EventsView.java

示例5: EditDatasourcesViewImpl

import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy; //导入依赖的package包/类
@Inject
public EditDatasourcesViewImpl(final EditDatadourceViewImplUiBinder uiBinder,
                               final EditDatasourceMessages messages,
                               final @Named(DatasourceKeyProvider.NAME) DatasourceKeyProvider keyProvider,
                               final DatasourceCellListResources dsListResources,
                               final DatasourceCell datasourceCell,
                               final @NotNull EditWindowFooter editWindowFooter) {
    this.messages = messages;
    Widget widget = uiBinder.createAndBindUi(this);
    setWidget(widget);

    this.datasourceList = new CellList<>(datasourceCell, dsListResources, keyProvider);
    this.pagerPanel.setIncrementSize(DATASOURCES_LIST_INCREMENT);
    this.pagerPanel.setDisplay(this.datasourceList);

    this.footer = editWindowFooter;

    this.setTitle(messages.editDatasourcesDialogText());
    this.getFooter().add(editWindowFooter);

    this.datasourceList.setEmptyListWidget(new Label(messages.emptyDatasourceList()));
    this.datasourceList.setPageSize(DATASOURCES_LIST_PAGE_SIZE);
    this.datasourceList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
    this.datasourceList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:26,代码来源:EditDatasourcesViewImpl.java

示例6: TermSynonymsView

import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy; //导入依赖的package包/类
public TermSynonymsView(EventBus eventBus, OntoBrowserServiceAsync service) {
	super(eventBus, service);
	this.linkedTermsView = new ControlledVocabularyTermLinksView(service);
			
	SynonymColumn synonymColumn = new SynonymColumn();
	
	synonymColumn.setFieldUpdater(new FieldUpdater<Synonym, String>() {
		@Override
		public void update(int index, Synonym synonym, String value) {
			ControlledVocabularyTerm term = synonym.getControlledVocabularyTerm();
			if(term != null) {
				linkedTermsView.show(term);
			}
		}
	});
	synonymColumn.setCellStyleNames("clickable-text nowrap");
			
	table.addStyleName("gwt-CellTable");
	table.setWidth("100%");
	table.setKeyboardPagingPolicy(KeyboardPagingPolicy.CURRENT_PAGE);
	table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
	table.setSelectionModel(new NoSelectionModel<Synonym>());
	
	table.addColumn(synonymColumn, "Synonym");
	table.addColumn(new TypeColumn(), "Type");
	table.addColumn(new ContextColumn(), "Context");
	table.addColumn(new SourceColumn(), "Source");
	table.addColumn(new ReferenceIdColumn(), "Id");
	table.addColumn(new StatusColumn(), "Status");
	
	panel.add(table);
	
	initWidget(panel);
	addStyleName("padded-border vert-scroll fixed-height");
	
	eventBus.addHandler(ViewTermEvent.TYPE, this);
	eventBus.addHandler(SynonymUpdatedEvent.TYPE, this);
	eventBus.addHandler(SynonymDeletedEvent.TYPE, this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:40,代码来源:TermSynonymsView.java

示例7: setup

import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy; //导入依赖的package包/类
public void setup() {
    // BZ-996917: Use a the gwtboostrap style "row-fluid" to allow display some events in the same row.
    eventTypes.setStyleName(Styles.ROW);

    // Fill panel with available events.
    for (Map.Entry<String, Boolean> e : auditLog.getAuditLogFilter().getAcceptedTypes().entrySet()) {
        eventTypes.add(makeEventTypeCheckBox(e.getKey(),
                                             e.getValue()));
    }

    // Create the GWT Cell Table as events container.
    // BZ-996942: Set custom width and table css style.
    events = new CellTable<>();
    events.setWidth("100%");
    events.addStyleName(Styles.TABLE);

    dlp = new ListDataProvider<AuditLogEntry>() {

        @Override
        public void setList(final List<AuditLogEntry> listToWrap) {
            super.setList(listToWrap);
            cellTablePagination.rebuild(pager);
        }
    };
    dlp.addDataDisplay(events);

    AuditLogEntrySummaryColumn summaryColumn = new AuditLogEntrySummaryColumn(style.auditLogDetailLabel(),
                                                                              style.auditLogDetailValue());
    AuditLogEntryCommentColumn commentColumn = new AuditLogEntryCommentColumn();

    events.addColumn(summaryColumn);
    events.addColumn(commentColumn);

    events.setColumnWidth(summaryColumn,
                          60.0,
                          Unit.PCT);
    events.setColumnWidth(commentColumn,
                          40.0,
                          Unit.PCT);

    //If the current user is not an Administrator include the delete comment column
    if (identity.getRoles().contains(new RoleImpl(AppRoles.ADMIN.getName()))) {

        AuditLogEntryDeleteCommentColumn deleteCommentColumn = new AuditLogEntryDeleteCommentColumn();
        deleteCommentColumn.setFieldUpdater((int index,
                                             AuditLogEntry row,
                                             SafeHtml value) -> {
            row.setDeleted(true);
            dlp.setList(filterDeletedEntries(auditLog));
            dlp.refresh();
        });
        events.addColumn(deleteCommentColumn);
        events.setColumnWidth(commentColumn,
                              35.0,
                              Unit.PCT);
        events.setColumnWidth(deleteCommentColumn,
                              5.0,
                              Unit.PCT);
    }

    events.setEmptyTableWidget(new Label(GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLogNoEntries()));
    events.setKeyboardPagingPolicy(KeyboardPagingPolicy.CHANGE_PAGE);
    events.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
    events.setPageSize(PAGE_SIZE);

    // Configure the simple pager.
    pager.setDisplay(events);
    pager.setPageSize(PAGE_SIZE);

    // Add the table to the container.
    eventsContainer.add(events);
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:73,代码来源:AuditLogViewImpl.java


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