public class GCFilterableContainer extends com.vaadin.data.util.AbstractBeanContainer<VertexRef,Vertex> implements com.vaadin.data.Container.Hierarchical
com.vaadin.data.util.AbstractBeanContainer.BeanIdResolver<IDTYPE,BEANTYPE>, com.vaadin.data.util.AbstractBeanContainer.PropertyBasedBeanIdResolver
com.vaadin.data.util.AbstractContainer.BaseItemSetChangeEvent, com.vaadin.data.util.AbstractContainer.BasePropertySetChangeEvent
com.vaadin.data.Container.Editor, com.vaadin.data.Container.Filter, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeEvent, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeEvent, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.SimpleFilterable, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer
Constructor and Description |
---|
GCFilterableContainer(GraphContainer graphContainer) |
Modifier and Type | Method and Description |
---|---|
boolean |
areChildrenAllowed(Object itemId) |
protected boolean |
doFilterContainer(boolean hasFilters) |
void |
fireItemSetChange() |
Collection<?> |
getChildren(Object itemId) |
Object |
getParent(Object itemId) |
boolean |
hasChildren(Object itemId) |
boolean |
isRoot(Object itemId) |
protected boolean |
passesFilters(Object itemId) |
static boolean |
removeItemRecursively(com.vaadin.data.Container.Hierarchical container,
Object itemId)
Removes the Item identified by given itemId and all its children from the
given Container.
|
Collection<?> |
rootItemIds() |
boolean |
setChildrenAllowed(Object itemId,
boolean childrenAllowed)
Sets the given Item's capability to have children.
|
void |
setIncludeParentsWhenFiltering(boolean includeParentsWhenFiltering)
Controls how the filtering of the container works.
|
boolean |
setParent(Object itemId,
Object newParentId)
Sets the parent of an Item.
|
addAll, addBean, addBeanAfter, addBeanAt, addContainerFilter, addContainerFilter, addContainerProperty, addContainerProperty, addItem, addItemAfter, addItemAt, addListener, addNestedContainerBean, addNestedContainerProperty, addPropertySetChangeListener, createBeanItem, createBeanPropertyResolver, getBeanIdResolver, getBeanType, getContainerFilters, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getItemSorter, getSortableContainerPropertyIds, getType, getUnfilteredItem, hasContainerFilters, registerNewItem, removeAllContainerFilters, removeAllItems, removeContainerFilter, removeContainerFilters, removeContainerProperty, removeItem, removeListener, removePropertySetChangeListener, resolveBeanId, setBeanIdResolver, setItemSorter, sort, valueChange
addFilter, addItem, addItem, addItemAfter, addItemAfter, addItemAt, addItemAt, addItemSetChangeListener, addListener, containsId, doSort, filterAll, fireItemAdded, fireItemRemoved, firstItemId, getAllItemIds, getFilteredItemIds, getFilters, getIdByIndex, getItemIds, getSortablePropertyIds, getVisibleItemIds, indexOfId, internalAddItemAfter, internalAddItemAt, internalAddItemAtEnd, internalRemoveAllItems, internalRemoveItem, isFiltered, isFirstId, isLastId, isPropertyFiltered, lastItemId, nextItemId, prevItemId, removeAllFilters, removeFilter, removeFilters, removeItemSetChangeListener, removeListener, setAllItemIds, setFilteredItemIds, setFilters, size, sortContainer
fireContainerPropertySetChange, fireContainerPropertySetChange, fireItemSetChange, getItemSetChangeListeners, getListeners, getPropertySetChangeListeners, setItemSetChangeListeners, setPropertySetChangeListeners
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public GCFilterableContainer(GraphContainer graphContainer)
public boolean areChildrenAllowed(Object itemId)
areChildrenAllowed
in interface com.vaadin.data.Container.Hierarchical
public Collection<?> getChildren(Object itemId)
getChildren
in interface com.vaadin.data.Container.Hierarchical
public Object getParent(Object itemId)
getParent
in interface com.vaadin.data.Container.Hierarchical
public boolean hasChildren(Object itemId)
hasChildren
in interface com.vaadin.data.Container.Hierarchical
public boolean isRoot(Object itemId)
isRoot
in interface com.vaadin.data.Container.Hierarchical
public Collection<?> rootItemIds()
rootItemIds
in interface com.vaadin.data.Container.Hierarchical
public boolean setChildrenAllowed(Object itemId, boolean childrenAllowed)
Sets the given Item's capability to have children. If the Item identified
with the itemId already has children and the areChildrenAllowed is false
this method fails and false
is returned; the children must
be first explicitly removed with
setParent(Object itemId, Object newParentId)
or
Container.removeItem(Object itemId)
.
setChildrenAllowed
in interface com.vaadin.data.Container.Hierarchical
itemId
- the ID of the Item in the container whose child capability is
to be set.childrenAllowed
- the boolean value specifying if the Item can have children or
not.true
if the operation succeeded, false
if notpublic boolean setParent(Object itemId, Object newParentId)
Sets the parent of an Item. The new parent item must exist and be able to
have children. (canHaveChildren(newParentId) == true
). It is
also possible to detach a node from the hierarchy (and thus make it root)
by setting the parent null
.
setParent
in interface com.vaadin.data.Container.Hierarchical
itemId
- the ID of the item to be set as the child of the Item
identified with newParentId.newParentId
- the ID of the Item that's to be the new parent of the Item
identified with itemId.true
if the operation succeeded, false
if notpublic static boolean removeItemRecursively(com.vaadin.data.Container.Hierarchical container, Object itemId)
container
- the container where the item is to be removeditemId
- the identifier of the Item to be removedpublic void setIncludeParentsWhenFiltering(boolean includeParentsWhenFiltering)
includeParentsWhenFiltering
- true to include all parents for items that match the filter,
false to only include the matching itemsprotected boolean doFilterContainer(boolean hasFilters)
protected boolean passesFilters(Object itemId)
public void fireItemSetChange()
fireItemSetChange
in class com.vaadin.data.util.AbstractContainer
Copyright © 2016. All rights reserved.