/** * Gets the item Id collection from the container. * * @return the Collection of item ids. */ @Override public Collection<?> getItemIds() { return items.getItemIds(); }
/** * Gets the property type. * * @param propertyId * the Id identifying the property. * @see Container#getType(java.lang.Object) */ @Override public Class<?> getType(Object propertyId) { return items.getType(propertyId); }
private static Container createContainer(Collection<?> options) { final Container container = new IndexedContainer(); if (options != null) { for (final Iterator<?> i = options.iterator(); i.hasNext(); ) { container.addItem(i.next()); } } return container; }
final Collection<?> ids = container.getItemIds(); if (!container.containsId(id)) { removeFromOrderWrapper(id);
/** * Gets the property Id collection from the container. * * @return the Collection of property ids. */ @Override public Collection<?> getContainerPropertyIds() { return items.getContainerPropertyIds(); }
.getContainerPropertyIds(); LinkedList<Object> retainableValueConverters = new LinkedList<Object>(); for (Object propertyId : newPropertyIds) { if (converter != null) { if (typeIsCompatible(converter.getModelType(), newDataSource.getType(propertyId))) { retainableValueConverters.add(propertyId);
filteredSize = container.size(); assert filteredSize >= 0; return new ArrayList<Object>(container.getItemIds()); filteredSize = container.size(); assert filteredSize >= 0; currentPage = adjustCurrentPage(currentPage, needNullSelectOption,
/** * Tests, if the collection contains an item with given id. * * @param itemId * the Id the of item to be tested. */ @Override public boolean containsId(Object itemId) { if (itemId != null) { return items.containsId(itemId); } else { return false; } }
/** * Gets the Property identified by the given itemId and propertyId from the * Container. * * @see Container#getContainerProperty(Object, Object) */ @Override public Property getContainerProperty(Object itemId, Object propertyId) { return items.getContainerProperty(itemId, propertyId); }
/** * Registers a new Property to all Items in the Container. * * @param propertyId * the ID of the new Property. * @param type * the Data type of the new Property. * @param defaultValue * the value all created Properties are initialized to. * @return <code>true</code> if the operation succeeded, <code>false</code> * if not */ @Override public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException { return container.addContainerProperty(propertyId, type, defaultValue); }
parent = new Hashtable<Object, Object>(); children = new Hashtable<Object, LinkedList<Object>>(); roots = new LinkedHashSet<Object>(container.getItemIds()); } else { Collection<?> itemIds = container.getItemIds(); Comparator<Object> basedOnOrderFromWrappedContainer = new ListedItemsFirstComparator( itemIds); if (!container.containsId(id)) { removeFromHierarchyWrapper(id); final Collection<?> ids = container.getItemIds(); for (final Object id : ids) { if (!s.contains(id)) {
@Override public Collection<?> getContainerPropertyIds() { return container.getContainerPropertyIds(); }
@Override public boolean containsId(Object itemId) { return container.containsId(itemId); }
@Override public Property getContainerProperty(Object itemId, Object propertyId) { return container.getContainerProperty(itemId, propertyId); }
/** * Adds a new Property to all Items in the Container. * * @param propertyId * the ID of the new Property. * @param type * the Data type of the new Property. * @param defaultValue * the value all created Properties are initialized to. * @return <code>true</code> if the operation succeeded, <code>false</code> * if not * @throws UnsupportedOperationException * if the addContainerProperty is not supported. */ @Override public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException { return container.addContainerProperty(propertyId, type, defaultValue); }
@Override public Collection<?> getItemIds() { return container.getItemIds(); }
@Override public Class<?> getType(Object propertyId) { return container.getType(propertyId); }
/** * Creates a new item into container with container managed id. The id of * the created new item is returned. The item can be fetched with getItem() * method. if the creation fails, null is returned. * * @return the Id of the created item or null in case of failure. * @see Container#addItem() */ @Override public Object addItem() throws UnsupportedOperationException { final Object retval = items.addItem(); if (retval != null && !(items instanceof Container.ItemSetChangeNotifier)) { fireItemSetChange(); } return retval; }
@Override public Collection<?> getContainerPropertyIds() { return container.getContainerPropertyIds(); }