当前位置: 首页>>代码示例>>Java>>正文


Java Shell.setVisible方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Shell.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java Shell.setVisible方法的具体用法?Java Shell.setVisible怎么用?Java Shell.setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Shell的用法示例。


在下文中一共展示了Shell.setVisible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: show

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Build and show the Windows, dispose it after is is not longer needed.
 * @param parentShell The parent windows' Shell.
 * @param classLoader The system MugglClassLoader.
 * @param classFile The classFile the initial Method belongs to.
 * @param method The initial Method.
 */
public void show(Shell parentShell, MugglClassLoader classLoader, ClassFile classFile, Method method) {
	try {
		this.display = Display.getDefault();
		if (createShell(parentShell, classLoader, classFile, method))
		this.shell.open();

		// Now make the parent shell invisible.
		parentShell.setVisible(false);

		// Keep the window alive.
		while (!this.shell.isDisposed()) {
			if (!this.display.readAndDispatch())
				this.display.sleep();
			}
	} catch (Throwable t) {
		StaticGuiSupport.processGuiError(t, "Step by step execution", parentShell);
	} finally {
		//Make the parent shell visible.
		parentShell.setVisible(true);
		// Make sure execution is aborted. Otherwise the Thread would not be stopped and the memory released after this window is closed.
		if (this.stepByStepExecutionComposite != null) this.stepByStepExecutionComposite.abortExecution(false);
		doExit();
	}
}
 
开发者ID:wwu-pi,项目名称:tap17-muggl-javaee,代码行数:32,代码来源:StepByStepExecutionWindow.java

示例2: show

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Build and show the Windows, dispose it after is is not longer needed.
 * @param parentShell The parent windows' Shell.
 * @param classLoader The system MugglClassLoader.
 * @param classFile The classFile the initial Method belongs to.
 * @param method The initial Method.
 */
public void show(Shell parentShell, MugglClassLoader classLoader, ClassFile classFile, Method method) {
	try {
		this.parentShell = parentShell;
		this.display = Display.getDefault();
		if (createShell(parentShell, classLoader, classFile, method))
		this.shell.open();

		// Now make the parent shell invisible.
		parentShell.setVisible(false);

		// Keep the window alive.
		while (!this.shell.isDisposed()) {
			if (!this.display.readAndDispatch())
				this.display.sleep();
			}
	} catch (Throwable t) {
		StaticGuiSupport.processGuiError(t, "step by step execution", parentShell);
	} finally {
		// Make the parent shell visible.
		if (!parentShell.isDisposed())
			parentShell.setVisible(true);

		// Make sure execution is aborted. Otherwise the Thread would not be stopped and the memory released after this window is closed.
		if (this.executionComposite != null) this.executionComposite.abortExecution();
		doExit();
	}
}
 
开发者ID:wwu-pi,项目名称:tap17-muggl-javaee,代码行数:35,代码来源:ExecutionWindow.java

示例3: open

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
/**
 * Opens this window, creating it first if it has not yet been created.
 * <p>
 * This method is reimplemented for special configuration of PopupDialogs.
 * It never blocks on open, immediately returning <code>OK</code> if the
 * open is successful, or <code>CANCEL</code> if it is not. It provides
 * framework hooks that allow subclasses to set the focus and tab order, and
 * avoids the use of <code>shell.open()</code> in cases where the focus
 * should not be given to the shell initially.
 * 
 * @return the return code
 * 
 * @see org.eclipse.jface.window.Window#open()
 */
public int open() {

	Shell shell = getShell();
	if (shell == null || shell.isDisposed()) {
		shell = null;
		// create the window
		create();
		shell = getShell();
	}

	// provide a hook for adjusting the bounds. This is only
	// necessary when there is content driven sizing that must be
	// adjusted each time the dialog is opened.
	adjustBounds();

	// limit the shell size to the display size
	constrainShellSize();

	// set up the tab order for the dialog
	setTabOrder((Composite) getContents());

	// initialize flags for listening to deactivate
	listenToDeactivate = false;
	listenToParentDeactivate = false;

	// open the window
	if (takeFocusOnOpen) {
		shell.open();
		getFocusControl().setFocus();
	} else {
		shell.setVisible(true);
	}

	return OK;

}
 
开发者ID:sergueik,项目名称:SWET,代码行数:51,代码来源:PopupDialog.java

示例4: open

import org.eclipse.swt.widgets.Shell; //导入方法依赖的package包/类
@Override
public void open() {
	UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();
	if (uiFunctions != null) {
		Boolean bringToFront = (Boolean)getData( "bringToFront" );
		if ( bringToFront == null || bringToFront ){
			Shell mainShell = uiFunctions.getMainShell();
			if (mainShell != null && mainShell.getMinimized()) {
				uiFunctions.bringToFront();
			}
		}
	}

	Shell firstShellWithStyle = Utils.findFirstShellWithStyle(SWT.APPLICATION_MODAL);
	if (firstShellWithStyle != null && firstShellWithStyle != this) {
		// ok, there's a window with application_modal set, which on OSX will mean
		// that if we open our window, it will be on top, but users won't be able
		// to interact with it.  So, wait until the modal window goes away..
		firstShellWithStyle.addDisposeListener(new DisposeListener() {
			@Override
			public void widgetDisposed(DisposeEvent e) {
				// wait for dispose to complete, then run open again to check for
				// any new application modal shells to wait for
				Utils.execSWTThreadLater(0, new AERunnable() {
					@Override
					public void runSupport() {
						AEShell.this.open();
					}
				});
			}
		});
		firstShellWithStyle.setVisible(true);
		firstShellWithStyle.forceActive();
	} else {
		if (!isDisposed()) {
			super.open();
		}
	}
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:40,代码来源:ShellFactory.java


注:本文中的org.eclipse.swt.widgets.Shell.setVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。