当前位置: 首页>>代码示例>>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;未经允许,请勿转载。