1 | class MouseHandler extends MouseAdapter↵ | | 1 | class MouseHandler extends MouseAdapter↵
|
2 | {↵ | | 2 | {↵
|
3 | boolean msgSet = false;↵ | | 3 | boolean msgSet = false;↵
|
|
4 | public void mouseReleased(MouseEvent evt)↵ | | 4 | public void mouseReleased(MouseEvent evt)↵
|
5 | {↵ | | 5 | {↵
|
6 | if(msgSet)↵ | | 6 | if(msgSet)↵
|
7 | {↵ | | 7 | {↵
|
8 | GUIUtilities.getView((Component)evt.getSource())↵ | | 8 | GUIUtilities.getView((Component)evt.getSource())↵
|
9 | .getStatus().setMessage(null);↵ | | 9 | .getStatus().setMessage(null);↵
|
10 | msgSet = false;↵ | | 10 | msgSet = false;↵
|
11 | }↵ | | 11 | }↵
|
12 | }↵ | | 12 | }↵
|
|
13 | public void mouseEntered(MouseEvent evt)↵ | | 13 | public void mouseEntered(MouseEvent evt)↵
|
14 | {↵ | | 14 | {↵
|
15 | String msg = jEdit.getProperty(action + ".mouse-over");↵ | | 15 | String msg = jEdit.getProperty(action + ".mouse-over");↵
|
16 | if(msg != null)↵ | | 16 | if(msg != null)↵
|
17 | {↵ | | 17 | {↵
|
18 | GUIUtilities.getView((Component)evt.getSource())↵ | | 18 | GUIUtilities.getView((Component)evt.getSource())↵
|
19 | .getStatus().setMessage(msg);↵ | | 19 | .getStatus().setMessage(msg);↵
|
20 | msgSet = true;↵ | | 20 | msgSet = true;↵
|
21 | }↵ | | 21 | }↵
|
22 | }↵ | | 22 | }↵
|
|
23 | public void mouseExited(MouseEvent evt)↵ | | 23 | public void mouseExited(MouseEvent evt)↵
|
24 | {↵ | | 24 | {↵
|
25 | if(msgSet)↵ | | 25 | if(msgSet)↵
|
26 | {↵ | | 26 | {↵
|
27 | GUIUtilities.getView((Component)evt.getSource())↵ | | 27 | GUIUtilities.getView((Component)evt.getSource())↵
|
28 | .getStatus().setMessage(null);↵ | | 28 | .getStatus().setMessage(null);↵
|
29 | msgSet = false;↵ | | 29 | msgSet = false;↵
|
30 | }↵ | | 30 | }↵
|
31 | }↵ | | 31 | }↵
|
32 | } | | 32 | }
|