|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.data.BaseModelData
com.extjs.gxt.ui.client.data.BaseModel
com.extjs.gxt.ui.client.data.BaseTreeModel<T>
public class BaseTreeModel<T extends TreeModel>
Default implementation of the TreeModel interface.
| Field Summary |
|---|
| Fields inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource |
|---|
Add, Remove, Update |
| Constructor Summary | |
|---|---|
BaseTreeModel()
Creates a new model instance. |
|
BaseTreeModel(java.util.Map<java.lang.String,java.lang.Object> properties)
Creates a new model instance with the specified properties. |
|
BaseTreeModel(T parent)
Creates a new model instance. |
|
| Method Summary | |
|---|---|
void |
add(T child)
Adds a child to the model and fires an ChangeEventSource.Add event. |
T |
getChild(int index)
Returns the child at the given index or null if the index is
out of range. |
int |
getChildCount()
Returns the number of children. |
java.util.List<T> |
getChildren()
Returns the model's children. |
T |
getParent()
Returns the model's parent or null if no parent. |
int |
indexOf(T child)
Returns the index of the child. |
void |
insert(T child,
int index)
Inserts a child to the model and fires an ChangeEventSource.Add
event. |
boolean |
isLeaf()
Returns true if the model is a leaf and has children. |
void |
notify(ChangeEvent evt)
Notifies listeners of the given change event. |
void |
remove(int index)
Removes the child at the given index. |
void |
remove(T child)
Removes the child from the model and fires a ChangeEventSource.Remove event. |
void |
removeAll()
Removes all the children. |
void |
setChildren(java.util.List<T> children)
Sets the model's children. |
void |
setParent(T parent)
Sets the model's parent. |
| Methods inherited from class com.extjs.gxt.ui.client.data.BaseModel |
|---|
addChangeListener, addChangeListener, remove, removeChangeListener, removeChangeListeners, set, setSilent |
| Methods inherited from class com.extjs.gxt.ui.client.data.BaseModelData |
|---|
get, get, getProperties, getPropertyNames, isAllowNestedValues, setAllowNestedValues, setProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.extjs.gxt.ui.client.data.ModelData |
|---|
get, getProperties, getPropertyNames, remove, set |
| Methods inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource |
|---|
addChangeListener, removeChangeListener, removeChangeListeners, setSilent |
| Constructor Detail |
|---|
public BaseTreeModel()
public BaseTreeModel(java.util.Map<java.lang.String,java.lang.Object> properties)
properties - the initial propertiespublic BaseTreeModel(T parent)
parent - the parent| Method Detail |
|---|
public void add(T child)
ChangeEventSource.Add event.
add in interface TreeModel<T extends TreeModel>child - the child to be addedpublic T getChild(int index)
null if the index is
out of range.
getChild in interface TreeModel<T extends TreeModel>index - the index to be retrieved
public int getChildCount()
getChildCount in interface TreeModel<T extends TreeModel>public java.util.List<T> getChildren()
getChildren in interface TreeModel<T extends TreeModel>public T getParent()
null if no parent.
getParent in interface TreeModel<T extends TreeModel>public int indexOf(T child)
TreeModel
indexOf in interface TreeModel<T extends TreeModel>child - the child
public void insert(T child,
int index)
ChangeEventSource.Add
event.
insert in interface TreeModel<T extends TreeModel>child - the child to be insertedindex - the location to insert the childpublic boolean isLeaf()
TreeModel
isLeaf in interface TreeModel<T extends TreeModel>public void notify(ChangeEvent evt)
ChangeEventSource
notify in interface ChangeEventSourcenotify in class BaseModelevt - the change eventpublic void remove(int index)
index - the child indexpublic void remove(T child)
ChangeEventSource.Remove event.
remove in interface TreeModel<T extends TreeModel>child - the child to be removedpublic void removeAll()
TreeModel
removeAll in interface TreeModel<T extends TreeModel>public void setChildren(java.util.List<T> children)
children - the children to be setpublic void setParent(T parent)
TreeModel
setParent in interface TreeModel<T extends TreeModel>parent - the new parent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||