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


Java PopupDialog类代码示例

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


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

示例1: Popup2

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public Popup2(final IPopupProvider provider, final Widget... controls) {
	super(WorkbenchHelper.getShell(), PopupDialog.HOVER_SHELLSTYLE, false, false, false, false, false, null, null);
	this.provider = provider;
	final Shell parent = provider.getControllingShell();
	parent.addListener(SWT.Move, hide);
	parent.addListener(SWT.Resize, hide);
	parent.addListener(SWT.Close, hide);
	parent.addListener(SWT.Deactivate, hide);
	parent.addListener(SWT.Hide, hide);
	parent.addListener(SWT.Dispose, event -> close());
	for (final Widget c : controls) {
		if (c == null) {
			continue;
		}
		final TypedListener typedListener = new TypedListener(mtl);
		c.addListener(SWT.MouseEnter, typedListener);
		c.addListener(SWT.MouseExit, typedListener);
		c.addListener(SWT.MouseHover, typedListener);
	}
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:21,代码来源:Popup2.java

示例2: GenericInfoPopupDialog

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public GenericInfoPopupDialog(Shell parentShell, String title, String message, final Runnable runnable)
{
	super(parentShell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE | SWT.MODELESS, false, true, true, false, false,
			title, null);
	this.message = message;

	clickListener = new MouseAdapter()
	{

		@Override
		public void mouseDown(MouseEvent e)
		{
			if (runnable != null)
			{
				runnable.run();
			}
			close();
		}
	};
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:21,代码来源:GenericInfoPopupDialog.java

示例3: AbstractInPlaceDialog

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public AbstractInPlaceDialog(Shell parent, int side, Control openControl) {
	super(parent, PopupDialog.INFOPOPUP_SHELLSTYLE, false, false, false, false, false, null, null);
	this.side = side;
	this.openControl = openControl;

	Rectangle bounds;
	if (openControl == null || openControl.isDisposed()) {
		bounds = new Rectangle(0, 0, 0, 0);
	} else {
		bounds = openControl.getBounds();
		Point absPosition = openControl.toDisplay(openControl.getLocation());
		bounds.x = absPosition.x - bounds.x;
		bounds.y = absPosition.y - bounds.y;
	}
	this.controlBounds = bounds;
	if (openControl != null) {
		openControl.addDisposeListener(disposeListener);
	}

}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:21,代码来源:AbstractInPlaceDialog.java

示例4: createDialogArea

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
protected Control createDialogArea(Composite parent) {
	text = new Text(parent, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP
			| SWT.NO_FOCUS);

	// Use the compact margins employed by PopupDialog.
	GridData gd = new GridData(GridData.BEGINNING
			| GridData.FILL_BOTH);
	gd.horizontalIndent = PopupDialog.POPUP_HORIZONTALSPACING;
	gd.verticalIndent = PopupDialog.POPUP_VERTICALSPACING;
	text.setLayoutData(gd);
	text.setText(contents);

	// since SWT.NO_FOCUS is only a hint...
	text.addFocusListener(new FocusAdapter() {
		public void focusGained(FocusEvent event) {
			ContentProposalPopup.this.close();
		}
	});
	return text;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:21,代码来源:ContentProposalAdapter.java

示例5: QuickLaunchDialog

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public QuickLaunchDialog(Shell parent, History<String> history)  {
	super(parent, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, GRAB_FOCUS, PERSIST_SIZE, PERSIST_BOUNDS,
			SHOW_DIALOG_MENU, SHOW_PERSIST_ACTIONS, TITLE, INFOTEXT);
	if (history==null){
		history= new History<>(10);
	}
	this.history=history;
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:9,代码来源:QuickLaunchDialog.java

示例6: createDialogArea

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	text = new Text(parent, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP
			| SWT.NO_FOCUS);

	// Use the compact margins employed by PopupDialog.
	GridData gd = new GridData(GridData.BEGINNING
			| GridData.FILL_BOTH);
	gd.horizontalIndent = PopupDialog.POPUP_HORIZONTALSPACING;
	gd.verticalIndent = PopupDialog.POPUP_VERTICALSPACING;
	text.setLayoutData(gd);
	text.setText(contents);

	// since SWT.NO_FOCUS is only a hint...
	text.addFocusListener(new FocusAdapter() {
		@Override
		public void focusGained(FocusEvent event) {
			ContentProposalPopup.this.close();
		}
	});
	return text;
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:23,代码来源:MyContentProposalAdapter.java

示例7: QuickOutline

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public QuickOutline(Shell parent, JsonEditor editor, String fileContentType) {
      super(parent, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, true, true, true, true, true, null, null);
this.fileContentType = fileContentType;

      IBindingService bindingService = (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
      this.bindingKey = bindingService.getBestActiveBindingFormattedFor(COMMAND_ID);
      this.triggerSequence = bindingService.getBestActiveBindingFor(COMMAND_ID);
      this.editor = editor;

      setInfoText(statusMessage());
      create();
  }
 
开发者ID:RepreZen,项目名称:KaiZen-OpenAPI-Editor,代码行数:13,代码来源:QuickOutline.java

示例8: PartialTranslationDialog

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
/**
 * The constructor
 *
 * @param shell
 *            is the shell of the SuggestionBubble that is parent of this
 *            dialog
 * @param parent
 *            is the parent of this dialog.
 */
public PartialTranslationDialog(Shell shell, SuggestionBubble parent) {
	this.parent = parent;
	this.shell = shell;

	if (System.getProperty("os.name").toLowerCase().contains("windows")) {
		SHELL_STYLE = PopupDialog.INFOPOPUP_SHELLSTYLE;
		win = true;
	} else {
		SHELL_STYLE = PopupDialog.HOVER_SHELLSTYLE;
		win = false;
	}

}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:23,代码来源:PartialTranslationDialog.java

示例9: getPopup

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
static Shell getPopup() {
	if (popup == null || popup.isDisposed() || popup.getShell() == null || popup.getShell().isDisposed()) {
		popup = new Shell(WorkbenchHelper.getShell(), PopupDialog.HOVER_SHELLSTYLE);
		popup.setLayout(new GridLayout(1, true));
	}
	return popup;

}
 
开发者ID:gama-platform,项目名称:gama,代码行数:9,代码来源:Popup.java

示例10: TitaniumUpdatePopup

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public TitaniumUpdatePopup(Shell parentShell, final Runnable updateAction)
{
	super(parentShell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE | SWT.MODELESS, false, true, true, false, false,
			MessageFormat.format(EplMessages.TitaniumUpdatePopup_update_title, EclipseUtil.getStudioPrefix()), null);

	clickListener = new MouseAdapter()
	{
		public void mouseDown(MouseEvent e)
		{
			updateAction.run();
			close();
		}
	};

}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:16,代码来源:TitaniumUpdatePopup.java

示例11: initializeDefaultImages

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
/**
	 * Initialize default images in JFace's image registry.
	 * 
	 */
	private static void initializeDefaultImages() {

		Object bundle = null;
//		try {
			// bundle = JFaceActivator.getBundle();
//		} catch (NoClassDefFoundError exception) {
//			// Test to see if OSGI is present
//		}
		declareImage(bundle, Wizard.DEFAULT_IMAGE, ICONS_PATH + "page.gif", //$NON-NLS-1$
				Wizard.class, "images/page.gif"); //$NON-NLS-1$

		// register default images for dialogs
		declareImage(bundle, Dialog.DLG_IMG_MESSAGE_INFO, ICONS_PATH
				+ "message_info.gif", Dialog.class, "images/message_info.gif"); //$NON-NLS-1$ //$NON-NLS-2$
		declareImage(bundle, Dialog.DLG_IMG_MESSAGE_WARNING, ICONS_PATH
				+ "message_warning.gif", Dialog.class, //$NON-NLS-1$
				"images/message_warning.gif"); //$NON-NLS-1$
		declareImage(bundle, Dialog.DLG_IMG_MESSAGE_ERROR, ICONS_PATH
				+ "message_error.gif", Dialog.class, "images/message_error.gif");//$NON-NLS-1$ //$NON-NLS-2$
		declareImage(bundle, Dialog.DLG_IMG_HELP,
				ICONS_PATH + "help.gif", Dialog.class, "images/help.gif");//$NON-NLS-1$ //$NON-NLS-2$
		declareImage(
				bundle,
				TitleAreaDialog.DLG_IMG_TITLE_BANNER,
				ICONS_PATH + "title_banner.png", TitleAreaDialog.class, "images/title_banner.gif");//$NON-NLS-1$ //$NON-NLS-2$
		declareImage(
				bundle,
				PreferenceDialog.PREF_DLG_TITLE_IMG,
				ICONS_PATH + "pref_dialog_title.gif", PreferenceDialog.class, "images/pref_dialog_title.gif");//$NON-NLS-1$ //$NON-NLS-2$
		declareImage(bundle, PopupDialog.POPUP_IMG_MENU, ICONS_PATH
				+ "popup_menu.gif", PopupDialog.class, "images/popup_menu.gif");//$NON-NLS-1$ //$NON-NLS-2$
		declareImage(
				bundle,
				PopupDialog.POPUP_IMG_MENU_DISABLED,
				ICONS_PATH + "popup_menu_disabled.gif", PopupDialog.class, "images/popup_menu_disabled.gif");//$NON-NLS-1$ //$NON-NLS-2$
	}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:41,代码来源:JFaceResources.java

示例12: SelectionDialog

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
@SuppressWarnings("deprecation")	// backward compatibility
public SelectionDialog(Shell parent, ISelectExecute mini, ITextEditor editor) {
	// Europa compatible constructor
	super((Shell) null, PopupDialog.HOVER_SHELLSTYLE, false, false, false, false, null, null);
	this.editor = editor;
	this.minibuffer = mini;
}
 
开发者ID:MulgaSoft,项目名称:e4macs,代码行数:8,代码来源:SelectionDialog.java

示例13: TeamExplorerSearchControlPopup

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public TeamExplorerSearchControlPopup(final TeamExplorerSearchControl searchControl) {
    // HOVER_SHELLSTYLE cannot get focus, which is nice in this case
    super(searchControl.getShell(), PopupDialog.HOVER_SHELLSTYLE, false, false, false, false, false, null, null);

    this.searchControl = searchControl;
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:7,代码来源:TeamExplorerSearchControlPopup.java

示例14: sendDialogOpened

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
public static void sendDialogOpened(final PopupDialog dialog, final Map<String, String> properties) {
    Check.notNull(dialog, "dialog"); //$NON-NLS-1$

    final String dialogName = getName(dialog);
    sendDialogOpened(dialogName, properties);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:7,代码来源:ClientTelemetryHelper.java

示例15: InfoPopupDialog

import org.eclipse.jface.dialogs.PopupDialog; //导入依赖的package包/类
InfoPopupDialog(Shell parent) {
	super(parent, PopupDialog.HOVER_SHELLSTYLE, false, false, false,
			false, false, null, null);
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:5,代码来源:MyContentProposalAdapter.java


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