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


Java WindowEvent类代码示例

本文整理汇总了Java中org.eclipse.swt.browser.WindowEvent的典型用法代码示例。如果您正苦于以下问题:Java WindowEvent类的具体用法?Java WindowEvent怎么用?Java WindowEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setBrowser

import org.eclipse.swt.browser.WindowEvent; //导入依赖的package包/类
@Override
public void
setBrowser(
	WindowEvent		event )
{
	event.browser = browser;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:8,代码来源:BrowserWrapperSWT.java

示例2: openWindow

import org.eclipse.swt.browser.WindowEvent; //导入依赖的package包/类
/**
 * Opens a new browser window.
 * 
 * @param event
 *            the open window event
 */
private void openWindow(WindowEvent event) {
	IWorkbench workbench = getSite().getWorkbenchWindow().getWorkbench();

	Shell shell = new Shell(workbench.getDisplay());
	shell.setText("New Window");
	shell.setLayout(new FillLayout());
	Browser browser = new Browser(shell, SWT.NONE);

	if (event.location != null)
		shell.setLocation(event.location);
	if (event.size != null)
		shell.setLocation(event.size);
	BrowserView view = findBrowser(getSite().getWorkbenchWindow());
	Assert.isNotNull(view);
	event.browser = view.browser;
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:23,代码来源:BrowserView.java

示例3: hookOpenListner

import org.eclipse.swt.browser.WindowEvent; //导入依赖的package包/类
public void hookOpenListner() {
	openLisenter = new OpenWindowListener() {
		@Override
		public void open(WindowEvent event) {
			event.required=true;
			BrowserComponent app = new BrowserComponent(false);
			event.browser = app.getBrowser();
		}
	};
	browser.addOpenWindowListener(openLisenter);

}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:13,代码来源:BrowserTab.java

示例4: internalCreatePartControl

import org.eclipse.swt.browser.WindowEvent; //导入依赖的package包/类
@Override
protected void internalCreatePartControl(Composite parent) {
	try {
		fBrowser= new Browser(parent, SWT.NONE);
		fBrowser.setJavascriptEnabled(false);
		fIsUsingBrowserWidget= true;
		addLinkListener(fBrowser);
		fBrowser.addOpenWindowListener(new OpenWindowListener() {
			public void open(WindowEvent event) {
				event.required= true; // Cancel opening of new windows
			}
		});

	} catch (SWTError er) {

		/* The Browser widget throws an SWTError if it fails to
		 * instantiate properly. Application code should catch
		 * this SWTError and disable any feature requiring the
		 * Browser widget.
		 * Platform requirements for the SWT Browser widget are available
		 * from the SWT FAQ web site.
		 */

		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
		boolean doNotWarn= store.getBoolean(DO_NOT_WARN_PREFERENCE_KEY);
		if (WARNING_DIALOG_ENABLED) {
			if (!doNotWarn) {
				String title= InfoViewMessages.JavadocView_error_noBrowser_title;
				String message= InfoViewMessages.JavadocView_error_noBrowser_message;
				String toggleMessage= InfoViewMessages.JavadocView_error_noBrowser_doNotWarn;
				MessageDialogWithToggle dialog= MessageDialogWithToggle.openError(parent.getShell(), title, message, toggleMessage, false, null, null);
				if (dialog.getReturnCode() == Window.OK)
					store.setValue(DO_NOT_WARN_PREFERENCE_KEY, dialog.getToggleState());
			}
		}

		fIsUsingBrowserWidget= false;
	}

	if (!fIsUsingBrowserWidget) {
		fText= new StyledText(parent, SWT.V_SCROLL | SWT.H_SCROLL);
		fText.setEditable(false);
		fPresenter= new HTMLTextPresenter(false);

		fText.addControlListener(new ControlAdapter() {
			/*
			 * @see org.eclipse.swt.events.ControlAdapter#controlResized(org.eclipse.swt.events.ControlEvent)
			 */
			@Override
			public void controlResized(ControlEvent e) {
				doSetInput(fOriginalInput);
			}
		});
	}

	initStyleSheet();
	listenForFontChanges();
	getViewSite().setSelectionProvider(new SelectionProvider(getControl()));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:60,代码来源:JavadocView.java

示例5: setBrowser

import org.eclipse.swt.browser.WindowEvent; //导入依赖的package包/类
@Override
public void
setBrowser(
	WindowEvent		event )
{
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:7,代码来源:BrowserWrapperFake.java


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