(int index)
| 170 | } |
| 171 | |
| 172 | public void showTree(int index) { |
| 173 | if (isRootingOn() && getRootingType() == TreePane.RootingType.USER_ROOTING) { |
| 174 | JOptionPane.showMessageDialog(frame, "Cannot switch trees when user rooting option is on.\n" + |
| 175 | "Turn this option off to switch trees", |
| 176 | "Unable to switch trees", |
| 177 | JOptionPane.ERROR_MESSAGE); |
| 178 | return; |
| 179 | } |
| 180 | |
| 181 | Tree tree = trees.get(index); |
| 182 | if (tree instanceof RootedTree) { |
| 183 | treePane.setTree((RootedTree)tree); |
| 184 | } else { |
| 185 | treePane.setTree(Utils.rootTheTree(tree)); |
| 186 | } |
| 187 | |
| 188 | currentTreeIndex = index; |
| 189 | fireTreeChanged(); |
| 190 | } |
| 191 | |
| 192 | public void showNextTree() { |
| 193 | if (currentTreeIndex < trees.size() - 1) { |
no test coverage detected