|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Model for ChangeOrderMgr
Method Summary | |
boolean |
mayMove(java.lang.Object scope,
java.lang.Object node)
returns true, if node may be moved |
void |
move(java.lang.Object scope,
java.lang.Object item,
int oldIndex,
int newIndex)
called after the user has clicked on an item to move it. |
Method Detail |
public boolean mayMove(java.lang.Object scope, java.lang.Object node)
public void move(java.lang.Object scope, java.lang.Object item, int oldIndex, int newIndex)
oldIndex
is removed from the array, so the size
of the array is reduced by one. After that, the element is inserted at the
index newIndex
. A valid implementation would be:
ArrayList al = ... Object o = al.remove(oldIndex); al.add(newIndex, o);
scope
- the scope for the node to move (for convenience).item
- the node to move (for convenience), which lives at position oldIndexoldIndex
- the index of item
before it was movednewIndex
- the index of item
after it has been movedChangeOrderUtils
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |