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


Java Tree.setItemCaptionPropertyId方法代码示例

本文整理汇总了Java中com.vaadin.ui.Tree.setItemCaptionPropertyId方法的典型用法代码示例。如果您正苦于以下问题:Java Tree.setItemCaptionPropertyId方法的具体用法?Java Tree.setItemCaptionPropertyId怎么用?Java Tree.setItemCaptionPropertyId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.Tree的用法示例。


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

示例1: getView

import com.vaadin.ui.Tree; //导入方法依赖的package包/类
@Override
public Component getView(final WidgetContext widgetContext) {
	
	Tree tree = new Tree("Services", new FilterableHierarchicalContainer(new NCSServiceContainer(m_ncsComponentRepository)));
	tree.setMultiSelect(true);
	tree.setImmediate(true);
	tree.setItemCaptionMode(Tree.ITEM_CAPTION_MODE_PROPERTY);
	tree.setItemCaptionPropertyId("name");
	tree.addListener(new ValueChangeListener() {
		
		@Override
		public void valueChange(ValueChangeEvent event) {
			Collection<Long> selectedIds = (Collection<Long>) event.getProperty().getValue();
			
			Criteria criteria = NCSEdgeProvider.createCriteria(selectedIds);
			
			widgetContext.getGraphContainer().setCriteria(criteria);
		}
	});
	
	return tree;
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:23,代码来源:NCSViewContribution.java

示例2: createOrganizationTree

import com.vaadin.ui.Tree; //导入方法依赖的package包/类
private Tree createOrganizationTree(Organization organization) {		        
	Tree organizationTree = new Tree();	
	organizationTree.setImmediate(false);
	organizationTree.setWidth("100.0%");
	organizationTree.setHeight("100.0%");
	organizationTree.setContainerDataSource(createDataSource(organization));
	organizationTree.setItemIconPropertyId("icon");
	organizationTree.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);
	organizationTree.setItemCaptionPropertyId("description");
	
	// Expand all items that can be
       for (Object itemId: organizationTree.getItemIds())
       	organizationTree.expandItem(itemId);
       
       organizationTree.setData(organization);
       organizationTree.addActionHandler(this);
       
	return organizationTree;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:20,代码来源:OrganizationView.java

示例3: initView

import com.vaadin.ui.Tree; //导入方法依赖的package包/类
private void initView() {
	this.loadingSign = new ProgressBar();
	this.loadingSign.setIndeterminate(true);
	this.loadingSign.setId("loadingSign");
	Label title = new Label("Available models");
	title.setId("label_availableModels");
	addComponent(title);
	
	this.availableModelsTree = new Tree();
	this.availableModelsTree.setId("tree_availableModels");
	this.availableModelsTree.setWidth(30, Unit.EM);
	Tree tree = availableModelsTree;
       tree.addContainerProperty(CAPTION_PROPERTY, String.class, "");
       tree.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
       tree.setItemCaptionPropertyId(CAPTION_PROPERTY);
	this.buttonStartSession = new Button("Start");
	this.buttonStartSession.setId("button_start");
	this.buttonStartSession.addClickListener(new Button.ClickListener() {
		public void buttonClick(ClickEvent event) {
			String selectedModelPath = (String) tree.getValue();
			if(selectedModelPath.endsWith(".wtspec4m")) {
				startSession(selectedModelPath);
			} 
		}
	});
	addComponent(this.buttonStartSession);
	addComponent(this.loadingSign);

	Panel treeViewContainer = new Panel();
	treeViewContainer.setId("panel_treeViewContainer");
	treeViewContainer.setContent(this.availableModelsTree);
	addComponent(treeViewContainer);
}
 
开发者ID:FTSRG,项目名称:mondo-collab-framework,代码行数:34,代码来源:StartNewSessionPage.java


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