Package org.springframework.richclient.command

Examples of org.springframework.richclient.command.ActionCommand


  /**
   * Returns an actionCommand that adds a column if possible. Maximum number
   * of rows is the number of headers as defined in constructor.
   */
  private ActionCommand createAddCommand() {
    ActionCommand addCommand = new ActionCommand("addCommand") {

      @Override
      protected void doExecuteCommand() {
        int columnCount = columnModel.getColumnCount();
        if (columnCount < (headers.size())) {
View Full Code Here


  /**
   * Returns an actionCommand removing a column.
   */
  private ActionCommand createRemoveCommand() {
    ActionCommand removeCommand = new ActionCommand("removeCommand") {

      @Override
      protected void doExecuteCommand() {
        int columnCount = columnModel.getColumnCount();
        if (columnCount > 0) {
View Full Code Here

      panel.add(createValidateCommand().createButton());
      return panel;
    }

    private ActionCommand createValidateCommand() {
      ActionCommand validateCommand = new ActionCommand("validateCommand") {

        protected void doExecuteCommand() {
          getFormModel().validate();
        }
      };
View Full Code Here

            panel.add(childPanel, cc.xy(1,5));
            return panel;
    }

        private ActionCommand createBuildBindingCommand() {
            ActionCommand actionCommand = new ActionCommand("buildBinding"){
                protected void doExecuteCommand() {
                    String pattern = (String)getValue("regExp");
                    boolean upperCaseOnly = (Boolean) getValue("convertToUppercase");
                    CellConstraints cc = new CellConstraints();
                    ChildForm form = new ChildForm(pattern, upperCaseOnly);
View Full Code Here

    return messageArea;
  }

  public ActionCommand getClearTextAreaCommand() {
    if (this.clearTextAreaCommand == null) {
      this.clearTextAreaCommand = new ActionCommand(getClearTextAreaCommandFaceDescriptorId()) {

        protected void doExecuteCommand() {
          getMessageArea().setText(null);
        }
      };
View Full Code Here

          ActionCommand command =
            commandManager.getActionCommand(id);
          command.setVisible(pageViews.contains(views[i].getId()));
        }*/
        if(commandManager.isTypeMatch(id, ActionCommand.class)){
          ActionCommand command =
            (ActionCommand)commandManager.getCommand(id, ActionCommand.class);
          command.setVisible(pageViews.contains(views[i].getId()));
        }
      }
    }
View Full Code Here

    protected Object[] getCommandGroupMembers() {
        if (!wizard.needsPreviousAndNextButtons()) {
            return super.getCommandGroupMembers();
        }
        nextCommand = new ActionCommand("nextCommand") {
            public void doExecuteCommand() {
                onNext();
            }
        };
        backCommand = new ActionCommand("backCommand") {
            public void doExecuteCommand() {
                onBack();
            }
        };
        backCommand.setEnabled(false);
View Full Code Here

    protected ActionCommand createCancelCommand() {
        String commandId = getCancelCommandFaceDescriptorId();
        if( !StringUtils.hasText( commandId ) ) {
            return null;
        }
        ActionCommand command = new ActionCommand( commandId ) {
            protected void doExecuteCommand() {
                AbstractDetailForm.this.reset();
                AbstractDetailForm.this.setEnabled( false );
                setEditingNewFormObject( false );
                setEditingFormObjectIndexSilently( -1 );
View Full Code Here

                    jcomp = null;
            }

            if (jcomp != null)
            {
                ActionCommand command = (ActionCommand) jcomp.getClientProperty(DEFAULT_COMMAND);
                command.setDefaultButton();
            }
        }

    }
View Full Code Here

        String commandId = getNewFormObjectCommandId();
        if( !StringUtils.hasText( commandId ) ) {
            return null;
        }

        ActionCommand newDetailObjectCommand = new ActionCommand( commandId ) {
            protected void doExecuteCommand() {
                maybeCreateNewObject(); // Avoid losing user edits
            }
        };
        String scid = constructSecurityControllerId( commandId );
        newDetailObjectCommand.setSecurityControllerId( scid );
        return (ActionCommand) getCommandConfigurer().configure( newDetailObjectCommand );
    }
View Full Code Here

TOP

Related Classes of org.springframework.richclient.command.ActionCommand

Copyright © 2018 www.massapicom. 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.