Changeset 9464
- Timestamp:
- 2005-03-18T13:44:38+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/tree/DragTree.java
r8994 r9464 345 345 if(isValidDrop(target_path)) { 346 346 target = (FileNode) target_path.getLastPathComponent(); 347 } else if (isValidDropOntoFile(target_path)) { 348 target = (FileNode) target_path.getParentPath().getLastPathComponent(); 347 349 } 348 350 } … … 628 630 } 629 631 632 private boolean isValidDropOntoFile(TreePath target_path) { 633 boolean valid = false; 634 if(target_path != null) { 635 FileNode target_node = (FileNode) target_path.getLastPathComponent(); 636 if (target_node.isLeaf()) { 637 // check the parent node for being a valid drop 638 return isValidDrop(target_path.getParentPath()); 639 } 640 } 641 return false; 642 } 643 644 630 645 private boolean isValidDrop(TreePath target_path) { 631 646 boolean valid = false;
Note:
See TracChangeset
for help on using the changeset viewer.