Package org.springframework.richclient.command

Examples of org.springframework.richclient.command.CommandGroup


     *
     * @param groupMembers
     * @return button bar
     */
    public static JComponent createButtonBar( Object[] groupMembers ) {
        CommandGroup dialogCommandGroup = CommandGroup.createCommandGroup(null, groupMembers);
        JComponent buttonBar = dialogCommandGroup.createButtonBar();
        GuiStandardUtils.attachDialogBorder(buttonBar);
        return buttonBar;
    }
View Full Code Here


        return this.widget;
    }

    protected JComponent createButtonBar()
    {
        CommandGroup widgetCommands = CommandGroup.createCommandGroup(null, widget.getCommands());
        CommandGroup dialogCommands = CommandGroup.createCommandGroup(getCommandGroupMembers());
        JPanel panel = new JPanel(new FormLayout(new ColumnSpec[]{FormFactory.DEFAULT_COLSPEC,
                FormFactory.GLUE_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC},
                new RowSpec[]{FormFactory.DEFAULT_ROWSPEC}));
        CellConstraints cc = new CellConstraints();
        panel.add(widgetCommands.createButtonBar(), cc.xy(1, 1));
        panel.add(dialogCommands.createButtonBar(), cc.xy(4, 1));
        panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
        return panel;
    }
View Full Code Here

   * Create the menuBar for the application.
   *
   * @return a CommandGroup.
   */
  public CommandGroup getMenuBarCommandGroup() {
    return new CommandGroup();
  }
View Full Code Here

   * Create the toolBar for the application.
   *
   * @return a CommandGroup.
   */
  public CommandGroup getToolBarCommandGroup() {
    return new CommandGroup();
  }
View Full Code Here

    protected ConfigurableListableBeanFactory getCommandBarFactory() {
        return openingWindowCommandBarFactory;
    }

    public CommandGroup getMenuBarCommandGroup() {
        CommandGroup menuBarCommandGroup = getCommandGroup(menuBarBeanName);
        return menuBarCommandGroup != null ? menuBarCommandGroup : super.getMenuBarCommandGroup();
    }
View Full Code Here

        CommandGroup menuBarCommandGroup = getCommandGroup(menuBarBeanName);
        return menuBarCommandGroup != null ? menuBarCommandGroup : super.getMenuBarCommandGroup();
    }

    public CommandGroup getToolBarCommandGroup() {
        CommandGroup toolBarCommandGroup = getCommandGroup(toolBarBeanName);
        return toolBarCommandGroup != null ? toolBarCommandGroup : super.getToolBarCommandGroup();
    }
View Full Code Here

        firstPageControl.add(createFirstPageButtonBar(), BorderLayout.SOUTH);
        return firstPageControl;
    }

    protected JComponent createFirstPageButtonBar() {
        CommandGroup dialogCommandGroup = CommandGroup.createCommandGroup(null, getIntroPageCommandGroupMembers());
        JComponent buttonBar = dialogCommandGroup.createButtonBar();
        GuiStandardUtils.attachDialogBorder(buttonBar);
        buttonBar.setOpaque(false);
        return buttonBar;
    }
View Full Code Here

        final ValueModel selectionHolder = new TreeSelectionValueModelAdapter(jtStructure.getSelectionModel());
        final ValueModel vModel = new JTreeValueModelAdapter((TreeSelectionValueModelAdapter) selectionHolder);

        final DefaultMutableTreeNodeAccessor accessor = new DefaultMutableTreeNodeAccessor();
        final CommandGroup group = getWindowCommandManager().createCommandGroup("schemaElementsCommandGroup", new Object[] { new TypeHierarchyCommand(vModel), new TypeInspectionCommand(vModel), "separator", "propertiesCommand"});

        jtStructure.addMouseListener(new PopupMenuMouseListener() {

            @Override
            protected JPopupMenu getPopupMenu(MouseEvent e) {
                return group.createPopupMenu();
            }
        });
        jtStructure.addMouseListener(new MouseAdapter() {

            @Override
View Full Code Here

        final JList masterList = masterDetailList.getMasterList();
        final JList detailList = masterDetailList.getDetailList();
        detailList.setCellRenderer(new SchemaElementsRenderer());
        masterList.setCellRenderer(new QNameRenderer());

        final CommandGroup group = getWindowCommandManager().createCommandGroup("typeListCommandGroup", new Object[] { typeHierarchyCommand, typeInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        final JPopupMenu popup = group.createPopupMenu();
        detailList.addMouseListener(new PopupMenuMouseListener(popup));

        // build master view
        final GridBagLayoutBuilder masterPanelBuilder = new GridBagLayoutBuilder();
        final ComponentFactory cf = getComponentFactory();
View Full Code Here

        // build master view
        final GridBagLayoutBuilder typeListPanelBuilder = new GridBagLayoutBuilder();
        typeListPanelBuilder.append(cf.createLabel("similarTypesView.typeList.label", new ValueModel[] { numSimilarTypesSchema})).nextLine();
        typeListPanelBuilder.append(cf.createScrollPane(masterList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, true, true);

        final CommandGroup group = getWindowCommandManager().createCommandGroup("similarTypesCommandGroup", new Object[] { similarTypesTypeHierarchyCommand, similarTypesInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        masterList.addMouseListener(new PopupMenuMouseListener(group.createPopupMenu()));

        masterList.addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent evt) {
                Map<String, XSObject> parameters = new HashMap<String, XSObject>();
                final SimilarTypeListModelEntry similarTypeListModelEntry = (SimilarTypeListModelEntry) masterList.getSelectedValue();
                if (null == similarTypeListModelEntry) return;
                parameters.put(XsElementPropertiesExecutor.OBJECT, similarTypeListModelEntry.getType());
                xsElementPropertiesExecutor.execute(parameters);
            }
        });

        // build client view
        final GridBagLayoutBuilder similarTypesListPanelBuilder = new GridBagLayoutBuilder();
        similarTypesListPanelBuilder.append(cf.createLabel("similarTypesView.similarTypeList.label", new ValueModel[] { numSimilarTypes})).nextLine();
        similarTypesListPanelBuilder.append(cf.createScrollPane(detailList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), 1, 1, true, true);

        final CommandGroup detailListGroup = getWindowCommandManager().createCommandGroup("typeListCommandGroup", new Object[] { typesListTypeHierarchyCommand, typesListTypeInspectionCommand, "separator", GlobalCommandIds.PROPERTIES});
        detailList.addMouseListener(new PopupMenuMouseListener(detailListGroup.createPopupMenu()));

        detailList.addListSelectionListener(new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent evt) {
View Full Code Here

TOP

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

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.