Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Menu.dispose()


    while (!widget.isDisposed() && widget.isVisible()) {
      if (!display.readAndDispatch())
        display.sleep();
    }
    if (!widget.isDisposed()) {
      widget.dispose();
    }
  }
 
  /**
   * Hook to fill a menu manager with the items of the sub menu.
View Full Code Here


      }
    });

    buttonBar.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        conditionMenu.dispose();
      }
    });

    /* Button to delete Condition */
    ToolItem deleteButton = new ToolItem(buttonBar, SWT.PUSH);
View Full Code Here

      }
    });

    addButton.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        menu.dispose();
      }
    });

    /* Remove */
    fRemoveButton = new Button(buttonContainer, SWT.PUSH);
View Full Code Here

      }
    });

    buttonBar.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        actionMenu.dispose();
      }
    });

    /* Button to delete Action */
    ToolItem deleteButton = new ToolItem(buttonBar, SWT.PUSH);
View Full Code Here

    display.syncExec(new Runnable() {
      public void run() {
        Menu menu = (Menu)menuLookup.get(name);       
        MenuItem menuItem = (MenuItem)menuItemLookup.get(name);
        if(menu != null) {
          menu.dispose();
          menuItem.dispose();
          menuLookup.remove(name);
          menuItemLookup.remove(name);
        }
      }
View Full Code Here

        checkWidget();
        this.contextMenu = contextMenu;
        if (tableViewer != null && tableViewer.getControl() != null) {
            Menu oldMenu = tableViewer.getControl().getMenu();
            if (oldMenu != null)
                oldMenu.dispose();
            Menu menu = contextMenu.createContextMenu(tableViewer.getControl());
            tableViewer.getControl().setMenu(menu);
        }
    }
View Full Code Here

                        {
                            display.sleep();
                        }
                    }

                    menu.dispose();
                }
            });
    }

    /**
 
View Full Code Here

                            }

                            public void widgetDefaultSelected( SelectionEvent e ) {
                                setCurrentTool(tool);
                                runCurrentTool();
                                menu.dispose();
                            }
                        });
                    }
                    menu.setVisible(true);
                } else {
View Full Code Here

                        {
                            display.sleep();
                        }
                    }

                    menu.dispose();
                }
            });
    }

    /**
 
View Full Code Here

                          Display.getCurrent()
                              .asyncExec(
                                  new Runnable() {

                                    public void run() {
                                      createContextMenu
                                          .dispose();

                                    }
                                  });
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.