本文整理汇总了Java中com.haulmont.cuba.gui.data.CollectionDatasource.CollectionChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionDatasource.CollectionChangeListener方法的具体用法?Java CollectionDatasource.CollectionChangeListener怎么用?Java CollectionDatasource.CollectionChangeListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.haulmont.cuba.gui.data.CollectionDatasource
的用法示例。
在下文中一共展示了CollectionDatasource.CollectionChangeListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCollectionChangeListener
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
@Override
protected CollectionDatasource.CollectionChangeListener createCollectionChangeListener() {
return new ContainerDatasourceCollectionChangeListener(){
@Override
public void collectionChanged(CollectionDatasource.CollectionChangeEvent e) {
Collection groupProperties = component.getGroupProperties();
component.groupBy(groupProperties.toArray());
super.collectionChanged(e);
}
};
}
示例2: WeakDsListenerAdapter
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
public WeakDsListenerAdapter(CollectionDatasource datasource, Datasource.ItemPropertyChangeListener itemPropertyChangeListener,
Datasource.StateChangeListener stateChangeListener, CollectionDatasource.CollectionChangeListener collectionChangeListener) {
this.collectionDatasource = datasource;
this.itemPropertyChangeListenerReference = new WeakReference<>(itemPropertyChangeListener);
this.stateChangeListenerReference = new WeakReference<>(stateChangeListener);
this.collectionChangeListenerReference = new WeakReference<>(collectionChangeListener);
}
示例3: collectionChanged
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void collectionChanged(CollectionDatasource.CollectionChangeEvent e) {
CollectionDatasource.CollectionChangeListener collectionChangeListener = collectionChangeListenerReference.get();
if (collectionChangeListener != null) {
collectionChangeListener.collectionChanged(e);
} else {
collectionDatasource.removeCollectionChangeListener(this);
}
}
示例4: createCollectionChangeListener
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
protected CollectionDatasource.CollectionChangeListener createCollectionChangeListener() {
return new ContainerDatasourceCollectionChangeListener();
}
示例5: addCollectionChangeListener
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
public void addCollectionChangeListener(CollectionDatasource.CollectionChangeListener listener) {
getEventRouter().addListener(CollectionDatasource.CollectionChangeListener.class, listener);
}
示例6: removeCollectionChangeListener
import com.haulmont.cuba.gui.data.CollectionDatasource; //导入方法依赖的package包/类
public void removeCollectionChangeListener(CollectionDatasource.CollectionChangeListener listener) {
getEventRouter().removeListener(CollectionDatasource.CollectionChangeListener.class, listener);
}