com.leafdigital.ui.api
Interface TreeBox.DragSingleSelectionHandler

All Superinterfaces:
TreeBox.Handler, TreeBox.SingleSelectionHandler
Enclosing interface:
TreeBox

public static interface TreeBox.DragSingleSelectionHandler
extends TreeBox.SingleSelectionHandler

Interface to implement if you need to know about selection and dragging


Method Summary
 boolean canDrag(TreeBox.Item i)
           
 boolean canDragTo(TreeBox.Item moving, TreeBox.Item parent, int position)
           
 void dragTo(TreeBox.Item moving, TreeBox.Item parent, int position)
           
 
Methods inherited from interface com.leafdigital.ui.api.TreeBox.SingleSelectionHandler
selected
 
Methods inherited from interface com.leafdigital.ui.api.TreeBox.Handler
getRoot, isRootDisplayed
 

Method Detail

canDrag

boolean canDrag(TreeBox.Item i)
Parameters:
i - Item to drag
Returns:
True if the given item can be dragged

canDragTo

boolean canDragTo(TreeBox.Item moving,
                  TreeBox.Item parent,
                  int position)
Parameters:
moving - Item being dragged
parent - New parent for item
position - New index to insert at within parent. This index accounts for the assumed removal of the item being dragged first.
Returns:
True if item can be dragged there or false to give X cursor

dragTo

void dragTo(TreeBox.Item moving,
            TreeBox.Item parent,
            int position)
Parameters:
moving - Item that's been dragged
parent - New parent for item
position - New index to insert at within parent. This index accounts for the assumed removal of the item being dragged first.


Copyright © 2011 Samuel Marshall. All rights reserved.