Package org.eclipse.swt.widgets

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


  public void testRegistersDisposeListenerOnControl() {
    SwipeItemProvider itemProvider = mockProvider( 0 );
    Swipe swipe = new Swipe( shell, itemProvider );
    Control control = swipe.getControl();

    control.dispose();

    verify( environment.getRemoteObject() ).destroy();
  }

  @Test
View Full Code Here


  protected void updateServicesTable() {

    Control content = scrollComp.getContent();
    if (content != null) {
      content.dispose();
    }

    if (allServicesList.isEmpty()) {
      Composite labelComp = new Composite(scrollComp, SWT.NONE);
      GridLayout layout = new GridLayout();
View Full Code Here

          final boolean enabled = table.getSelectionCount() == 1;
          browseButton.setEnabled(enabled);
          removeButton.setEnabled(enabled);
         
          final Control oldEditor = tableEditor.getEditor();
          if (oldEditor != null) oldEditor.dispose();
         
          if (enabled) {
            final TableItem item = WebRootsList.this.table.getSelection()[0];
            Text newEditor = new Text(table, SWT.NONE);
            newEditor.setText(item.getText(0));
View Full Code Here

                Control ws[] = statusLine.getChildren();
                for (int i = 0; i < ws.length; i++) {
                    Control w = ws[i];
                    Object data = w.getData();
                    if (data instanceof IContributionItem) {
                        w.dispose();
                    }
                }

                int oldChildCount = statusLine.getChildren().length;
                IContributionItem[] items = getItems();
View Full Code Here

            // control to null will cause an SWT exception, workaround
            // for 19630
            if ((control != null) && !control.isDisposed()) {
                item.setControl(null);
                // we created it, we dispose it, see bug 293433
              control.dispose();
            }
            item.dispose();
        }
    }
View Full Code Here

                CoolItem coolItem = (CoolItem) coolItemsToRemove.get(i);
                if (!coolItem.isDisposed()) {
                    Control control = coolItem.getControl();
                    if (control != null) {
                        coolItem.setControl(null);
                        control.dispose();
                    }
                    coolItem.dispose();
                }
            }
View Full Code Here

                final CoolItem item = coolItems[i];
                if (!item.isDisposed()) {
                    Control control = item.getControl();
                    if (control != null) {
                        item.setControl(null);
                        control.dispose();
                    }
                    item.dispose();
                    changed = true;
                }
            }
View Full Code Here

        IBaseLabelProvider labelProvider = tableViewer.getLabelProvider();
        if (labelProvider != null)
            labelProvider.dispose();
        Control control = tableViewer.getControl();
        if (control != null)
            control.dispose();
        tableViewer = null;
    }

    private void setCellEditors( IAdaptable adaptable, int attributeCount ) {
        if (adaptable.getAdapter(CellEditor[].class) != null) {
View Full Code Here

        // their
        // dispose method.
        // The page's control is a child of this view's control so if
        // this view
        // is closed, the page's control will already be disposed.
        control.dispose();
      }

      if (site instanceof PageSite) {
        ((PageSite) site).dispose();
      }
View Full Code Here

    // dispose item before disposing editor, in case there's an exception
    // in editor's dispose
    item.dispose();

    if (pageControl != null) {
      pageControl.dispose();
    }

    // dispose editor (if any)
    if (editor != null) {
      nestedEditors.remove(editor);
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.