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

Method keyPressed

src/main/java/gate/gui/MainFrame.java:1313–1327  ·  view source on GitHub ↗
(KeyEvent e)

Source from the content-addressed store, hash-verified

1311
1312 resourcesTree.addKeyListener(new KeyAdapter() {
1313 @Override
1314 public void keyPressed(KeyEvent e) {
1315 if(e.getKeyCode() == KeyEvent.VK_ENTER) {
1316 // shows in the central tabbed pane, the selected resources
1317 // in the resource tree when the Enter key is pressed
1318 (new ShowSelectedResourcesAction()).actionPerformed(null);
1319 } else if(e.getKeyCode() == KeyEvent.VK_DELETE) {
1320 // close selected resources from GATE
1321 (new CloseSelectedResourcesAction()).actionPerformed(null);
1322 } else if(e.getKeyCode() == KeyEvent.VK_DELETE
1323 && e.getModifiers() == InputEvent.SHIFT_DOWN_MASK) {
1324 // close recursively selected resources from GATE
1325 (new CloseRecursivelySelectedResourcesAction()).actionPerformed(null);
1326 }
1327 }
1328 });
1329
1330 resourcesTree.addMouseListener(new MouseAdapter() {

Callers

nothing calls this directly

Calls 1

actionPerformedMethod · 0.45

Tested by

no test coverage detected