1 17 18 package swingwt.awt; 19 20 public class MenuShortcut { 21 22 protected int key = 0; 23 protected boolean useShiftModifier = false; 24 25 public MenuShortcut(int key) { 26 this(key, false); 27 } 28 29 public MenuShortcut(int key, boolean useShiftModifier) { 30 this.key = key; 31 this.useShiftModifier = useShiftModifier; 32 } 33 34 public boolean equals(MenuShortcut s) { 35 return (s.getKey() == key && useShiftModifier == s.usesShiftModifier()); 36 } 37 38 public boolean usesShiftModifier() { return useShiftModifier; } 39 public int getKey() { return key; } 40 41 } 42 | Popular Tags |