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


Java IndexedContainer类代码示例

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


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

示例1: createDataSource

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private Container createDataSource() {
	Container languageItems = new IndexedContainer();
	languageItems.addContainerProperty("icon", ThemeResource.class, null);
	languageItems.addContainerProperty("caption", String.class, "");

	fillItem(languageItems.addItem(Locale.ENGLISH), "English", "en");
	fillItem(languageItems.addItem(new Locale("pl")), "Polski", "pl");

	return languageItems;
}
 
开发者ID:Horuss,项目名称:bbplay,代码行数:11,代码来源:LanguageComboBox.java

示例2: getPerfiles

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private IndexedContainer getPerfiles() {
	// TODO Auto-generated method stub
	IndexedContainer container = new IndexedContainer();
   	container.addContainerProperty("descripcion", String.class, null);
   	container.addContainerProperty("id", String.class, null);
   	
   	List list = new ArrayList();
   	
   	Perfil bean = new Perfil();
   	Item item = null;
   	
   	CorePerfil perfilCore = new CorePerfil();
   	
   	list = perfilCore.getPerfilesHabilitados();
	
   	for (int i=0;i<list.size();i++){
   		bean = (Perfil) list.get(i);
   		item = container.addItem(bean.getId());
   		item.getItemProperty("descripcion").setValue(bean.getNombre());
   		item.getItemProperty("id").setValue(Integer.valueOf(bean.getId()).toString());
   	}
	
   	return container;
}
 
开发者ID:damiancom,项目名称:garantia,代码行数:25,代码来源:AltaUsuarioModModal.java

示例3: getAreas

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private IndexedContainer getAreas() {
	// TODO Auto-generated method stub
	IndexedContainer container = new IndexedContainer();
   	container.addContainerProperty("descripcion", String.class, null);
   	container.addContainerProperty("id", String.class, null);
   	
   	CoreArea areaCore = new CoreArea();
   	
   	List list = new ArrayList();
   	
   	Area bean = new Area();
   	
   	Item item = null;
   	
   	list = areaCore.getAreasHabilitadas();
	
   	for (int i=0;i<list.size();i++){
   		bean = (Area) list.get(i);
   		item = container.addItem(bean.getId());
   		item.getItemProperty("descripcion").setValue(bean.getNombre());
   		item.getItemProperty("id").setValue(Integer.valueOf(bean.getId()).toString());
   	}
	
   	return container;
}
 
开发者ID:damiancom,项目名称:garantia,代码行数:26,代码来源:AltaUsuarioModModal.java

示例4: getAccionesRelacionadas

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private IndexedContainer getAccionesRelacionadas(){
	IndexedContainer container = new IndexedContainer();
	container.addContainerProperty("descripcion", String.class, null);
   	container.addContainerProperty("id", String.class, null);

   	Accion bean = new Accion();
   	
   	Item item = null;

   	for (int i=0;i<relacionadas.size();i++){
   		bean = (Accion) relacionadas.get(i);
   		item = container.addItem(bean);
   		item.getItemProperty("descripcion").setValue(bean.getNombre());
   		item.getItemProperty("id").setValue(Integer.valueOf(bean.getId()).toString());
   	}
   	
   	return container;

}
 
开发者ID:damiancom,项目名称:garantia,代码行数:21,代码来源:RelacionarAccionesPerfilModModal.java

示例5: getPadres

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private IndexedContainer getPadres(){
	// TODO Auto-generated method stub
	IndexedContainer container = new IndexedContainer();
   	container.addContainerProperty("descripcion", String.class, null);
   	container.addContainerProperty("id", String.class, null);
   	
   	List list = new ArrayList();
   	
   	Accion bean = new Accion();
   	Item item = null;
   	
   	CoreAccion accionCore = new CoreAccion();
   	
   	list = accionCore.selectAccionesPadres();
	
   	for (int i=0;i<list.size();i++){
   		bean = (Accion) list.get(i);
   		item = container.addItem(bean.getId());
   		item.getItemProperty("descripcion").setValue(bean.getNombre());
   		item.getItemProperty("id").setValue(Integer.valueOf(bean.getId()).toString());
   	}
	
   	return container;
}
 
