1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.xnap.commons.gui.shortcut;
22
23 import java.beans.PropertyChangeListener;
24 import javax.swing.KeyStroke;
25
26 /***
27 * Defines the requirements for classes that provide shortcuts.
28 */
29 public interface Shortcut
30 {
31 public static final String DESCRIPTION = "XNapDescription";
32
33 public static final String CATEGORY = "XNapCategory";
34
35 public static final String KEYSTROKE = "XNapKeyStroke";
36
37 void putValue(String key, Object value);
38
39 Object getValue(String key);
40
41 void addPropertyChangeListener(PropertyChangeListener l);
42
43 void removePropertyChangeListener(PropertyChangeListener l);
44
45 /***
46 * Returns the keystroke.
47 */
48 KeyStroke getKeyStroke();
49
50 /***
51 *
52 */
53 void setKeyStroke(KeyStroke stroke);
54
55 }
56