(TreeSelectionEvent e)
| 1509 | |
| 1510 | resourcesTree.addTreeSelectionListener(new TreeSelectionListener() { |
| 1511 | @Override |
| 1512 | public void valueChanged(TreeSelectionEvent e) { |
| 1513 | if (!Gate.getUserConfig().getBoolean( |
| 1514 | MainFrame.class.getName()+".treeselectview")) { |
| 1515 | return; |
| 1516 | } |
| 1517 | // synchronise the selected tabbed pane with |
| 1518 | // the resource tree selection |
| 1519 | if (resourcesTree.getSelectionPaths() != null |
| 1520 | && resourcesTree.getSelectionPaths().length == 1) { |
| 1521 | Object value = e.getPath().getLastPathComponent(); |
| 1522 | Object object = ((DefaultMutableTreeNode)value).getUserObject(); |
| 1523 | if (object instanceof Handle |
| 1524 | && ((Handle)object).viewsBuilt() |
| 1525 | && (mainTabbedPane.indexOfComponent( |
| 1526 | ((Handle)object).getLargeView()) != -1)) { |
| 1527 | select((Handle)object); |
| 1528 | } |
| 1529 | } |
| 1530 | } |
| 1531 | }); |
| 1532 | |
| 1533 | // define keystrokes action bindings at the level of the main window |
nothing calls this directly
no test coverage detected