當前位置: 首頁>>代碼示例>>Java>>正文


Java Control.isDisposed方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.Control.isDisposed方法的典型用法代碼示例。如果您正苦於以下問題:Java Control.isDisposed方法的具體用法?Java Control.isDisposed怎麽用?Java Control.isDisposed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.Control的用法示例。


在下文中一共展示了Control.isDisposed方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addControlDisposeListener

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
/**
 * Adds a {@link DisposeListener} to the created {@link Control}. Listeners can be added either before or after the
 * Control is created.
 * 
 * @param disposeListener The {@link DisposeListener} to add.
 * 
 * @see Control#addControlDisposeListener(DisposeListener)
 */
public void addControlDisposeListener(DisposeListener disposeListener) {

    Control control = getControl();
    if (control != null) {
        if (control.isDisposed()) {
            return;
        }

        control.addDisposeListener(disposeListener);
    }
    else {
        if (_DisposeListeners == null) {
            _DisposeListeners = new LinkedHashSet<DisposeListener>();
        }

        _DisposeListeners.add(disposeListener);
    }
}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:27,代碼來源:BaseControlContribution.java

示例2: tableSelectionChanged

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
private void tableSelectionChanged(TableItem item) {

        Button setIdButton = getSetIdButton();
        setIdButton.setEnabled(SCHEME_DIGEST.equals(item.getText(TABLE_COLUMN_SCHEME)));

        Button removeButton = getRemoveButton();
        removeButton.setEnabled(item != null);

        initSchemeTableEditor(item);
        initIdTableEditor(item);

        Control idEditor = _IdTableEditor.getEditor();
        if (idEditor != null && !idEditor.isDisposed()) {
            idEditor.setFocus();
        }
    }
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:17,代碼來源:ZnodeAclComposite.java

示例3: rebuild

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
public void rebuild(BatchScriptModel model) {
	if (model == null) {
		return;
	}
	contentProvider.rebuildTree(model);

	TreeViewer treeViewer = getTreeViewer();
	if (treeViewer != null) {
		Control control = treeViewer.getControl();
		if (control == null || control.isDisposed()){
			return;
		}
		treeViewer.setInput(model);
	}
}
 
開發者ID:de-jcup,項目名稱:eclipse-batch-editor,代碼行數:16,代碼來源:BatchEditorContentOutlinePage.java

示例4: addViewerControlDisposeListener

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
private void addViewerControlDisposeListener() {
    StructuredViewer viewer = getViewer();
    if (viewer == null) {
        return;
    }
    Control control = viewer.getControl();
    if (control.isDisposed()) {
        return;
    }

    control.addDisposeListener(_ControlDisposeListener);
}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:13,代碼來源:ElementBinding.java

示例5: rebuild

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
public void rebuild(BashScriptModel model) {
	if (model == null) {
		return;
	}
	contentProvider.rebuildTree(model);

	TreeViewer treeViewer = getTreeViewer();
	if (treeViewer != null) {
		Control control = treeViewer.getControl();
		if (control == null || control.isDisposed()){
			return;
		}
		treeViewer.setInput(model);
	}
}
 
開發者ID:de-jcup,項目名稱:eclipse-bash-editor,代碼行數:16,代碼來源:BashEditorContentOutlinePage.java

示例6: setHeight

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
public static int setHeight(FormData fd, Control control, int rowcount) {
	int height = 0;
	if (control != null && !control.isDisposed()) {
		GC gc = new GC(control);
		try {
			gc.setFont(JFaceResources.getDialogFont());
			fd.height = Dialog.convertHeightInCharsToPixels(gc.getFontMetrics(), rowcount);
		} finally {
			gc.dispose();
		}
	}
	return height;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:14,代碼來源:EdgeJavaScriptSection.java

示例7: refreshViewer

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
public static void refreshViewer(Viewer viewer) {
	Control widget = viewer.getControl();
	if (widget.isDisposed()) {
		return;
	}

	widget.getDisplay().asyncExec(() -> {
		Control ctrl = widget;
		if (ctrl == null || ctrl.isDisposed()) {
			return;
		}

		viewer.refresh();
	});
}
 
開發者ID:sebez,項目名稱:vertigo-chroma-kspplugin,代碼行數:16,代碼來源:UiUtils.java

示例8: dataSourceChanged

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
@Override
public Object dataSourceChanged(SWTSkinObject skinObject, Object params) {
	datasource = params;
	if (soListArea != null) {
		Control control = soListArea.getControl();

		if ( !control.isDisposed()){

			control.setData("DataSource", params);
		}
	}

	return null;
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:15,代碼來源:SBC_LibraryView.java

示例9: ShellDocker

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
public ShellDocker(Control anchorControl, Shell dockedShell) {
	if (null == anchorControl || anchorControl.isDisposed()) {
		throw new NullPointerException("anchorControl cannot be null or disposed");
	}
	if (null == dockedShell || dockedShell.isDisposed()) {
		throw new NullPointerException("dockedShell cannot be null or disposed");
	}

	this.anchorControl = anchorControl;
	this.dockedShell = dockedShell;
	mainShell = anchorControl.getShell();
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:13,代碼來源:ShellDocker.java

示例10: redraw

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
public void redraw() {
	TreeViewer viewer = getTreeViewer();
	if (viewer != null) {
		Control control = viewer.getControl();
		if ((control != null) && (!control.isDisposed())) {
			control.setRedraw(false);
			viewer.expandAll();
			control.setRedraw(true);
		}
	}
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:12,代碼來源:PropertiesOutlinePage.java

示例11: outlinePageVisible

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
protected boolean outlinePageVisible(BatchEditorContentOutlinePage outlinePage) {
	Control control = outlinePage.getControl();
	/* when control is not available - means outline view is not visible, */
	boolean controlAvailable = control==null || control.isDisposed() || ! control.isVisible();
	return controlAvailable;
}
 
開發者ID:de-jcup,項目名稱:eclipse-batch-editor,代碼行數:7,代碼來源:BatchQuickOutlineDialog.java

示例12: outlinePageVisible

import org.eclipse.swt.widgets.Control; //導入方法依賴的package包/類
protected boolean outlinePageVisible(BashEditorContentOutlinePage outlinePage) {
	Control control = outlinePage.getControl();
	/* when control is not available - means outline view is not visible, */
	boolean controlAvailable = control==null || control.isDisposed() || ! control.isVisible();
	return controlAvailable;
}
 
開發者ID:de-jcup,項目名稱:eclipse-bash-editor,代碼行數:7,代碼來源:BashQuickOutlineDialog.java


注:本文中的org.eclipse.swt.widgets.Control.isDisposed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。