Package org.springframework.richclient.command.config

Examples of org.springframework.richclient.command.config.CommandConfigurer


   * @param members members to add to the group.
   * @return a {@link CommandGroup} that holds the given members.
   */
  private static CommandGroup createCommandGroup(final String groupId, final Object[] members,
      final boolean exclusive, final CommandConfigurer configurer) {
    final CommandConfigurer theConfigurer = (configurer != null) ? configurer
        : (CommandConfigurer) ApplicationServicesLocator.services().getService(CommandConfigurer.class);

    final CommandGroupFactoryBean groupFactory = new CommandGroupFactoryBean(groupId, null, theConfigurer, members);
    groupFactory.setExclusive(exclusive);
    return groupFactory.getCommandGroup();
View Full Code Here


          sortedModel.resetComparators();
        }
      }

    };
    CommandConfigurer commandConfigurer = (CommandConfigurer) ApplicationServicesLocator.services().getService(
        CommandConfigurer.class);
    commandConfigurer.configure(addCommand);
    return addCommand;
  }
View Full Code Here

          sortedModel.resetComparators();
        }
      }

    };
    CommandConfigurer commandConfigurer = (CommandConfigurer) ApplicationServicesLocator.services().getService(
        CommandConfigurer.class);
    commandConfigurer.configure(removeCommand);
    return removeCommand;
  }
View Full Code Here

        };
       
        //no configurer has been set, confirming that this doesn't throw an exception
        factoryBean.configureIfNecessary(command);
       
        CommandConfigurer configurer = (CommandConfigurer) EasyMock.createMock(CommandConfigurer.class);
        EasyMock.expect(configurer.configure(command)).andReturn(command);
       
        EasyMock.replay(configurer);
       
        factoryBean.setCommandConfigurer(configurer);
        factoryBean.configureIfNecessary(command);       
View Full Code Here

        renderer = createRenderer();
        control.add(renderer);

        // configure commands
        CommandConfigurer configurer = (CommandConfigurer) ApplicationServicesLocator.services().getService(
                CommandConfigurer.class);
        configurer.configure(selectCommand);
        configurer.configure(clearCommand);

        JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));

        buttonPanel.add(selectCommand.createButton());
        if (nullable) {
View Full Code Here

    textField.setEditable( false );
    control.add( textField );

    // configure commands
    CommandConfigurer configurer = ( CommandConfigurer ) ApplicationServicesLocator.services().getService( CommandConfigurer.class );
    configurer.configure( openDialogCommand );
    configurer.configure( clearCommand );

    JPanel buttonPanel = new JPanel( new FlowLayout( FlowLayout.LEADING, 0, 0 ) );

    buttonPanel.add( openDialogCommand.createButton() );
    if ( nullable ) {
View Full Code Here

      //No commands --> exit fast
      return;
    }

    //todo fix spring
    CommandConfigurer commandConfigurer = getService( CommandConfigurer.class );
    ApplicationObjectConfigurer configurer = getService( ApplicationObjectConfigurer.class );
    ButtonFactory bf = getToolBarButtonFactory();
    CommandsBarButtonConfigurer commandsBarButtonConfigurer = new CommandsBarButtonConfigurer();


    //Now create the button panel
    //    JPanel buttonPanel = getComponentFactory().createPanel( new VerticalLayout( UIConstants.ONE_SPACE ) );
    JPanel buttonPanel = getComponentFactory().createPanel( new VerticalLayout() );
    for ( Iterator<Collection<? extends ActionCommand>> it = commands.iterator(); it.hasNext(); ) {
      Collection<? extends ActionCommand> commandsCollection = it.next();
      for ( ActionCommand command : commandsCollection ) {
        commandConfigurer.configure( command );

        CommandFaceDescriptor face = new CommandFaceDescriptor();
        configurer.configure( face, command.getId() + '.' + COMMANDS_FACE_ID );
        command.setFaceDescriptor( COMMANDS_FACE_ID, face );
View Full Code Here

TOP

Related Classes of org.springframework.richclient.command.config.CommandConfigurer

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.