diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:08:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 10:24:10 +0200 |
commit | 34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch) | |
tree | 4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /odk/examples/java/Inspector/HideableTreeModel.java | |
parent | We seem to need the tdoc UCP for saving (diff) | |
download | core-34bcf9b498bccb5c924f4cec850ff15d88df6f07.tar.gz core-34bcf9b498bccb5c924f4cec850ff15d88df6f07.zip |
java: remove dead methods
found by UCDetector
Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'odk/examples/java/Inspector/HideableTreeModel.java')
-rw-r--r-- | odk/examples/java/Inspector/HideableTreeModel.java | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/odk/examples/java/Inspector/HideableTreeModel.java b/odk/examples/java/Inspector/HideableTreeModel.java index 7add3d723cd7..6fea28681b7b 100644 --- a/odk/examples/java/Inspector/HideableTreeModel.java +++ b/odk/examples/java/Inspector/HideableTreeModel.java @@ -84,9 +84,7 @@ public class HideableTreeModel implements TreeModel { } - public void reload() { - reload(getRoot()); - } + private void reload(Object node) { @@ -101,9 +99,7 @@ public class HideableTreeModel implements TreeModel { nodeChanged(path.getLastPathComponent()); } - public void nodeInserted(Object node, Object child) { - nodeInserted(node, child, -1); - } + public void nodeInserted(Object node, Object child, int index) { @@ -164,11 +160,7 @@ public class HideableTreeModel implements TreeModel { } - public ArrayList<TreePath> getExpandedPaths(JTree tree) { - ArrayList<TreePath> expandedPaths = new ArrayList<TreePath>(); - addExpandedPaths(tree, tree.getPathForRow(0), expandedPaths); - return expandedPaths; - } + private void addExpandedPaths(JTree tree, TreePath path, ArrayList<TreePath> pathlist) { @@ -181,11 +173,7 @@ public class HideableTreeModel implements TreeModel { } - public void expandPaths(JTree tree, ArrayList<TreePath> pathlist) { - for(int i = 0; i < pathlist.size(); i++) { - tree.expandPath(pathlist.get(i)); - } - } + public boolean isLeaf(Object _oNode) { @@ -241,23 +229,10 @@ public class HideableTreeModel implements TreeModel { } - public boolean isPathToNodeVisible(Object node) { - Object[] path = getPathToRoot(node); - for(int i = 0; i < path.length; i++) { - if(!isNodeVisible(path[i])) { - return false; - } - } - return true; - } - public void ensurePathToNodeVisible(Object node) { - Object[] path = getPathToRoot(node); - for(int i = 0; i < path.length; i++) { - setNodeVisible(path[i], true); - } - } + + public Object getChild(Object parent, int index) { |