StateObject that holds onto a list of children, the
methods defined in ListHolderStateObject are automatically handled here.
| Modifier and Type | Field and Description |
|---|---|
| private List | items
The list of children owned by this one. |
| Access | Constructor and Description |
|---|---|
| protected | AbstractListHolderStateObject(StateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| protected | AbstractListHolderStateObject(StateObject
The parent of this state object, which cannot be parent, List<? extends T> nullThe list of items)StateObjects to add as children to this oneCreates a new |
| protected | AbstractListHolderStateObject(StateObject
The parent of this state object, which cannot be parent, T... nullThe list of items)StateObjects to add as children to this oneCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addChildren(List<StateObject>
The list used to store the children children)Overrides org. StateObject to the given list.
|
| public <S extends T> S | addItem(S
The child item)StateObject to become a child of this one
return The given itemImplements org. StateObject as a child of this one.
|
| public void | addItems(List<? extends T>
The items)StateObjects to become children of this oneImplements org. StateObjects as children of this one.
|
| public void | addListChangeListener(String
The name of the list for which the listener will be notified when the content
of the list has changed listName, IListChangeListener<T> The listener to be notified upon changes listener)Implements org. IListChangeListener for the specified list.
|
| protected boolean | Returns: true if both have equivalent children; false otherwiseThe stateObject)StateObject to compare its children to this one's childrenDetermines whether the children of this |
| public boolean | canMoveDown(T
The stateObject)StateObject that could potentially be moved downImplements org. StateObject can be moved down by one position in the
list owned by its parent.
|
| public boolean | canMoveUp(T
The stateObject)StateObject that could potentially be moved upImplements org. StateObject can be moved up by one position in the list
owned by its parent.
|
| public T | getItem(int
The position of the index)StateObject to retrieveImplements org. StateObject at the given positions from the list
|
| public boolean | hasItems()
Implements org. StateObject has any children.
|
| protected void | initialize()
Overrides org. |
| public ListIterable | items()
Implements org. ListIterable over the children.
|
| public int | itemsSize()
Implements org. |
| protected abstract String | Returns: The unique name identifying the listReturns the name that is uniquely identifying the list. |
| public T | moveDown(T
The item)StateObject to move down in the listImplements org. StateObject down by one position in the list owned by its parent.
|
| public T | moveUp(T
The item)StateObject to move up in the listImplements org. StateObject up by one position in the list owned by its parent.
|
| public void | removeItem(T
The child stateObject)StateObject to not longer be a childImplements org. StateObject from the list of children.
|
| public void | removeItems(Collection<T>
The items)StateObjects to remove from this oneImplements org. StateObject from the list of children.
|
| public void | removeListChangeListener(String
The name of the list for which the listener was registered listName, IListChangeListener<T> The listener to unregister listener)Implements org. IListChangeListener that was registered for the specified list.
|
| protected void | toStringItems(Appendable
The writer used to print out the string representation writer, boolean Determines whether a comma should be added after each item, except after the
last one useComma)Adds to the given writer a crude string representation of the children of this one. |
| items | back to summary |
|---|---|
| private List<T> items The list of children owned by this one. | |
| AbstractListHolderStateObject | back to summary |
|---|---|
| protected AbstractListHolderStateObject(StateObject parent) Creates a new
| |
| AbstractListHolderStateObject | back to summary |
|---|---|
| protected AbstractListHolderStateObject(StateObject parent, List<? extends T> items) Creates a new
| |
| AbstractListHolderStateObject | back to summary |
|---|---|
| protected AbstractListHolderStateObject(StateObject parent, T... items) Creates a new
| |
| addChildren | back to summary |
|---|---|
| protected void addChildren(List<StateObject> children) Overrides org. Doc from org. Adds the children of this
| |
| addItem | back to summary |
|---|---|
| public <S extends T> S addItem(S item) Implements org. Doc from org. Adds the given
| |
| addItems | back to summary |
|---|---|
| public void addItems(List<? extends T> items) Implements org. Doc from org. Adds the given list of
| |
| addListChangeListener | back to summary |
|---|---|
| public void addListChangeListener(String listName, IListChangeListener<T> listener) Implements org. Doc from org. Registers the given
| |
| areChildrenEquivalent | back to summary |
|---|---|
| protected boolean areChildrenEquivalent(AbstractListHolderStateObject<? extends StateObject> stateObject) Determines whether the children of this
| |
| canMoveDown | back to summary |
|---|---|
| public boolean canMoveDown(T stateObject) Implements org. Doc from org. Determines whether the given
| |
| canMoveUp | back to summary |
|---|---|
| public boolean canMoveUp(T stateObject) Implements org. Doc from org. Determines whether the given
| |
| getItem | back to summary |
|---|---|
| public T getItem(int index) Implements org. Doc from org. Returns the
| |
| hasItems | back to summary |
|---|---|
| public boolean hasItems() Implements org. Doc from org. Determines whether this
| |
| initialize | back to summary |
|---|---|
| protected void initialize() Overrides org. Doc from org. Initializes this state object.
| |
| items | back to summary |
|---|---|
| public ListIterable Implements org. Doc from org. Returns an
| |
| itemsSize | back to summary |
|---|---|
| public int itemsSize() Implements org. Doc from org. Returns the number of children this list holder has.
| |
| listName | back to summary |
|---|---|
| protected abstract String listName() Returns the name that is uniquely identifying the list.
| |
| moveDown | back to summary |
|---|---|
| public T moveDown(T item) Implements org. Doc from org. Moves the given
| |
| moveUp | back to summary |
|---|---|
| public T moveUp(T item) Implements org. Doc from org. Moves the given
| |
| removeItem | back to summary |
|---|---|
| public void removeItem(T stateObject) Implements org. Doc from org. Removes the given
| |
| removeItems | back to summary |
|---|---|
| public void removeItems(Collection<T> items) Implements org. Doc from org. Removes the given
| |
| removeListChangeListener | back to summary |
|---|---|
| public void removeListChangeListener(String listName, IListChangeListener<T> listener) Implements org. Doc from org. Unregisters the given
| |
| toStringItems | back to summary |
|---|---|
| protected void toStringItems(Appendable writer, boolean useComma) throws IOException Adds to the given writer a crude string representation of the children of this one.
| |