Package org.springframework.richclient.command

Examples of org.springframework.richclient.command.CommandGroupFactoryBean


      members.add(commandManager.getCommand(commandIds[i]));
    }

    CellConstraints cc = new CellConstraints();

    CommandGroupFactoryBean commandGroupFactory = new CommandGroupFactoryBean("buttonBar", members.toArray());
    panel.add(new JLabel(getMessage("buttonBar.label")), cc.xy(1, 1));
    panel.add(commandGroupFactory.getCommandGroup().createButtonBar(), cc.xyw(1, 3, 3));

    JTextField toolbarTextField = new JTextField(20);
    toolbarTextField.setText("input");
    members.add(toolbarTextField);
    commandGroupFactory = new CommandGroupFactoryBean("buttonStack", members.toArray());
    panel.add(new JLabel(getMessage("buttonStack.label")), cc.xy(1, 5));
    panel.add(commandGroupFactory.getCommandGroup().createButtonStack(), cc.xy(3, 5));

    return panel;
  }
View Full Code Here


      members.add(commandManager.getCommand(commandIds[i]));
    }

    CellConstraints cc = new CellConstraints();

    CommandGroupFactoryBean commandGroupFactory = new CommandGroupFactoryBean("toolbar", members.toArray());
    panel.add(commandGroupFactory.getCommandGroup().createToolBar(), cc.xy(1, 1));

    JTextField toolbarTextField = new JTextField(20);
    toolbarTextField.setText("input");
    members.add(toolbarTextField);
    commandGroupFactory = new CommandGroupFactoryBean("toolbar2", members.toArray());
    panel.add(commandGroupFactory.getCommandGroup().createToolBar(), cc.xy(1, 3));

    return panel;
  }
View Full Code Here

        return newCommand;
    }

    public CommandGroup createCommandGroup(String groupId, Object[] members) {
        Assert.notNull(groupId, "Registered command groups must have an id.");
        CommandGroup newGroup = new CommandGroupFactoryBean(groupId, this.commandRegistry, this, members)
                .getCommandGroup();
        registerCommand(newGroup);
        return newGroup;
    }
View Full Code Here

        return newGroup;
    }

    public ExclusiveCommandGroup createExclusiveCommandGroup(String groupId, Object[] members) {
        Assert.notNull(groupId, "Registered exclusive command groups must have an id.");
        CommandGroupFactoryBean newGroupFactory = new CommandGroupFactoryBean(groupId, this.commandRegistry, this,
                members);
        newGroupFactory.setExclusive(true);
        registerCommand(newGroupFactory.getCommandGroup());
        return (ExclusiveCommandGroup)newGroupFactory.getCommandGroup();
    }
View Full Code Here

        return bean;
    }

    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        if (bean instanceof CommandGroupFactoryBean) {
            CommandGroupFactoryBean factory = (CommandGroupFactoryBean)bean;
            factory.setCommandRegistry(commandRegistry);
        }
        else if (bean instanceof AbstractCommand) {
            configure((AbstractCommand)bean);
        }
        return bean;
View Full Code Here

TOP

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

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.