Package com.gwtext.client.widgets

Examples of com.gwtext.client.widgets.ToolbarMenuButton


    public PackagesPanel(ExplorerViewCenterPanel tabbedPanel) {
        super(constants.KnowledgeBases(), tabbedPanel);
        setIconCls("nav-packages"); //NON-NLS

        Toolbar pkgToolbar = new Toolbar();
        final ToolbarMenuButton menuButton = new ToolbarMenuButton(constants.CreateNew(), packageNewMenu());
        pkgToolbar.addButton( menuButton );

        menuButton.addListener( new SplitButtonListenerAdapter() {

            public void onClick(Button button,
                                EventObject e) {
                menuButton.showMenu();
            }
        } );
       
        packagesPanel = new VerticalPanel();
        packagesPanel.setWidth("100%");
View Full Code Here


        Menu layoutMenu = new Menu();
        showMetadata.addListener( refresh );
        layoutMenu.addItem( showMetadata );
        showDescription.addListener( refresh );
        layoutMenu.addItem( showDescription );
        ToolbarMenuButton layout = new ToolbarMenuButton( constants.Show(),
                                                          layoutMenu );
        toolbar.addButton( layout );

        return toolbar;
    }
View Full Code Here

   * @param action
   * @return
   */
  public static ToolbarMenuButton createToolbarMenuButton( IGWTAction action ) {

    ToolbarMenuButton button = new ToolbarMenuButton( action.getText() );
    button.addListener( action );
    button.setIcon( action.getImageName() );
    if ( action.getTooltipText() != null ) {
      button.setTooltip( action.getTooltipText() );
    }
    action.registerComponent( button );

    return button;
  }
View Full Code Here

    menu.addItem( item );
    item = UIFactory.createMenuItem( ActionRegistry.REPLY_ALL.get() );
    item.setText( TextProvider.get().toolbar_manager_to_originator() );
    menu.addItem( item );

    ToolbarMenuButton menuButton = UIFactory.createToolbarMenuButton( ActionRegistry.REPLY.get() );
    menuButton.setMenu( menu );
    this.workbenchToolbar.addButton( menuButton );
    this.messageToolbarButtons.add( menuButton );

    separator = new ToolbarSeparator();
    this.messageToolbarItems.add( separator );

    this.messageToolbarButtons.add( toolbarButton );
    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.FORWARD.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.messageToolbarButtons.add( toolbarButton );
    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.DELETE_MESSAGES.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.messageToolbarButtons.add( toolbarButton );

    this.markToolbarButton = new ToolbarButton( TextProvider.get().toolbar_manager_mark() );
    this.markToolbarButton.setIcon( ImageProvider.MSG_MARK );
    this.workbenchToolbar.addButton( this.markToolbarButton );
    this.messageToolbarButtons.add( this.markToolbarButton );

    menu = new Menu();
    menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_READ.get() ) );
    menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_UNREAD.get() ) );
    menu.addItem( new Separator() );
    menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_DELETED.get() ) );
    menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_UNDELETED.get() ) );
    this.markToolbarButton.setMenu( menu );

    separator = new ToolbarSeparator();
    this.workbenchToolbar.addItem( separator );
    this.messageToolbarItems.add( separator );

    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.PRINT_MESSAGE.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.messageToolbarButtons.add( toolbarButton );
    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.SHOW_MESSAGE_SOURCE.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.messageToolbarButtons.add( toolbarButton );
    disableMessageToolbar( true );

    // add contact toolbar buttons
    this.contactToolbarButtons = new ArrayList<ToolbarButton>();
    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.ADD_CONTACT.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.contactToolbarButtons.add( toolbarButton );
    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.NEW_MESSAGE_FOR_CONTACT.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.contactToolbarButtons.add( toolbarButton );
    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.EDIT_CONTACT.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.contactToolbarButtons.add( toolbarButton );
    toolbarButton = UIFactory.createToolbarButton( ActionRegistry.DELETE_CONTACT.get() );
    this.workbenchToolbar.addButton( toolbarButton );
    this.contactToolbarButtons.add( toolbarButton );
    hideContactToolbarItems();
    disableContactToolbar( true );

    // common buttons
    this.workbenchToolbar.addSeparator();
    // Reading pane

    menu = new Menu();
    item = new MenuItem();
    item.setText( TextProvider.get().actions_reading_pane_right() );
    item.setIcon( ImageProvider.MSG_READING_PANE_RIGHT );
    item.setStateId( String.valueOf( Preferences.READING_PANE_RIGHT ) );
    item.addListener( ActionRegistry.READING_PANE.get() );
    menu.addItem( item );
    item = new MenuItem();
    item.setText( TextProvider.get().actions_reading_pane_bottom() );
    item.setIcon( ImageProvider.MSG_READING_PANE_BOTTOM );
    item.setStateId( String.valueOf( Preferences.READING_PANE_BOTTOM ) );
    item.addListener( ActionRegistry.READING_PANE.get() );
    menu.addItem( item );
    item = new MenuItem();
    item.setText( TextProvider.get().actions_reading_pane_hide() );
    item.setIcon( ImageProvider.MSG_READING_PANE_HIDE );
    item.setStateId( String.valueOf( Preferences.READING_PANE_HIDE ) );
    item.addListener( ActionRegistry.READING_PANE.get() );
    menu.addItem( item );
    menuButton = UIFactory.createToolbarMenuButton( ActionRegistry.READING_PANE.get() );
    menuButton.setMenu( menu );
    this.workbenchToolbar.addButton( menuButton );

    this.workbenchToolbar.addButton( UIFactory.createToolbarButton( ActionRegistry.OPEN_PREFERENCES.get() ) );

    this.workbenchToolbar.addFill();
