| | |
| | | public void itemStateChanged(ItemEvent ev) |
| | | { |
| | | if (!ignoreSelectionEvents && |
| | | (ev.getStateChange() == ItemEvent.SELECTED)) |
| | | ev.getStateChange() == ItemEvent.SELECTED) |
| | | { |
| | | repopulateTree(treePane.getTree()); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | expand = tree.isExpanded(new TreePath(parent)) || |
| | | (parent.getChildCount() == 0); |
| | | expand = tree.isExpanded(new TreePath(parent)) || parent.getChildCount() == 0; |
| | | parent.removeAllChildren(); |
| | | } |
| | | for (AbstractIndexTreeNode node : nodes.get(i)) |
| | | { |
| | | parent.add(node); |
| | | if ((newSelectionPath == null) && |
| | | ((lastSelectedNode != null) || (lastCreatedIndex != null))) |
| | | if (newSelectionPath == null && |
| | | (lastSelectedNode != null || lastCreatedIndex != null)) |
| | | { |
| | | if (lastCreatedIndex != null) |
| | | { |
| | | if ((node instanceof IndexTreeNode) && |
| | | (lastCreatedIndex instanceof IndexDescriptor)) |
| | | if (node instanceof IndexTreeNode && |
| | | lastCreatedIndex instanceof IndexDescriptor) |
| | | { |
| | | if (node.getName().equals(lastCreatedIndex.getName())) |
| | | { |
| | |
| | | ViewPositions pos = Utilities.getViewPositions(entryPane); |
| | | TreePath[] paths = treePane.getTree().getSelectionPaths(); |
| | | TreePath path = null; |
| | | if ((paths != null) && (paths.length == 1)) |
| | | if (paths != null && paths.length == 1) |
| | | { |
| | | path = paths[0]; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | if ((paths != null) && (paths.length > 1)) |
| | | if (paths != null && paths.length > 1) |
| | | { |
| | | entryPane.displayMultiple(); |
| | | } |