|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of the read-only nodes the model exposesM
- the type of the modifiable nodes the model exposespublic interface TreeModelController<T,M extends Modifiable>
This interface provides a controller for tree models which allows updating a
model.
The insert(Object, Object, Object)
method inserts the specified node
according to these rules:
null
, the specified
node becomes the new root node of the model; the old root node will be the
sole child of the new root node. All nodes of the model controller are
preserved.null
and "aParent" is not null
,
the node is appended as the last child of "aParent"null
, the node is inserted as
a child of the given parent before the specified sibling.
Method Summary | |
---|---|
boolean |
confirmDelete(T aNode)
Indicates if the specified node may be deleted. |
boolean |
confirmInsert(T aParent)
Indicates if a node may be inserted below the specified parent node. |
boolean |
confirmInsert(T aNode,
T aParent,
T aNext)
Indicates if the specified node may be inserted into the location specified by a parent node and a next node. |
void |
delete(T aNode)
Deletes a node from the model. |
void |
insert(T aNode,
T aParent,
T aNext)
Inserts the node at the specified location in the tree model controller. |
Methods inherited from interface com.ibm.portal.TreeModel |
---|
getChildren, getParent, getRoot, hasChildren |
Methods inherited from interface com.ibm.portal.ModelController |
---|
confirmCreate, confirmGetModifiableNode, create, getModifiableNode, resolve |
Method Detail |
---|
void insert(T aNode, T aParent, T aNext) throws ObjectNotFoundException, CannotInsertNodeException
aNode
- node to insertaParent
- parent node for the node to insert; may be null
;
if specified it must be part of the topology of the controlleraNext
- successor node for the node to insert; may be
null
. "aNext" must be a child of "aParent".
ObjectNotFoundException
- in case one or more specified nodes cannot be found
CannotInsertNodeException
- the node cannot be insertedvoid delete(T aNode) throws ObjectNotFoundException, CannotDeleteNodeException
aNode
- the node to delete from the model.
ObjectNotFoundException
- in case the node cannot be found
CannotDeleteNodeException
- in case the node cannot be deletedboolean confirmInsert(T aNode, T aParent, T aNext) throws ObjectNotFoundException
aNode
- node for which to indicate if it may be insertedaParent
- parent node; may be null
.aNext
- successor node; may be null
, "aNext" must be a
child of "aParent".
true
if the node may be inserted,
false
otherwise
ObjectNotFoundException
- in case one or more specified nodes cannot be foundboolean confirmInsert(T aParent) throws ObjectNotFoundException
aParent
- parent node; may be null
.
true
if a node may be inserted,
false
otherwise
ObjectNotFoundException
- in case the specified node cannot be foundboolean confirmDelete(T aNode) throws ObjectNotFoundException
aNode
- node for which to indicate if it may be deleted.
true
if the node may be deleted,
false
otherwise
ObjectNotFoundException
- in case the node cannot be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |