Examples of ActionCommand


Examples of org.springframework.richclient.command.ActionCommand

  public void registerAccelerators() {
    CommandManager commandManager = getCommandManager();
    Keymap keymap = new DefaultKeymap(getClass().getName(), textComponent.getKeymap());
    for (int i = 0; i < COMMANDS.length; i++) {
      ActionCommand command = commandManager.getActionCommand(COMMANDS[i]);
      keymap.addActionForKeyStroke(command.getAccelerator(), command.getActionAdapter());
    }
    if (COMMANDS.length > 0) {
      textComponent.setKeymap(keymap);
    }
  }
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

                null, options, options[initialValue]);
    }

    public static ActionCommand createDummyCommand(final String id, final String msg)
    {
        ActionCommand newCommand = new ActionCommand(id)
        {

            protected void doExecuteCommand()
            {
                System.out.println(msg);
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

  /**
   * Initialize the standard commands needed on a Dialog: Ok/Cancel.
   */
  private void initStandardCommands() {
    finishCommand = new ActionCommand(getFinishCommandId()) {
      public void doExecuteCommand() {
        boolean result = onFinish();
        if (result) {
          if (getDisplayFinishSuccessMessage()) {
            showFinishSuccessMessageDialog();
          }
          executeCloseAction();
        }
      }
    };
    finishCommand.setSecurityControllerId(getFinishSecurityControllerId());
    finishCommand.setEnabled(defaultEnabled);

    cancelCommand = new ActionCommand(getCancelCommandId()) {

      public void doExecuteCommand() {
        onCancel();
      }
    };
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

  /**
   * Returns the message to use upon succesful finish.
   */
  protected String getFinishSuccessMessage() {
    ActionCommand callingCommand = getCallingCommand();
    if (callingCommand != null) {
      String[] successMessageKeys = new String[] { callingCommand.getId() + "." + SUCCESS_FINISH_MESSAGE_KEY,
          DEFAULT_FINISH_SUCCESS_MESSAGE_KEY };
      return getMessage(successMessageKeys, getFinishSuccessMessageArguments());
    }
    return getMessage(DEFAULT_FINISH_SUCCESS_MESSAGE_KEY);
  }
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

  /**
   * Returns the title to use upon succesful finish.
   */
  protected String getFinishSuccessTitle() {
    ActionCommand callingCommand = getCallingCommand();
    if (callingCommand != null) {
      String[] successTitleKeys = new String[] { callingCommand.getId() + "." + SUCCESS_FINISH_TITLE_KEY,
          DEFAULT_FINISH_SUCCESS_TITLE_KEY };
      return getMessage(successTitleKeys, getFinishSuccessTitleArguments());
    }
    return getMessage(DEFAULT_FINISH_SUCCESS_TITLE_KEY);
  }
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

    /**
     * When commands are created, lookup the login command and execute it.
     */
    public void onCommandsCreated(ApplicationWindow window)
    {
        ActionCommand command = (ActionCommand) window.getCommandManager().getCommand("loginCommand", ActionCommand.class);
        command.execute();
    }
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

    return builder;
  }

  public ActionCommand getPrintFormObjectCommand() {
    if (printFormObjectCommand == null) {
      printFormObjectCommand = new ActionCommand(getPrintFormObjectCommandFaceDescriptorId()) {

        protected void doExecuteCommand() {
          getMessageArea().append(getFormObjectDetails(new StringBuilder(), getFormModel()).toString());
        }
      };
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

    return printFormObjectCommand;
  }

  public ActionCommand getPrintFieldsCommand() {
    if (printFieldsCommand == null) {
      printFieldsCommand = new ActionCommand(getPrintFieldsCommandFaceDescriptorId()) {

        protected void doExecuteCommand() {
          getMessageArea().append(getFieldsDetails(new StringBuilder(), getFormModel()).toString());
        }
      };
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

    return printFieldsCommand;
  }

  public ActionCommand getPrintFormModelCommand() {
    if (printFormModelCommand == null) {
      printFormModelCommand = new ActionCommand(getPrintFormModelCommandFaceDescriptorId()) {

        protected void doExecuteCommand() {
          getMessageArea().append(getFormModelDetails(new StringBuilder(), getFormModel()).toString());
        }
      };
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

    /**
     * Create the dataEditorCommand.
     */
    protected ActionCommand createDataEditorCommand()
    {
        ActionCommand selectDialogCommand = new ActionCommand(getSelectDialogCommandId())
        {

            private ApplicationDialog dataEditorDialog;

            @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.