Example usage for org.eclipse.jface.dialogs PopupDialog HOVER_SHELLSTYLE

List of usage examples for org.eclipse.jface.dialogs PopupDialog HOVER_SHELLSTYLE

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs PopupDialog HOVER_SHELLSTYLE.

Prototype

int HOVER_SHELLSTYLE

To view the source code for org.eclipse.jface.dialogs PopupDialog HOVER_SHELLSTYLE.

Click Source Link

Document

Shell style appropriate for a simple hover popup that cannot get focus.

Usage

From source file:com.microsoft.tfs.client.common.ui.controls.teamexplorer.TeamExplorerSearchControlPopup.java

License:Open Source License

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);//from w w  w.j a  v  a2 s. c o m

    this.searchControl = searchControl;
}

From source file:com.mousefeed.eclipse.NagPopUp.java

License:Open Source License

/**
 * Creates a pop-up with notification for the specified accelerator
 * and action./*w  w w. j av  a  2s . co m*/
 *
 * @param actionName the action label. Not blank.
 * @param accelerator the string describing the accelerator. Not blank.
 * @param actionCancelled indicates whether MouseFeed canceled the action
 * the popup notifies about. 
 */
public NagPopUp(final String actionName, final String accelerator, final boolean actionCancelled) {
    super((Shell) null, PopupDialog.HOVER_SHELLSTYLE, false, false, false, false, false,
            getTitleText(actionCancelled), getActionConfigurationReminder());
    isTrue(StringUtils.isNotBlank(actionName));
    isTrue(StringUtils.isNotBlank(accelerator));

    this.actionName = actionName;
    this.accelerator = accelerator;
    this.actionCancelled = actionCancelled;
    this.actionId = null;
}

From source file:com.mousefeed.eclipse.NagPopUp.java

License:Open Source License

/**
 * Creates a pop-up with suggestion to open the Keys preference page to
 * configure a keyboard shortcut for an action.
 *
 * @param actionName the action label. Not blank.
 * @param actionId the contribution id. Not blank.
 *///from w  w  w  .  j  av  a 2s .  c  om
public NagPopUp(final String actionName, final String actionId) {
    super((Shell) null, PopupDialog.HOVER_SHELLSTYLE, false, false, false, false, false, getTitleText(false),
            getActionConfigurationReminder());
    isTrue(StringUtils.isNotBlank(actionName));
    isTrue(StringUtils.isNotBlank(actionId));

    this.actionName = actionName;
    this.actionId = actionId;
    this.actionCancelled = false;
    this.accelerator = null;
}

From source file:com.mulgasoft.emacsplus.execute.SelectionDialog.java

License:Open Source License

@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;
}

From source file:com.sonatype.buildserver.eclipse.ui.JobPopup.java

License:Open Source License

public JobPopup(Shell parentShell, CompositeMonitor monitor, StatusLineCLabelContribution cLabel) {
    super(parentShell, PopupDialog.HOVER_SHELLSTYLE | SWT.MODELESS, true, true, true, false, false,
            Messages.jobPopup_title, null);
    this.monitor = monitor;
    this.label = cLabel;
}

From source file:org.eclipse.babel.editor.widgets.suggestion.PartialTranslationDialog.java

License:Open Source License

/**
 * The constructor//from w  w  w  . j av a 2 s  .c om
 *
 * @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;
    }

}

From source file:org.eclipse.babel.editor.widgets.suggestion.SuggestionBubble.java

License:Open Source License

/**
 * Constructor// ww w .j  a  v a2  s  .com
 *
 * @param parent
 *            is the parent {@link Text} object, to which SuggestionBubble
 *            will be added.
 * @param targetLanguage
 *            is the language, to which the
 *            {@link SuggestionBubble.defaultText} will be translated
 */
public SuggestionBubble(Text parent, String targetLanguage) {
    shell = parent.getShell();
    text = parent;
    this.targetLanguage = targetLanguage;

    suggestionFilter = new SuggestionFilter();
    suggestions = new ArrayList<Suggestion>();

    String srcLang = System.getProperty("tapiji.translator.default.language");
    if (srcLang != null) {
        SRC_LANG = srcLang.substring(0, 2).toUpperCase();
    }

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

    // MessagesEditorPlugin.getDefault().getBundle().
    // getEntry("glossary.xml").getPath()
    // System.out.println("install path "+MessagesEditorPlugin.getDefault().getBundle().getEntry("/").getPath()+"glossary.xml");

    SuggestionProviderUtils.addSuggestionProviderUpdateListener(this);

    /*
     * Read shortcut of content assist (code completion) directly from
     * org.eclipse.ui.IWorkbenchCommandConstants.EDIT_CONTENT_ASSIST and
     * save it to CONTENT_ASSIST final variable
     */
    IBindingService bindingService = (IBindingService) PlatformUI.getWorkbench()
            .getAdapter(IBindingService.class);

    CONTENT_ASSIST = bindingService
            .getBestActiveBindingFormattedFor(IWorkbenchCommandConstants.EDIT_CONTENT_ASSIST);

    init();
}

From source file:org.eclipse.e4.ui.workbench.swt.internal.copy.ShowViewDialog.java

License:Open Source License

private void popUp(final String description) {
    new PopupDialog(filteredTree.getShell(), PopupDialog.HOVER_SHELLSTYLE, true, false, false, false, false,
            null, null) {//from w w w . j  a va2s  .  c  o  m
        private static final int CURSOR_SIZE = 15;

        protected Point getInitialLocation(Point initialSize) {
            // show popup relative to cursor
            Display display = getShell().getDisplay();
            Point location = display.getCursorLocation();
            location.x += CURSOR_SIZE;
            location.y += CURSOR_SIZE;
            return location;
        }

        protected Control createDialogArea(Composite parent) {
            Label label = new Label(parent, SWT.WRAP);
            label.setText(description);
            label.addFocusListener(new FocusAdapter() {
                public void focusLost(FocusEvent event) {
                    close();
                }
            });
            // 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;
            label.setLayoutData(gd);
            return label;
        }
    }.open();
}

From source file:org.eclipse.mylyn.commons.workbench.search.SearchHistoryPopupDialog.java

License:Open Source License

public SearchHistoryPopupDialog(Shell parent, int side) {
    super(parent, PopupDialog.HOVER_SHELLSTYLE, false, false, false, false, false, null, null);
    this.side = side;
    updateBounds();/*  w  w w.  j  av a 2  s  . c om*/
}

From source file:org.eclipse.mylyn.internal.provisional.commons.ui.SearchHistoryPopUpDialog.java

License:Open Source License

public SearchHistoryPopUpDialog(Shell parent, int side) {
    super(parent, PopupDialog.HOVER_SHELLSTYLE, false, false, false, false, false, null, null);
    this.side = side;
    updateBounds();//from  www.  j av  a  2  s .com
}