• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Indexed类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setDataSource

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
/**
 * Set the listing data source.
 * @param <D> Data source type
 * @param container The data source to set (not null)
 */
public <D extends ItemDataSource<T, P> & Indexed> void setDataSource(D container) {
	ObjectUtils.argumentNotNull(container, "Container datasource must be not null");

	this.dataSource = container;

	switch (getRenderingMode()) {
	case GRID:
		getGrid().setContainerDataSource(container);
		break;
	case TABLE:
		getTable().setContainerDataSource(container);
		break;
	default:
		break;
	}
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:22,代码来源:DefaultItemListing.java


示例2: restoreState

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
private void restoreState() {
    final Indexed container = grid.getContainerDataSource();
    if (container.getItemIds().isEmpty()) {
        container.removeAllItems();
        for (final UploadStatusObject statusObject : artifactUploadState.getUploadedFileStatusList()) {
            final Item item = container
                    .addItem(getItemid(statusObject.getFilename(), statusObject.getSelectedSoftwareModule()));
            item.getItemProperty(REASON).setValue(statusObject.getReason() != null ? statusObject.getReason() : "");
            if (statusObject.getStatus() != null) {
                item.getItemProperty(STATUS).setValue(statusObject.getStatus());
            }
            if (statusObject.getProgress() != null) {
                item.getItemProperty(PROGRESS).setValue(statusObject.getProgress());
            }
            item.getItemProperty(FILE_NAME).setValue(statusObject.getFilename());
            final SoftwareModule sw = statusObject.getSelectedSoftwareModule();
            item.getItemProperty(SPUILabelDefinitions.NAME_VERSION)
                    .setValue(HawkbitCommonUtil.getFormattedNameVersion(sw.getName(), sw.getVersion()));
        }
        if (artifactUploadState.isUploadCompleted()) {
            minimizeButton.setEnabled(false);
        }
    }
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:25,代码来源:UploadStatusInfoWindow.java


示例3: wrapGridContainer

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private GeneratedPropertyListContainer<E> wrapGridContainer(final Class<E> entityClass, final Grid grid)
{
	final Indexed gridContainer = grid.getContainerDataSource();
	if (gridContainer instanceof GeneratedPropertyListContainer)
	{
		return (GeneratedPropertyListContainer<E>) gridContainer;
	}

	final GeneratedPropertyListContainer<E> gplc = new GeneratedPropertyListContainer<>(entityClass);
	gplc.setCollection((Collection<E>) gridContainer.getItemIds());
	final Collection<?> containerPropertyIds = gridContainer.getContainerPropertyIds();
	if (!containerPropertyIds.isEmpty())
	{
		gplc.setContainerPropertyIds(containerPropertyIds.toArray(new String[containerPropertyIds.size()]));
	}
	grid.setContainerDataSource(gplc);

	return gplc;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:21,代码来源:GridHeadingV2PropertySet.java


示例4: printChangedRow

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
private void printChangedRow(int rowIndex, Indexed ds, Object itemId) {
    @SuppressWarnings("unchecked")
    Collection<Object> prodIds = (Collection<Object>) ds.getItem(itemId)
            .getItemPropertyIds();
    
    StringBuffer sb = new StringBuffer();
    for (Object o : prodIds) {
        sb.append(ds.getItem(itemId).getItemProperty(o).getValue() + "");
    }
    
    writeOutput("Row " + rowIndex + " changed to: " + sb.toString());
}
 
开发者ID:TatuLund,项目名称:GridFastNavigation,代码行数:13,代码来源:DemoUI.java


示例5: refreshContainer

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
/**
 * Refresh the container.
 */
@Override
public void refreshContainer() {
    final Indexed container = getContainerDataSource();
    if (hasGeneratedPropertySupport()
            && getGeneratedPropertySupport().getRawContainer() instanceof LazyQueryContainer) {
        ((LazyQueryContainer) getGeneratedPropertySupport().getRawContainer()).refresh();
        return;
    }

    if (container instanceof LazyQueryContainer) {
        ((LazyQueryContainer) container).refresh();
    }
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:17,代码来源:AbstractGrid.java


示例6: addNewContainerDS

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
/**
 * Creates a new container instance by calling the required
 * template-methods.
 * <p>
 * A new container is created on initialization as well as when container
 * content fundamentally changes (e.g. if container content depends on a
 * selection as common in master-details relations)
 */
protected void addNewContainerDS() {
    final T container = createContainer();
    Indexed indexedContainer = container;
    if (hasGeneratedPropertySupport()) {
        indexedContainer = getGeneratedPropertySupport().decorate(container);
        setContainerDataSource(indexedContainer);
        getGeneratedPropertySupport().addGeneratedContainerProperties();
    } else {
        setContainerDataSource(indexedContainer);
    }
    addContainerProperties();

    setColumnProperties();
    setColumnHeaderNames();
    setColumnsHidable();
    addColumnRenderes();
    setColumnExpandRatio();

    setHiddenColumns();

    final CellDescriptionGenerator cellDescriptionGenerator = getDescriptionGenerator();
    if (getDescriptionGenerator() != null) {
        setCellDescriptionGenerator(cellDescriptionGenerator);
    }

    if (indexedContainer != null && indexedContainer.size() == 0) {
        setData(SPUIDefinitions.NO_DATA);
    }
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:38,代码来源:AbstractGrid.java


示例7: selectFirstRow

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
/**
 * Selects the first row if available and enabled.
 */
public void selectFirstRow() {
    if (!isSingleSelectionModel()) {
        return;
    }

    final Indexed container = getContainerDataSource();
    final int size = container.size();
    if (size > 0) {
        refreshRows(getContainerDataSource().firstItemId());
        getSingleSelectionModel().select(getContainerDataSource().firstItemId());
    } else {
        getSingleSelectionModel().select(null);
    }
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:18,代码来源:AbstractGrid.java


示例8: getDatasource

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
/**
 * Sets up datasource that needs to be attached the table
 * 
 * @return
 */
private Indexed getDatasource() {

	BeanItemContainer<Customer> container = new BeanItemContainer<Customer>(
			Customer.class);
	container.addAll(DatasourceFactory.getCustomerDatasource(20));
	return container;

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


示例9: getDatasource

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
/**
 * 
 * Initalizes the datasource
 * 
 * @return
 */
protected Indexed getDatasource() {
	BeanItemContainer<VehicleInfo> container = new BeanItemContainer<VehicleInfo>(
			VehicleInfo.class);
	container.addAll(DatasourceFactory.getVehicleSalesDS());
	container.addNestedContainerBean("sales2012");
	container.addNestedContainerBean("sales2013");
	container.addNestedContainerBean("sales2014");
	return container;
}
 
开发者ID:KrishnaPhani,项目名称:KrishnasSpace,代码行数:16,代码来源:AbstractGridView.java


示例10: setContainerDataSource

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
@Override
/**
 * container has to contain expandColumnPropertyId
 * which was specified in the constructor
 */
public void setContainerDataSource(Indexed container) {
	this.container=(GridTreeContainer)container;
	fillContainerWithCellWrappers();
	super.setContainerDataSource(container);
}
 
开发者ID:rogozinds,项目名称:GridTree,代码行数:11,代码来源:GridTree.java


示例11: getHeaders

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
protected Map<String, String> getHeaders() {
    Map<String, String> headers = new HashMap<String, String>();
    Indexed container = headersGrid.getContainerDataSource();
    Collection<?> itemIds = container.getItemIds();
    for (Object itemId : itemIds) {
        Item item = container.getItem(itemId);
        headers.put((String) item.getItemProperty("headerName").getValue(),
                (String) item.getItemProperty("headerValue").getValue());
    }
    return headers;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:12,代码来源:CallWebServicePanel.java


示例12: wrapGridContainer

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
private GeneratedPropertyContainer wrapGridContainer(final Grid grid)
{
	Indexed gridContainer = grid.getContainerDataSource();
	if (!(gridContainer instanceof GeneratedPropertyContainer))
	{
		final GeneratedPropertyContainer gpc = new GeneratedPropertyContainer(gridContainer);
		grid.setContainerDataSource(gpc);
		gridContainer = gpc;
	}

	return (GeneratedPropertyContainer) gridContainer;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:13,代码来源:GridHeadingPropertySet.java


示例13: getContainerDataSource

import com.vaadin.data.Container.Indexed; //导入依赖的package包/类
public Container.Indexed getContainerDataSource()
{
	return grid.getContainerDataSource();
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:5,代码来源:SearchableGrid.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java InBandBytestreamListener类代码示例发布时间:2022-05-23
下一篇:
Java RuntimeEnumLeafInfo类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap