Examples of ActionCommand


Examples of org.springframework.richclient.command.ActionCommand

            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

Examples of org.springframework.richclient.command.ActionCommand

    return messageArea;
  }

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

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

Examples of org.springframework.richclient.command.ActionCommand

          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

Examples of org.springframework.richclient.command.ActionCommand

    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

Examples of org.springframework.richclient.command.ActionCommand

    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

Examples of org.springframework.richclient.command.ActionCommand

                    jcomp = null;
            }

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

    }
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

        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

Examples of org.springframework.richclient.command.ActionCommand

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

        final ActionCommand deleteCommand = new ActionCommand( commandId ) {
            protected void doExecuteCommand() {
                maybeDeleteSelectedItems();
            }
        };

        String scid = constructSecurityControllerId( commandId );
        deleteCommand.setSecurityControllerId( scid );
        return (ActionCommand) getCommandConfigurer().configure( deleteCommand );
    }
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

    protected void maybeCreateNewObject() {
        if( getDetailForm().isEditingNewFormObject() ) {
            return; // Already creating a new object, just bail
        }

        final ActionCommand detailNewObjectCommand = detailForm.getNewFormObjectCommand();

        if( getDetailForm().isDirty() ) {
            String title = getMessage( new String[] { getId() + ".dirtyNew.title", "masterForm.dirtyNew.title" } );
            String message = getMessage( new String[] { getId() + ".dirtyNew.message", "masterForm.dirtyNew.message" } );
            ConfirmationDialog dlg = new ConfirmationDialog( title, message ) {
                protected void onConfirm() {
                    // Tell both forms that we are creating a new object
                    detailNewObjectCommand.execute(); // Do subform action first
                    creatingNewObject();
                    detailForm.creatingNewObject();
                }
            };
            dlg.showDialog();
        } else {
            // Tell both forms that we are creating a new object
            detailNewObjectCommand.execute(); // Do subform action first
            creatingNewObject();
            detailForm.creatingNewObject();
        }
    }
View Full Code Here

Examples of org.springframework.richclient.command.ActionCommand

    }

    public void testStandardViewAdaptsOkCommand() {
        TestDialogPage page = new TestDialogPage();

        ActionCommand okCommand = new ActionCommand("okCommand") {
            protected void doExecuteCommand() {
            }
        };
        ActionCommand cancelCommand = new ActionCommand("cancelCommand") {
            protected void doExecuteCommand() {
            }
        };

        DialogPageUtils.createStandardView(page, okCommand, cancelCommand);
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.