public interface ItemHierarchy
Item
is a representation of a single item,
typically with data provided from XML. ItemGroup
represents a list of child item hierarchies it contains, but itself does not do any display.Modifier and Type | Interface and Description |
---|---|
static interface |
ItemHierarchy.Observer
Observer for any changes in this hierarchy.
|
Modifier and Type | Method and Description |
---|---|
ItemHierarchy |
findItemById(int id)
Find an item hierarchy within this hierarchy which has the given ID.
|
int |
getCount() |
IItem |
getItemAt(int position)
Get the item at position.
|
void |
registerObserver(ItemHierarchy.Observer observer)
Register an observer to observe changes for this item hierarchy.
|
void |
unregisterObserver(ItemHierarchy.Observer observer)
Unregister a previously registered observer.
|
void registerObserver(ItemHierarchy.Observer observer)
void unregisterObserver(ItemHierarchy.Observer observer)
int getCount()
IItem getItemAt(int position)
position
- An integer from 0 to getCount()
}, which indicates the position in
this item hierarchy to get the child item.position
. Must not be null
.ItemHierarchy findItemById(int id)
id
- An ID to search for in this item hierarchy.