1 7 8 14 package org.jdesktop.swing; 15 16 import java.beans.PropertyChangeListener ; 17 18 import javax.swing.Action ; 19 20 51 public abstract class UIAction implements Action { 52 private String name; 53 54 public UIAction(String name) { 55 this.name = name; 56 } 57 58 public final String getName() { 59 return name; 60 } 61 62 public Object getValue(String key) { 63 if (key == NAME) { 64 return name; 65 } 66 return null; 67 } 68 69 public void putValue(String key, Object value) { 71 } 72 73 public void setEnabled(boolean b) { 75 } 76 77 80 public final boolean isEnabled() { 81 return isEnabled(null); 82 } 83 84 90 public boolean isEnabled(Object sender) { 91 return true; 92 } 93 94 public void addPropertyChangeListener(PropertyChangeListener listener) { 96 } 97 98 public void removePropertyChangeListener(PropertyChangeListener listener) { 100 } 101 } 102 | Popular Tags |