本文整理汇总了Java中com.haulmont.cuba.gui.data.GroupDatasource类的典型用法代码示例。如果您正苦于以下问题:Java GroupDatasource类的具体用法?Java GroupDatasource怎么用?Java GroupDatasource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GroupDatasource类属于com.haulmont.cuba.gui.data包,在下文中一共展示了GroupDatasource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doGroup
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
protected void doGroup(Object[] properties) {
saveState();
((GroupDatasource) datasource).groupBy(properties);
restoreState();
resetCachedItems();
if (aggregationCells != null) {
if (hasGroups()) {
if (groupAggregationCells == null) {
groupAggregationCells = new HashMap<>();
} else {
groupAggregationCells.clear();
}
fillGroupAggregationCells(groupAggregationCells);
} else {
groupAggregationCells = null;
}
}
}
示例2: getCachedItemIds
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
protected LinkedList getCachedItemIds() {
if (cachedItemIds == null) {
final LinkedList<Object> result = new LinkedList<>();
//noinspection unchecked
final List<GroupInfo> roots = ((GroupDatasource) datasource).rootGroups();
for (final GroupInfo root : roots) {
result.add(root);
collectItemIds(root, result);
}
cachedItemIds = result;
if (!cachedItemIds.isEmpty()) {
first = cachedItemIds.peekFirst();
last = cachedItemIds.peekLast();
}
}
return cachedItemIds;
}
示例3: rootGroups
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public Collection<?> rootGroups() {
if (hasGroups()) {
return ((GroupDatasource) datasource).rootGroups();
}
return Collections.emptyList();
}
示例4: getChildren
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public Collection<?> getChildren(Object id) {
if (isGroup(id)) {
return ((GroupDatasource) datasource).getChildren((GroupInfo) id);
}
return Collections.emptyList();
}
示例5: getGroupItemIds
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public Collection<?> getGroupItemIds(Object id) {
if (isGroup(id)) {
return ((GroupDatasource) datasource).getGroupItemIds((GroupInfo) id);
}
return Collections.emptyList();
}
示例6: getGroupItemsCount
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public int getGroupItemsCount(Object id) {
if (isGroup(id)) {
return ((GroupDatasource) datasource).getGroupItemsCount((GroupInfo) id);
}
return 0;
}
示例7: getGroupProperty
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public Object getGroupProperty(Object id) {
if (isGroup(id)) {
return ((GroupDatasource) datasource).getGroupProperty((GroupInfo) id);
}
return null;
}
示例8: getGroupPropertyValue
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public Object getGroupPropertyValue(Object id) {
if (isGroup(id)) {
return ((GroupDatasource) datasource).getGroupPropertyValue((GroupInfo) id);
}
return null;
}
示例9: getGroupProperties
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public Collection<?> getGroupProperties() {
if (hasGroups()) {
return ((GroupDatasource) datasource).getGroupProperties();
}
return Collections.emptyList();
}
示例10: collectItemIds
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
protected void collectItemIds(GroupInfo groupId, final List<Object> itemIds) {
if (expanded.contains(groupId)) {
if (((GroupDatasource) datasource).hasChildren(groupId)) {
@SuppressWarnings("unchecked")
final List<GroupInfo> children = ((GroupDatasource) datasource).getChildren(groupId);
for (final GroupInfo child : children) {
itemIds.add(child);
collectItemIds(child, itemIds);
}
} else {
itemIds.addAll(((GroupDatasource) datasource).getGroupItemIds(groupId));
}
}
}
示例11: handleAggregation
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
protected void handleAggregation() {
super.handleAggregation();
if (isAggregatable() && aggregationCells != null) {
if (datasource instanceof GroupDatasource) {
GroupDatasource groupDs = ((GroupDatasource) datasource);
@SuppressWarnings("unchecked")
Collection<GroupInfo> roots = groupDs.rootGroups();
for (final GroupInfo root : roots) {
component.aggregate(new CubaGroupTable.GroupAggregationContext(component, root));
}
}
}
}
示例12: getDatasource
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public GroupDatasource getDatasource() {
return (GroupDatasource) super.getDatasource();
}
示例13: GroupTableDsWrapper
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
public GroupTableDsWrapper(CollectionDatasource datasource, Collection<MetaPropertyPath> properties,
CollectionDsListenersWrapper collectionDsListenersWrapper) {
super(datasource, properties, true, collectionDsListenersWrapper);
groupDatasource = datasource instanceof GroupDatasource;
}
示例14: hasChildren
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public boolean hasChildren(Object id) {
return isGroup(id) && ((GroupDatasource) datasource).hasChildren((GroupInfo) id);
}
示例15: isGroup
import com.haulmont.cuba.gui.data.GroupDatasource; //导入依赖的package包/类
@Override
public boolean isGroup(Object id) {
return (id instanceof GroupInfo) && ((GroupDatasource) datasource).containsGroup((GroupInfo) id);
}