View Full Code Here

    menu.addItem( item );
    item = UIFactory.createMenuItem( ActionRegistry.REPLY_ALL.get() );
    item.setText( TextProvider.get().toolbar_manager_to_all() );
    menu.addItem( item );

    ToolbarMenuButton menuButton = UIFactory.createToolbarMenuButton( ActionRegistry.REPLY.get() );
    menuButton.setMenu( menu );
    this.openMessageToolbar.addButton( menuButton );
    this.openMessageToolbar.addButton( UIFactory.createToolbarButton( ActionRegistry.FORWARD.get() ) );

    this.openMessageToolbar.addSeparator();
    this.openMessageToolbar.addButton( UIFactory.createToolbarButton( ActionRegistry.DELETE_WINDOW_MESSAGE.get() ) );
View Full Code Here

                                       selectedCell[1] );
                }
            }
        } );
        //    grid.setSelectionModel(new RowSelectionModel(false));
        ToolbarMenuButton tbb = new ToolbarMenuButton( constants.Modify(),
                                                       menu );
        tb.addButton( tbb );
        grid.add( tb );

        grid.addEditorGridListener( new EditorGridListenerAdapter() {
View Full Code Here

        super(constants.PackageSnapshots(), tabbedPanel);
        setIconCls("nav-deployment"); //NON-NLS

        final VerticalPanel deploymentPanel = new VerticalPanel();
        Toolbar deployToolbar = new Toolbar();
        final ToolbarMenuButton menuButton = new ToolbarMenuButton(constants.Deploy(), deploymentMenu());
        deployToolbar.addButton( menuButton );
        deploymentPanel.add(deployToolbar);
        deploymentPanel.setWidth("100%");

        menuButton.addListener( new SplitButtonListenerAdapter() {
            public void onClick(Button button,
                                EventObject e) {
                menuButton.showMenu();
            }
        } );

        addListener(new PanelListenerAdapter() {
            public void onExpand(Panel panel) {
View Full Code Here

        setIconCls("nav-categories"); //NON-NLS

       
        Toolbar rulesToolBar = new Toolbar();

        final ToolbarMenuButton menuButton = new ToolbarMenuButton(constants.CreateNew(),
                                                            RulesNewMenu.getMenu( this ) );
        rulesToolBar.addButton( menuButton );
        menuButton.addListener( new SplitButtonListenerAdapter() {

            public void onClick(Button button,
                                EventObject e) {
                menuButton.showMenu();
            }
        } );
       
        VerticalPanel rulesPanel = new VerticalPanel();
        if (ExplorerLayoutManager.shouldShow(Capabilities.SHOW_CREATE_NEW_ASSET)) {
View Full Code Here

            store.add(r);
        }
          renumber(store.getRecords());
          }
        }));
        ToolbarMenuButton tbb = new ToolbarMenuButton(constants.Modify(), menu);

        tb.addButton(tbb);
        grid.add(tb);

View Full Code Here

    public PackagesPanel(ExplorerViewCenterPanel tabbedPanel) {
        super(constants.Packages(), tabbedPanel);
        setIconCls("nav-packages"); //NON-NLS

        Toolbar pkgToolbar = new Toolbar();
        final ToolbarMenuButton menuButton = new ToolbarMenuButton(constants.CreateNew(), packageNewMenu());
        pkgToolbar.addButton( menuButton );

        menuButton.addListener( new SplitButtonListenerAdapter() {

            public void onClick(Button button,
                                EventObject e) {
                menuButton.showMenu();
            }
        } );
       
        packagesPanel = new VerticalPanel();
        packagesPanel.setWidth("100%");
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.ToolbarMenuButton

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.