1 14 package org.wings.plaf.css; 15 16 import javax.swing.*; 17 18 22 public class VersionedInputMap extends InputMap { 23 InputMap inputMap; 24 int version = 0; 25 26 public VersionedInputMap() { 27 } 28 29 public VersionedInputMap(InputMap inputMap) { 30 this.inputMap = inputMap; 31 } 32 33 public int size() { 34 return inputMap.size(); 35 } 36 37 public void clear() { 38 inputMap.clear(); 39 } 40 41 public InputMap getParent() { 42 return inputMap.getParent(); 43 } 44 45 public void setParent(InputMap map) { 46 version++; 47 inputMap.setParent(map); 48 } 49 50 public KeyStroke[] allKeys() { 51 return inputMap.allKeys(); 52 } 53 54 public KeyStroke[] keys() { 55 return inputMap.keys(); 56 } 57 58 public void remove(KeyStroke key) { 59 inputMap.remove(key); 60 } 61 62 public Object get(KeyStroke keyStroke) { 63 return inputMap.get(keyStroke); 64 } 65 66 public void put(KeyStroke keyStroke, Object actionMapKey) { 67 version++; 68 inputMap.put(keyStroke, actionMapKey); 69 } 70 71 public int getVersion() { 72 return version; 73 } 74 } 75 | Popular Tags |