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


Java SelectionEvent类代码示例

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


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

示例1: onRowClick

import com.vaadin.event.SelectionEvent; //导入依赖的package包/类
protected void onRowClick(final SelectionEvent event) {
    final Set<Object> itemsSelected = event.getSelected();
    if (!itemsSelected.isEmpty()) {
        popualateKeyValue(itemsSelected.iterator().next());
        addIcon.setEnabled(true);
    } else {
        clearFields();
        if (hasCreatePermission()) {
            enableEditing();
            addIcon.setEnabled(false);
        } else {
            keyTextField.setEnabled(false);
            valueTextArea.setEnabled(false);
        }
    }
    metadataWindow.setSaveButtonEnabled(false);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:18,代码来源:AbstractMetadataPopupLayout.java

示例2: initSelectionListeners

import com.vaadin.event.SelectionEvent; //导入依赖的package包/类
/**
 * Init Grid Selection Listeners
 */
private void initSelectionListeners() {
	grid.addSelectionListener(new SelectionListener() {

		/**
		 * 
		 */
		private static final long serialVersionUID = 7630487081608214268L;

		@Override
		public void select(SelectionEvent event) {
			Set<Object> itemIDs = event.getSelected();
			if (itemIDs.isEmpty()) {
				label.setValue("");
			} else {
				StringBuilder renderingText = new StringBuilder();
				for (Object itemID : itemIDs) {
					Customer customer = (Customer) itemID;
					renderingText.append("Customer with ID - "
							+ customer.getCustomerID() + " and Name - "
							+ customer.getCustomerName() + "<br/>");
				}
				label.setValue(renderingText.toString());
			}

		}
	});
}
 
开发者ID:KrishnaPhani,项目名称:KrishnasSpace,代码行数:31,代码来源:BasicGridView.java

示例3: select

import com.vaadin.event.SelectionEvent; //导入依赖的package包/类
@Override
public void select(SelectionEvent selectionEvent) {
    if (selectionEvent.getSelected().iterator().hasNext()) {
        navigation.setCurrentItemId(selectionEvent.getSelected().iterator().next());
    } else {
        navigation.setCurrentItemId(null);

    }
}
 
开发者ID:tyl,项目名称:field-binder,代码行数:10,代码来源:GridAdaptor.java

示例4: SampleCrudView

import com.vaadin.event.SelectionEvent; //导入依赖的package包/类
public SampleCrudView() {
    setSizeFull();
    addStyleName("crud-view");
    HorizontalLayout topLayout = createTopBar();

    grid = new ProductGrid();
    grid.addSelectionListener(new SelectionListener() {

        @Override
        public void select(SelectionEvent event) {
            viewLogic.rowSelected(grid.getSelectedRow());
        }
    });

    form = new ProductForm(viewLogic);
    form.setCategories(DataService.get().getAllCategories());

    VerticalLayout barAndGridLayout = new VerticalLayout();
    barAndGridLayout.addComponent(topLayout);
    barAndGridLayout.addComponent(grid);
    barAndGridLayout.setMargin(true);
    barAndGridLayout.setSpacing(true);
    barAndGridLayout.setSizeFull();
    barAndGridLayout.setExpandRatio(grid, 1);
    barAndGridLayout.setStyleName("crud-main-layout");

    addComponent(barAndGridLayout);
    addComponent(form);

    viewLogic.init();
}
 
开发者ID:vaadin,项目名称:archetype-application-example,代码行数:32,代码来源:SampleCrudView.java

示例5: rowSelected

import com.vaadin.event.SelectionEvent; //导入依赖的package包/类
protected void rowSelected(SelectionEvent event) {
    Collection<Object> packages = event.getSelected();
    enableDisableButtonsForSelectionSize(packages.size());
    disableFinalizeIfPackageAlreadyReleased(packages);
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:6,代码来源:ReleasesView.java


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