| graphical.DragListView
DragListView | public class DragListView extends ListView implements DragDestination,DragSource,DragPolicy(Code) | | DragListView.
Open Issues
- Passing in a BinaryTree is optional and is only
managed if null checks out. It is somewhat tempting
to argue that BTreeNodes should be smartened up
to know their BinaryTree membership and that ListItem.data()
turning out to be a BTreeNode would automatically trigger
correct data management. But not today.
- Or maybe it checks to see if the parent is a TreeView
and obtains the BinaryTree. May cost a ping though.
- Actually, it isn't clear that it's needed at all.
- Policy refinements (branchesFrom, sortTo, dupeTo) should be
crammed into a bit flag. Also, they are incompletely
implemented.
Actually, they're a total hack.
- And branches from should probably be 1) restricted to
BinaryTree users and 2) optionally take branch or
branch plus subbranch.
|
Field Summary | |
public boolean | branchesFrom Allow branches to be dragged from origin or allow only
end nodes. | public boolean | dupeTo Unduplicate target. | public boolean | sortTo Maintain sort on target. | public Image | toImage Image to be set when an item is dragged to a list. | public Image | toSelectedImage Image to be set when an item is dragged to a list. |
Constructor Summary | |
public | DragListView() Constructs an empty DragListView. | public | DragListView(Rect rect, int dragSourcePolicy, int dragDestinationPolicy, Image dragImage) Constructs a DragListView with bounds rect. | public | DragListView(int x, int y, int width, int height, int dragSourcePolicy, int dragDestinationPolicy, Image dragImage) Constructs an empty DragListView with the given bounds. |
branchesFrom | public boolean branchesFrom(Code) | | Allow branches to be dragged from origin or allow only
end nodes.
Only end nodes are currently supported.
Default is false: only end nodes are allowed to be dragged from.
|
dupeTo | public boolean dupeTo(Code) | | Unduplicate target.
Do or do not allow duplicate nodes on the list.
Default is false: disallow duplicates.
|
sortTo | public boolean sortTo(Code) | | Maintain sort on target.
BinaryTrees not supported (they may support themselves).
Default is false.
SGP: actually, nothing is supported.
|
toImage | public Image toImage(Code) | | Image to be set when an item is dragged to a list.
SGP: maybe not publicy.
|
toSelectedImage | public Image toSelectedImage(Code) | | Image to be set when an item is dragged to a list.
SGP: maybe not publicy.
|
DragListView | public DragListView()(Code) | | Constructs an empty DragListView.
|
DragListView | public DragListView(Rect rect, int dragSourcePolicy, int dragDestinationPolicy, Image dragImage)(Code) | | Constructs a DragListView with bounds rect.
Parameters: rect - rectangle Parameters: dragSourcePolicy - drag source policy Parameters: dragDestinationPolicy - drag destination policy Parameters: dragImage - drag image |
DragListView | public DragListView(int x, int y, int width, int height, int dragSourcePolicy, int dragDestinationPolicy, Image dragImage)(Code) | | Constructs an empty DragListView with the given bounds.
Parameters: x - x Parameters: y - y Parameters: width - width Parameters: height - height Parameters: dragSourcePolicy - drag source policy Parameters: dragDestinationPolicy - drag destination policy Parameters: dragImage - drag image |
acceptsDrag | public DragDestination acceptsDrag(DragSession ds, int x, int y)(Code) | | |
clipSortAndPaste | public boolean clipSortAndPaste(BTListItem listItem)(Code) | | Checks to see if suggested subtree has moved in the BinaryTree
but is not correctly reflected in the ListView.
If yes, cuts and moves it.
Use with caution.
Returns "true" if any changes were made.
|
dragDropped | public boolean dragDropped(DragSession ds)(Code) | | |
dragEntered | public boolean dragEntered(DragSession ds)(Code) | | |
dragExited | public void dragExited(DragSession ds)(Code) | | |
dragMoved | public boolean dragMoved(DragSession ds)(Code) | | |
dragWasAccepted | public void dragWasAccepted(DragSession ds)(Code) | | |
dragWasRejected | public boolean dragWasRejected(DragSession ds)(Code) | | |
getDestinationTarget | public Target getDestinationTarget()(Code) | | |
getDragImage | public Image getDragImage()(Code) | | |
getSourceTarget | public Target getSourceTarget()(Code) | | |
minItemWidth | public int minItemWidth()(Code) | | |
mouseDown | public boolean mouseDown(MouseEvent e)(Code) | | |
mouseDragged | public void mouseDragged(MouseEvent e)(Code) | | |
mouseEntered | public void mouseEntered(MouseEvent e)(Code) | | |
mouseExited | public void mouseExited(MouseEvent e)(Code) | | |
mouseMoved | public void mouseMoved(MouseEvent e)(Code) | | |
mouseUp | public void mouseUp(MouseEvent e)(Code) | | |
selectEmpty | public void selectEmpty()(Code) | | |
setDestinationTarget | public void setDestinationTarget(Target t)(Code) | | |
setDragDroppedNotificationCommand | public void setDragDroppedNotificationCommand(String cmd)(Code) | | Drag dropped notification command, sent when Category dropped.
|
setDragDroppedNotificationTarget | public void setDragDroppedNotificationTarget(Target target)(Code) | | Drag dropped notification target, sent when Category dropped.
|
setDragImage | public void setDragImage(Image dragImage)(Code) | | |
setSourceTarget | public void setSourceTarget(Target t)(Code) | | |
sizeListView | public void sizeListView()(Code) | | |
sourceView | public View sourceView(DragSession ds)(Code) | | |
|
|