public interface RearrangeableTreeModel extends TreeModel
Modifier and Type | Interface and Description |
---|---|
static class |
RearrangeableTreeModel.IllegalNodeMoveException
Thrown when an invalid move is attempted.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canDemote(Collection<TreePath> pPaths) |
boolean |
canMoveDown(Collection<TreePath> pPaths) |
boolean |
canMoveUp(Collection<TreePath> pPaths) |
boolean |
canPromote(Collection<TreePath> pPaths) |
void |
demote(Collection<TreePath> pPaths)
Move nodes one level further from the root.
|
void |
moveDown(Collection<TreePath> pPaths)
Move nodes one space lower (swap with successors).
|
void |
moveUp(Collection<TreePath> pPaths)
Move nodes one space higher (swap with predecessors).
|
void |
promote(Collection<TreePath> pPaths)
Move nodes one level closer to the root.
|
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged
boolean canPromote(Collection<TreePath> pPaths)
boolean canDemote(Collection<TreePath> pPaths)
boolean canMoveUp(Collection<TreePath> pPaths)
boolean canMoveDown(Collection<TreePath> pPaths)
void promote(Collection<TreePath> pPaths) throws RearrangeableTreeModel.IllegalNodeMoveException
| |
Promote[AD] | Promote [AD, ADF] |
|
|
pPaths
- Paths to be moved.UnsupportedOperationException
- If implementor does not
allow promotions.RearrangeableTreeModel.IllegalNodeMoveException
void demote(Collection<TreePath> pPaths) throws RearrangeableTreeModel.IllegalNodeMoveException
pPaths
- Paths to be moved.UnsupportedOperationException
- If implementor does not
allow promotions.RearrangeableTreeModel.IllegalNodeMoveException
void moveUp(Collection<TreePath> pPaths) throws RearrangeableTreeModel.IllegalNodeMoveException
pPaths
- Paths to be moved.UnsupportedOperationException
- If implementor does not
allow promotions.RearrangeableTreeModel.IllegalNodeMoveException
void moveDown(Collection<TreePath> pPaths) throws RearrangeableTreeModel.IllegalNodeMoveException
pPaths
- Paths to be moved.UnsupportedOperationException
- If implementor does not
allow promotions.RearrangeableTreeModel.IllegalNodeMoveException
Copyright © 2023. All rights reserved.