private void addListeners() { if (command instanceof GeneralCommand) { final GeneralCommand c = (GeneralCommand) command; c.addPropertyChangeListener( new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (ev.getPropertyName().equals(GeneralCommand.PROP_ENABLED)) { setButtonEnabled(c.isEnabled()); } } }); } }
public Map makeCommandTable() { HashMap<String, GeneralCommand> commands = new HashMap<String, GeneralCommand>(); GeneralCommand cmd = new OverviewHelpCmd(); commands.put(cmd.getName(), cmd); return commands; }