MCPcopy Create free account
hub / github.com/GateNLP/gate-core / valueChanged

Method valueChanged

src/main/java/gate/gui/MainFrame.java:1511–1530  ·  view source on GitHub ↗
(TreeSelectionEvent e)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

getUserConfigMethod · 0.95
selectMethod · 0.95
getBooleanMethod · 0.80
getLastPathComponentMethod · 0.80
getNameMethod · 0.65
viewsBuiltMethod · 0.65
getLargeViewMethod · 0.65

Tested by

no test coverage detected