Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ToolBar.addListener()


            // Handle Context Menu
            // ToolBarManager.createControl can actually return a pre-existing control.
            // Only add the listener if the toolbar was newly created (bug 62097).
            if (oldToolBar != toolBar) {
              toolBar.addListener(SWT.MenuDetect, new Listener() {
 
                  public void handleEvent(Event event) {
                      // if the toolbar does not have its own context menu then
                      // handle the event
                      if (toolBarManager.getContextMenuManager() == null) {
View Full Code Here


      // Create the docking context menu
      dockMenuManager = new MenuManager();
      dockContributionItem = getDockingContribution();
        dockMenuManager.add(dockContributionItem);

        tb.addListener(SWT.MenuDetect, tbListener);
        cb.addListener(SWT.MenuDetect, cbListener);
       
        //tbMgr.getControl().setBackground(cb.getDisplay().getSystemColor(SWT.COLOR_GREEN));
        //tbMgr.getControl().pack(true);
        cb.pack(true);
View Full Code Here

            // Handle Context Menu
            // ToolBarManager.createControl can actually return a pre-existing control.
            // Only add the listener if the toolbar was newly created (bug 62097).
            if (oldToolBar != toolBar) {
              toolBar.addListener(SWT.MenuDetect, new Listener() {
 
                  public void handleEvent(Event event) {
                      // if the toolbar does not have its own context menu then
                      // handle the event
                      if (toolBarManager.getContextMenuManager() == null) {
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.