1 package com.ca.commons.cbutil; 2 3 import javax.swing.*; 4 import java.awt.event.ActionEvent ; 5 import java.beans.PropertyChangeListener ; 6 7 19 public abstract class CBAction 20 implements Action 21 { 22 25 public static final int ESCAPE = 27; 26 27 30 public static final int ENTER = 10; 31 32 35 private int key = 0; 36 37 40 private boolean enabled = true; 41 42 45 public CBAction() 46 { 47 } 48 49 54 public CBAction(int key) 55 { 56 this.key = key; 57 } 58 59 64 public int getKey() 65 { 66 return key; 67 } 68 69 74 public void setKey(int key) 75 { 76 this.key = key; 77 } 78 79 84 public abstract void actionPerformed(ActionEvent e); 85 86 public void addPropertyChangeListener(PropertyChangeListener listener) 88 { 89 } 90 91 public Object getValue(String key) 92 { 93 return key; 94 } 95 96 public boolean isEnabled() 97 { 98 return enabled; 99 } 100 101 public void putValue(String key, Object value) 102 { 103 } 104 105 public void removePropertyChangeListener(PropertyChangeListener listener) 106 { 107 } 108 109 public void setEnabled(boolean b) 110 { 111 enabled = b; 112 } 113 } 114 | Popular Tags |