| java.lang.Object xtc.xform.Item
Item | public class Item (Code) | | A tree item contained in a sequence.
author: Joe Pamer version: $Revision: 1.18 $ |
Constructor Summary | |
public | Item() Create a new item. | public | Item(Object object, Item parent, int index) Create a new item. | public | Item(Object object, Item parent, int index, List<Item> children) Create a new item. | public | Item(Item i) Create a new that is a copy of an existing item. |
Method Summary | |
public void | addChild(Item child) Add a new child to the item. | public void | addChild(Item child, int index) Add a new child at the specified index. | public void | addChildren(List<Item> children) Add a collection of new children to an item. | public void | addChildren(List<Item> children, int index) Insert a collection of new children at the specified index. | public List<Object> | addToList(List<Object> list) Add to a list (only if it's not already a member of the list).
Parameters: list - The list to be added to. | public boolean | equals(Object o) Test for equality.
Parameters: o - The object to test for equality. | public List<Item> | getChildren() Get the item's children. | public int | getIndex() Get the item's index. | public Object | getObject() Get the item's object. | public Item | getParent() Get the item's parent. | public void | removeChild(int index) Remove the child at the specified index. | public void | replaceChild(int index, Item item) Replace the item at the specified index with the given item. | public void | replaceChild(int index, List<Item> items) Replace the item at the specified index with the given list of items. | public String | toString() Return the item as a string value. |
index | int index(Code) | | The item's child index in the parent item.
|
Item | public Item()(Code) | | Create a new item.
|
Item | public Item(Object object, Item parent, int index)(Code) | | Create a new item.
Parameters: object - The item object. Parameters: parent - The item's parent. Parameters: index - The item's child index. |
Item | public Item(Object object, Item parent, int index, List<Item> children)(Code) | | Create a new item.
Parameters: object - The item object. Parameters: parent - The item's parent. Parameters: index - The item's child index. Parameters: children - The item's child items. |
Item | public Item(Item i)(Code) | | Create a new that is a copy of an existing item.
Parameters: i - The item object. |
addChild | public void addChild(Item child)(Code) | | Add a new child to the item.
Parameters: child - The new child item. |
addChild | public void addChild(Item child, int index)(Code) | | Add a new child at the specified index.
Parameters: child - The new child item. Parameters: index - The index. |
addChildren | public void addChildren(List<Item> children)(Code) | | Add a collection of new children to an item.
Parameters: children - The new children. |
addChildren | public void addChildren(List<Item> children, int index)(Code) | | Insert a collection of new children at the specified index.
Parameters: children - The children to insert. Parameters: index - The index to insert at. |
addToList | public List<Object> addToList(List<Object> list)(Code) | | Add to a list (only if it's not already a member of the list).
Parameters: list - The list to be added to. The potentially modified list. |
equals | public boolean equals(Object o)(Code) | | Test for equality.
Parameters: o - The object to test for equality. True if o is equal, false otherwise. |
getChildren | public List<Item> getChildren()(Code) | | Get the item's children.
The item's children. |
getIndex | public int getIndex()(Code) | | Get the item's index.
The item's index. |
getObject | public Object getObject()(Code) | | Get the item's object.
The item's object. |
getParent | public Item getParent()(Code) | | Get the item's parent.
The item's parent item. |
removeChild | public void removeChild(int index)(Code) | | Remove the child at the specified index.
Parameters: index - The index of the child to eliminate. |
replaceChild | public void replaceChild(int index, Item item)(Code) | | Replace the item at the specified index with the given item.
Parameters: index - The index of the child to be replaced. Parameters: item - The item to make the replacement with. |
replaceChild | public void replaceChild(int index, List<Item> items)(Code) | | Replace the item at the specified index with the given list of items.
Parameters: index - The index of the child to be replaced. Parameters: items - The items to make the replacement with. |
toString | public String toString()(Code) | | Return the item as a string value.
The item as a string. |
|
|