Examples of CommandGroup


Examples of org.springframework.richclient.command.CommandGroup

   * its default
   *
   * @return
   */
  public JComponent getEditorToolBar(){
    CommandGroup commandGroup = getCommandGroup(getToolBarCommandGroupName());
    if(commandGroup == null){
      return null;
    }
    return commandGroup.createToolBar();
  }
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

        JPanel table = new JPanel(new BorderLayout());
        table.add(widget.getListSummaryLabel(), BorderLayout.NORTH);
        table.add(widget.getComponent(), BorderLayout.CENTER);
        table.add(widget.getButtonBar(), BorderLayout.SOUTH);

        CommandGroup popup = new CommandGroup();
        popup.add((ActionCommand) getWindowCommandManager().getCommand("deleteCommand", ActionCommand.class));
        popup.addSeparator();
        popup.add((ActionCommand) getWindowCommandManager().getCommand("propertiesCommand", ActionCommand.class));
        JPopupMenu popupMenu = popup.createPopupMenu();

        widget.getTable().addMouseListener(new MouseAdapter()
        {
            public void mousePressed(MouseEvent e)
            {
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

            // Install the fully constructed (layered) list into the table
            contactTable.setFinalEventList(filterList);

            // Install the popup menu
            CommandGroup popup = new CommandGroup();
            popup.add((ActionCommand) getWindowCommandManager().getCommand("deleteCommand", ActionCommand.class));
            popup.addSeparator();
            popup.add((ActionCommand) getWindowCommandManager().getCommand("propertiesCommand", ActionCommand.class));
            contactTable.setPopupCommandGroup(popup);

            // Register to get notified when the filtered list changes
            contactTable.setStatusBar(getStatusBar());
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

  /**
   * Create a desktop pane context menu CommandGroup.
   * @return the context menu CommandGroup
   */
  public CommandGroup createContextMenuCommandGroup(CommandManager commandManager, JDesktopPane desktop) {
    CommandGroup commandGroup = new CommandGroup();

    TileCommand tileCommand = new TileCommand(desktop);
    CascadeCommand cascadeCommand = new CascadeCommand(desktop, cascadeOffset, cascadeResizesFrames);
    MinimizeAllCommand minimizeAllCommand = new MinimizeAllCommand(desktop);

    commandManager.configure(tileCommand);
    commandManager.configure(cascadeCommand);
    commandManager.configure(minimizeAllCommand);

    commandGroup.add(tileCommand);
    commandGroup.add(cascadeCommand);
    commandGroup.add(minimizeAllCommand);

    if (desktop.getAllFrames().length > 0) {
      commandGroup.addSeparator();
      // TODO try to get the frames in the order they've been added to the
      // desktop
      // pane instead of the current z-order.
      for (int i = 0; i < desktop.getAllFrames().length; i++) {
        JInternalFrame frame = desktop.getAllFrames()[i];

        ShowFrameCommand showFrameCommand = new ShowFrameCommand(frame);
        showFrameCommand.setIcon(frame.getFrameIcon());
        showFrameCommand.setCaption("" + frame.getTitle());

        String label = i + " " + frame.getTitle();
        if (i < 10) {
          label = "&" + label;
        }
        showFrameCommand.setLabel(label);

        commandGroup.add(showFrameCommand);
      }
    }
    return commandGroup;
  }
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

 
  public CommandGroup getCommandGroup(String name){
    JideApplicationLifecycleAdvisor advisor =
      ((JideApplicationLifecycleAdvisor)getApplication().getLifecycleAdvisor());
    CommandGroup commandGroup = advisor.getSpecificCommandGroup(name);
    return commandGroup;
  }
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

   *
   * @return
   */
  public JMenuBar getViewMenuBar(){

    CommandGroup commandGroup = getCommandGroup(getMenuBarCommandGroupName());
    if(commandGroup == null){
      return null;
    }
    return commandGroup.createMenuBar();
  }
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

   *
   * @return
   */
  public JComponent getViewToolBar(){

    CommandGroup commandGroup = getCommandGroup(getToolBarCommandGroupName());
    if(commandGroup == null){
      return null;
    }
    return commandGroup.createToolBar();
  }
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

    panel.add(reporter.getControl(), cc.xy(1, 1));
    AbstractCommand[] reporterCommands = reporter.getReporterCommands();
    AbstractCommand[] commandStack = new AbstractCommand[reporterCommands.length + 1];
    System.arraycopy(reporterCommands, 0, commandStack, 0, reporterCommands.length);
    commandStack[reporterCommands.length] = getClearTextAreaCommand();
    CommandGroup commandGroup = CommandGroup.createCommandGroup(commandStack);
    panel.add(commandGroup.createButtonStack(), cc.xy(3, 1));
    JScrollPane scrollPane = new JScrollPane(messageArea,
        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, panel, scrollPane);
    scrollPane.setPreferredSize(new Dimension(200, 100));
    return splitPane;
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

        return treeCellRenderer;
    }

    private JPopupMenu createOwnerPopupContextMenu() {
        // rename, separator, delete, addPet separator, properties
        CommandGroup group = getWindowCommandManager().createCommandGroup(
                "ownerViewTableOwnerCommandGroup",
                new Object[] {"renameCommand", "separator", "deleteCommand", "separator", newPetCommand, "separator",
                        "propertiesCommand"});
        return group.createPopupMenu();
    }
View Full Code Here

Examples of org.springframework.richclient.command.CommandGroup

        return group.createPopupMenu();
    }

    private JPopupMenu createPetPopupContextMenu() {
        // rename, separator, delete, separator, properties
        CommandGroup group = getWindowCommandManager().createCommandGroup("ownerViewTablePetCommandGroup",
                new Object[] {"renameCommand", "separator", "deleteCommand", "separator", "propertiesCommand"});
        return group.createPopupMenu();
    }
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.