@Override public void addCommandListener(final ICommandListener commandListener) { command.addCommandListener(new LegacyCommandListenerWrapper( commandListener, bindingManager)); }
command.getCommand().addCommandListener(commandListener);
/** * Gets the command with the given identifier. If no such command currently * exists, then the command will be created (but will be undefined). * * @param commandId * The identifier to find; must not be <code>null</code> and * must not be zero-length. * @return The command with the given identifier; this value will never be * <code>null</code>, but it might be undefined. * @see Command */ public Command getCommand(final String commandId) { checkId(commandId); Command command = (Command) handleObjectsById.get(commandId); if (command == null) { command = new Command(commandId); command.shouldFireEvents = shouldCommandFireEvents; handleObjectsById.put(commandId, command); command.addCommandListener(this); if (executionListener != null) { command.addExecutionListener(executionListener); } } return command; }
/** * Gets the command with the given identifier. If no such command currently * exists, then the command will be created (but will be undefined). * * @param commandId * The identifier to find; must not be <code>null</code> and * must not be zero-length. * @return The command with the given identifier; this value will never be * <code>null</code>, but it might be undefined. * @see Command */ public final Command getCommand(final String commandId) { checkId(commandId); Command command = (Command) handleObjectsById.get(commandId); if (command == null) { command = new Command(commandId); command.shouldFireEvents = shouldCommandFireEvents; handleObjectsById.put(commandId, command); command.addCommandListener(this); if (executionListener != null) { command.addExecutionListener(executionListener); } } return command; }
/** * Gets the command with the given identifier. If no such command currently * exists, then the command will be created (but will be undefined). * * @param commandId * The identifier to find; must not be <code>null</code> and * must not be zero-length. * @return The command with the given identifier; this value will never be * <code>null</code>, but it might be undefined. * @see Command */ public final Command getCommand(final String commandId) { checkId(commandId); Command command = (Command) handleObjectsById.get(commandId); if (command == null) { command = new Command(commandId); command.shouldFireEvents = shouldCommandFireEvents; handleObjectsById.put(commandId, command); command.addCommandListener(this); if (executionListener != null) { command.addExecutionListener(executionListener); } } return command; }
command.addCommandListener(new ICommandListener() { @Override public final void commandChanged(
command.addCommandListener(new ICommandListener() {
command.addCommandListener(new ICommandListener() { @Override public final void commandChanged(
null)); command.getCommand().addCommandListener(getCommandListener());
final Command newBaseCommand = commandService.getCommand(id); command = new ParameterizedCommand(newBaseCommand, null); newBaseCommand.addCommandListener(commandListener);
parameterizedCommand.getCommand().addCommandListener( getCommandListener()); parameterizedCommand.getCommand().setEnabled(