开发者ID:damiancom,项目名称:garantia,代码行数:25,代码来源:AltaAccionModModal.java

示例6: getClassesContainer

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private IndexedContainer getClassesContainer() {
    IndexedContainer container = new IndexedContainer();
    container.addContainerProperty(NAME, String.class, null);

    if (classListType.equals(CLASS_LIST_TYPE.SIMPLE_DATA) || classListType.equals(CLASS_LIST_TYPE.BOTH)) {
        for (FieldModel.CLASS c : FieldModel.CLASS.values()) {
            addItem(container, c.getCanonicalName(), c.getSimpleName());
        }
    }

    if (classListType.equals(CLASS_LIST_TYPE.COMPLEX_DATA) || classListType.equals(CLASS_LIST_TYPE.BOTH)) {
        try {
            for (Module data : HybridbpmUI.getDevelopmentAPI().getModuleListByType(Module.MODULE_TYPE.DATA, false)) {
                addItem(container, data.getName(), data.getName());
            }
        } catch (Exception ex) {
            logger.log(Level.SEVERE, ex.getMessage(), ex);
        }
    }
    container.sort(new Object[]{NAME}, new boolean[]{true});
    return container;
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:23,代码来源:FieldForm.java

示例7: setTableContainer

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private void setTableContainer() {
    tabelContainer = new IndexedContainer();

    tabelContainer.addContainerProperty(FILE_NAME, Label.class, null);
    tabelContainer.addContainerProperty(BASE_SW_MODULE, Label.class, null);
    tabelContainer.addContainerProperty(UPLOAD_RESULT, Label.class, null);
    tabelContainer.addContainerProperty(REASON, Label.class, null);

    uploadResultTable.setContainerDataSource(tabelContainer);
    uploadResultTable.setPageLength(10);
    uploadResultTable.setColumnHeader(FILE_NAME, i18n.getMessage("upload.file.name"));
    uploadResultTable.setColumnHeader(BASE_SW_MODULE, i18n.getMessage("upload.swModuleTable.header"));
    uploadResultTable.setColumnHeader(UPLOAD_RESULT, i18n.getMessage("upload.result.status"));
    uploadResultTable.setColumnHeader(REASON, i18n.getMessage("upload.reason"));

    uploadResultTable.setColumnExpandRatio(FILE_NAME, 0.2f);
    uploadResultTable.setColumnExpandRatio(BASE_SW_MODULE, 0.2f);
    uploadResultTable.setColumnExpandRatio(UPLOAD_RESULT, 0.12f);
    uploadResultTable.setColumnExpandRatio(REASON, 0.48f);
    final Object[] visibileColumn = { FILE_NAME, BASE_SW_MODULE, UPLOAD_RESULT, REASON };
    uploadResultTable.setVisibleColumns(visibileColumn);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:23,代码来源:UploadResultWindow.java

示例8: getAssignmentsTableContainer

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private IndexedContainer getAssignmentsTableContainer() {
    final IndexedContainer contactContainer = new IndexedContainer();
    contactContainer.addContainerProperty(TARGET_NAME, String.class, "");
    contactContainer.addContainerProperty(DISTRIBUTION_NAME, String.class, "");
    contactContainer.addContainerProperty(TARGET_ID, Long.class, "");
    contactContainer.addContainerProperty(DIST_ID, Long.class, "");
    final Map<TargetIdName, DistributionSetIdName> assignedList = managementUIState.getAssignedList();

    for (final Map.Entry<TargetIdName, DistributionSetIdName> entry : assignedList.entrySet()) {
        final Item saveTblitem = contactContainer.addItem(entry.getKey());

        saveTblitem.getItemProperty(TARGET_NAME).setValue(entry.getKey().getTargetName());

        saveTblitem.getItemProperty(DISTRIBUTION_NAME).setValue(HawkbitCommonUtil
                .getDistributionNameAndVersion(entry.getValue().getName(), entry.getValue().getVersion()));

        saveTblitem.getItemProperty(TARGET_ID).setValue(entry.getKey().getTargetId());
        saveTblitem.getItemProperty(DIST_ID).setValue(entry.getValue().getId());
    }
    return contactContainer;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:22,代码来源:ManangementConfirmationWindowLayout.java

示例9: getSWAssignmentsTableContainer

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private IndexedContainer getSWAssignmentsTableContainer() {
    final IndexedContainer contactContainer = new IndexedContainer();
    contactContainer.addContainerProperty(DIST_NAME, String.class, "");
    contactContainer.addContainerProperty(SOFTWARE_MODULE_NAME, String.class, "");
    contactContainer.addContainerProperty(DIST_ID_NAME, DistributionSetIdName.class, "");
    contactContainer.addContainerProperty(SOFTWARE_MODULE_ID_NAME, SoftwareModuleIdName.class, "");

    final Map<DistributionSetIdName, HashSet<SoftwareModuleIdName>> assignedList = manageDistUIState
            .getAssignedList();

    assignedList.forEach((distIdname, softIdNameSet) -> softIdNameSet.forEach(softIdName -> {
        final String itemId = HawkbitCommonUtil.concatStrings("|||", distIdname.getId().toString(),
                softIdName.getId().toString());
        final Item saveTblitem = contactContainer.addItem(itemId);

        saveTblitem.getItemProperty(DIST_NAME).setValue(distIdname.getName().concat(":" + distIdname.getVersion()));

        saveTblitem.getItemProperty(SOFTWARE_MODULE_NAME).setValue(softIdName.getName());

        saveTblitem.getItemProperty(DIST_ID_NAME).setValue(distIdname);
        saveTblitem.getItemProperty(SOFTWARE_MODULE_ID_NAME).setValue(softIdName);
    }));
    return contactContainer;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:26,代码来源:DistributionsConfirmationWindowLayout.java

示例10: sourceData

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
protected void sourceData(String key, Object val) {
    if (val instanceof String) {
        if (viewData.getItemProperty(key) == null) {
            viewData.addItemProperty(key, new ObjectProperty<String>((String) val));
        } else {
            viewData.getItemProperty(key).setValue(val);
        }
    } else {
        // Creates the options container and add given options to it
        final Container c = new IndexedContainer();
        if (val != null) {
            c.addContainerProperty("name", String.class, "");
            for (final Iterator<?> i = ((List) val).iterator(); i.hasNext();) {
                Item item = c.addItem(i.next());
            }
        }
        if (viewData.getItemProperty(key) == null) {
            viewData.addItemProperty(key, new ObjectProperty<Container>(c));
        } else {
            viewData.getItemProperty(key).setValue(c);
        }

    }
}
 
开发者ID:rah003,项目名称:neat-tweaks,代码行数:25,代码来源:ConfigStatusPresenter.java

示例11: buildPossibleTargetVersions

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected Panel buildPossibleTargetVersions(ProjectVersion targetProjectVersion) {

    Panel possibleTargetVersionsPanel = new Panel("Available Target Versions");        
    possibleTargetVersionsPanel.addStyleName(ValoTheme.PANEL_SCROLL_INDICATOR);
    possibleTargetVersionsPanel.setSizeFull();

    IndexedContainer container = new IndexedContainer();
    optionGroup = new OptionGroup("Project Version", container);
    optionGroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL);
    optionGroup.setItemCaptionMode(ItemCaptionMode.PROPERTY);
    optionGroup.setItemCaptionPropertyId("versionLabel");
    optionGroup.addStyleName("indent");

    List<ProjectVersion> projectVersions = configService.findProjectVersionsByProject(targetProjectVersion.getProject());        
    container.addContainerProperty("versionLabel", String.class, null); 
    for (ProjectVersion version : projectVersions) {
        Item item = container.addItem(version.getId());
        item.getItemProperty("versionLabel").setValue(version.getVersionLabel()); 
        if (targetProjectVersion.getId().equalsIgnoreCase(version.getId())) {
            optionGroup.setItemEnabled(version.getId(), false);
        }
    }
    possibleTargetVersionsPanel.setContent(optionGroup);
    return possibleTargetVersionsPanel;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:27,代码来源:ChangeDependencyVersionDialog.java

示例12: createElasticIpContainer

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private IndexedContainer createElasticIpContainer() {
    IndexedContainer elasticIpContainer = new IndexedContainer();
    elasticIpContainer.addContainerProperty(ELASTIC_IP_CAPTION_ID, String.class, null);

    String dynamic = ViewProperties.getCaption("field.elasticIp.dynamic");
    String associated = ViewProperties.getCaption("field.elasticIp.associated");

    // ElasticIP無しの項目
    Item item = elasticIpContainer.addItem(NULL_ADDRESS);
    item.getItemProperty(ELASTIC_IP_CAPTION_ID).setValue(dynamic);

    for (AddressDto address : elasticIps) {
        item = elasticIpContainer.addItem(address);

        //InstanceNoがNullならPool状態
        if (null == address.getInstanceNo()) {
            item.getItemProperty(ELASTIC_IP_CAPTION_ID).setValue(address.getPublicIp());
        } else {
            item.getItemProperty(ELASTIC_IP_CAPTION_ID).setValue(address.getPublicIp() + " " + associated);
        }
    }

    return elasticIpContainer;
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:25,代码来源:WinServerEdit.java

示例13: show

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
public void show() {
    sizeSelect.setContainerDataSource(new IndexedContainer(instanceTypes));
    sizeSelect.select(instance.getOpenstackInstance().getInstanceType());

    zoneSelect.setContainerDataSource(createZoneContainer());
    for (ZoneDto zoneDto : zones) {
        if (StringUtils.equals(zoneDto.getZoneName(), instance.getOpenstackInstance().getAvailabilityZone())) {
            zoneSelect.select(zoneDto);
            break;
        }
    }
    if (instance.getOpenstackVolumes() != null && instance.getOpenstackVolumes().size() > 0) {
        //ボリュームが存在する場合は編集不可
        zoneSelect.setEnabled(false);
    }

    grpSelect.setContainerDataSource(new IndexedContainer(securityGroups));
    grpSelect.select(instance.getOpenstackInstance().getSecurityGroups());

    keySelect.setContainerDataSource(new IndexedContainer(keyPairs));
    keySelect.select(instance.getOpenstackInstance().getKeyName());
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:23,代码来源:WinServerEdit.java

示例14: createIpModeContainer

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
private IndexedContainer createIpModeContainer() {
    IndexedContainer ipModeContainer = new IndexedContainer();
    ipModeContainer.addContainerProperty(CID_IP_MODE, String.class, null);

    //POOL
    Item item = ipModeContainer.addItem("POOL");
    item.getItemProperty(CID_IP_MODE).setValue(ViewProperties.getCaption("field.ipMode.pool"));

    //MANUAL
    item = ipModeContainer.addItem("MANUAL");
    item.getItemProperty(CID_IP_MODE).setValue(ViewProperties.getCaption("field.ipMode.manual"));

    //DHCP
    item = ipModeContainer.addItem("DHCP");
    item.getItemProperty(CID_IP_MODE).setValue(ViewProperties.getCaption("field.ipMode.dhcp"));

    return ipModeContainer;
}
 
开发者ID:primecloud-controller-org,项目名称:primecloud-controller,代码行数:19,代码来源:WinServerNetworkConfig.java

示例15: createContainerFromMap

import com.vaadin.data.util.IndexedContainer; //导入依赖的package包/类
@SuppressWarnings("unchecked")
static public IndexedContainer createContainerFromMap(String fieldName, Map<?, String> hashMap)
{
	IndexedContainer container = new IndexedContainer();
	container.addContainerProperty(fieldName, String.class, "");

	Iterator<?> iter = hashMap.keySet().iterator();
	while (iter.hasNext())
	{
		Object itemId = iter.next();
		container.addItem(itemId);
		container.getItem(itemId).getItemProperty(fieldName).setValue(hashMap.get(itemId));
	}

	return container;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:17,代码来源:FormHelper.java


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