本文整理汇总了Java中com.haulmont.cuba.gui.data.CollectionDatasource.Indexed方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionDatasource.Indexed方法的具体用法?Java CollectionDatasource.Indexed怎么用?Java CollectionDatasource.Indexed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.haulmont.cuba.gui.data.CollectionDatasource
的用法示例。
在下文中一共展示了CollectionDatasource.Indexed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DataGridIndexedCollectionDsWrapper
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public DataGridIndexedCollectionDsWrapper(CollectionDatasource datasource, Collection<MetaPropertyPath> properties,
boolean autoRefresh,
CollectionDsListenersWrapper collectionDsListenersWrapper) {
if (!(datasource instanceof CollectionDatasource.Indexed)) {
throw new IllegalArgumentException("Datasource must implement " +
"com.haulmont.cuba.gui.data.CollectionDatasource.Indexed");
}
this.datasource = (CollectionDatasource.Indexed) datasource;
this.autoRefresh = autoRefresh;
this.collectionDsListenersWrapper = collectionDsListenersWrapper;
final View view = datasource.getView();
final MetaClass metaClass = datasource.getMetaClass();
if (properties == null) {
createProperties(view, metaClass);
} else {
this.properties.addAll(properties);
}
cdsItemPropertyChangeListener = createItemPropertyChangeListener();
cdsStateChangeListener = createStateChangeListener();
cdsCollectionChangeListener = createCollectionChangeListener();
collectionDsListenersWrapper.addItemPropertyChangeListener(cdsItemPropertyChangeListener);
collectionDsListenersWrapper.addStateChangeListener(cdsStateChangeListener);
collectionDsListenersWrapper.addCollectionChangeListener(cdsCollectionChangeListener);
}
示例2: createContainerDatasource
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
protected DataGridIndexedCollectionDsWrapper createContainerDatasource(CollectionDatasource.Indexed datasource,
Collection<MetaPropertyPath> columns,
CollectionDsListenersWrapper collectionDsListenersWrapper) {
return datasource instanceof CollectionDatasource.Sortable
? new SortableDataGridDsWrapper(datasource, columns, collectionDsListenersWrapper)
: new DataGridDsWrapper(datasource, columns, collectionDsListenersWrapper);
}
示例3: DataGridDsWrapper
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
public DataGridDsWrapper(CollectionDatasource.Indexed datasource, Collection<MetaPropertyPath> properties,
CollectionDsListenersWrapper collectionDsListenersWrapper) {
super(datasource, properties, true, collectionDsListenersWrapper);
}
示例4: SortableDataGridDsWrapper
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
public SortableDataGridDsWrapper(CollectionDatasource.Indexed datasource,
Collection<MetaPropertyPath> properties,
CollectionDsListenersWrapper collectionDsListenersWrapper) {
super(datasource, properties, true, collectionDsListenersWrapper);
}