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

Method actionPerformed

src/main/java/gate/swing/JMenuButton.java:47–59  ·  view source on GitHub ↗
(ActionEvent e)

Source from the content-addressed store, hash-verified

45 addActionListener(new ActionListener() {
46
47 @Override
48 public void actionPerformed(ActionEvent e) {
49 if(menu != null) menu.setSelected(isSelected());
50 if(isSelected()) {
51 // show the popup
52 Point p = getPopupMenuOrigin();
53 popup.show(JMenuButton.this, p.x, p.y);
54 }
55 else {
56 // hide the popup
57 popup.setVisible(false);
58 }
59 }
60 });
61
62 popup.addPopupMenuListener(new PopupMenuListener(){

Callers

nothing calls this directly

Calls 5

getPopupMenuOriginMethod · 0.95
setSelectedMethod · 0.80
isSelectedMethod · 0.80
showMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected