1 | void propertyChange(PropertyChangeEvent e) {↵ | | 1 | void propertyChange(PropertyChangeEvent e) {↵
|
2 | Object o = e.getNewValue();↵ | | 2 | Object o = e.getNewValue();↵
|
3 | if (o instanceof JComponent)↵ | | 3 | if (o instanceof JComponent)↵
|
4 | focusOwner = (JComponent) o;↵ | | 4 | focusOwner = (JComponent) o;↵
|
5 | else↵ | | 5 | else↵
|
6 | focusOwner = null;↵ | | 6 | focusOwner = null;↵
|
|
7 | }↵ | | 7 | }↵
|
|
8 | /**↵ | | 8 | /**↵
|
9 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)↵ | | 9 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)↵
|
10 | */↵ | | 10 | */↵
|
11 | public void actionPerformed(ActionEvent e) {↵ | | 11 | public void actionPerformed(ActionEvent e) {↵
|
|
12 | if (focusOwner == null)↵ | | 12 | if (focusOwner == null)↵
|
13 | return;↵ | | 13 | return;↵
|
|
14 | String action = (String) e.getActionCommand();↵ | | 14 | String action = (String) e.getActionCommand();↵
|
15 | Action a = focusOwner.getActionMap().get(action);↵ | | 15 | Action a = focusOwner.getActionMap().get(action);↵
|
16 | if (a != null)↵ | | 16 | if (a != null)↵
|
17 | a.actionPerformed(new ActionEvent(focusOwner,↵ | | 17 | a.actionPerformed(new ActionEvent(focusOwner,↵
|
18 | ActionEvent.ACTION_PERFORMED, null));↵ | | 18 | ActionEvent.ACTION_PERFORMED, null));↵
|
|
19 | }↵ | | 19 | }↵
|
|
20 | /**↵ | | 20 | /**↵
|
21 | * @see org.columba.core.gui.action.AbstractColumbaAction#isSingleton()↵ | | 21 | * @see org.columba.core.gui.action.AbstractColumbaAction#isSingleton()↵
|
22 | */↵ | | 22 | */↵
|
23 | public boolean isSingleton() {↵ | | 23 | public boolean isSingleton() {↵
|
24 | return true;↵ | | 24 | return true;↵
|
25 | | | 25 |
|