Example usage for org.eclipse.jface.dialogs IDialogConstants CLOSE_ID

List of usage examples for org.eclipse.jface.dialogs IDialogConstants CLOSE_ID

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants CLOSE_ID.

Prototype

int CLOSE_ID

To view the source code for org.eclipse.jface.dialogs IDialogConstants CLOSE_ID.

Click Source Link

Document

Button id for a "Close" button (value 12).

Usage

From source file:com.nokia.traceviewer.dialog.TraceActivationDialog.java

License:Open Source License

@Override
protected void buttonPressed(int buttonId) {
    switch (buttonId) {

    // Load button
    case LOAD_BUTTON_ID:
        TraceViewerGlobals.postUiEvent("LoadButton", "1"); //$NON-NLS-1$ //$NON-NLS-2$
        if (loadDialog == null) {
            loadDialog = new TraceConfigurationLoadDialog(true, null);
        }/*from   w  w w .ja v a2  s . co m*/
        loadDialog.openDialog(allComponents, changedComponents);
        setGroupsToTable();
        TraceViewerGlobals.postUiEvent("LoadButton", "0"); //$NON-NLS-1$ //$NON-NLS-2$
        break;

    // Save button
    case SAVE_BUTTON_ID:
        TraceViewerGlobals.postUiEvent("SaveButton", "1"); //$NON-NLS-1$ //$NON-NLS-2$
        if (saveDialog == null) {
            saveDialog = new TraceConfigurationSaveDialog();
        }
        saveDialog.openDialog(allComponents);
        TraceViewerGlobals.postUiEvent("SaveButton", "0"); //$NON-NLS-1$ //$NON-NLS-2$
        break;

    // Activate button
    case ACTIVATE_BUTTON_ID:
        TraceViewerGlobals.postUiEvent("ActivateButton", "1"); //$NON-NLS-1$ //$NON-NLS-2$
        sendActivationInformation();
        TraceViewerGlobals.postUiEvent("ActivateButton", "0"); //$NON-NLS-1$ //$NON-NLS-2$
        break;

    // Close button
    case IDialogConstants.CLOSE_ID:
        TraceViewerGlobals.postUiEvent("CloseButton", "1"); //$NON-NLS-1$ //$NON-NLS-2$
        previousSelectedDictionaryIndices = dictionaryTable.getSelectionIndices();
        okPressed();
        TraceViewerGlobals.postUiEvent("CloseButton", "0"); //$NON-NLS-1$ //$NON-NLS-2$
        break;
    default:
        System.out.println(Messages.getString("TraceActivationDialog.InvalidButton")); //$NON-NLS-1$
    }
}

From source file:com.salesforce.ide.core.internal.utils.DialogUtils.java

License:Open Source License

public int closeMessage(String title, String message) {
    MessageDialog dialog = new MessageDialog(getShell(), title, null, message, MessageDialog.INFORMATION,
            new String[] { IDialogConstants.CLOSE_LABEL }, IDialogConstants.CLOSE_ID);
    return dialog.open();
}

From source file:com.siteview.mde.internal.ui.launcher.OpenLogDialog.java

License:Open Source License

public void create() {
    super.create();
    // dialog location
    if (dialogLocation != null)
        getShell().setLocation(dialogLocation);
    // dialog size
    if (dialogSize != null)
        getShell().setSize(dialogSize);//from  www  .  ja va2 s .  c  o  m
    else
        getShell().setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
    getButton(IDialogConstants.CLOSE_ID).setFocus();
}

From source file:com.siteview.mde.internal.ui.launcher.OpenLogDialog.java

License:Open Source License

protected void buttonPressed(int buttonId) {
    if (buttonId == IDialogConstants.CLOSE_ID) {
        storeSettings();/*from   ww  w . j  av a 2s .c  o  m*/
        close();
    }
    super.buttonPressed(buttonId);
}

From source file:de.femodeling.e4.ui.progress.internal.ProgressMonitorFocusJobDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    Button runInWorkspace = createButton(parent, IDialogConstants.CLOSE_ID,
            ProgressMessages.ProgressMonitorFocusJobDialog_RunInBackgroundButton, true);
    runInWorkspace.addSelectionListener(new SelectionAdapter() {
        /*//from  w ww. ja va  2  s .c  om
         * (non-Javadoc)
         * 
         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
         */
        public void widgetSelected(SelectionEvent e) {
            Rectangle shellPosition = getShell().getBounds();
            job.setProperty(IProgressConstants.PROPERTY_IN_DIALOG, Boolean.FALSE);
            finishedRun();
            ProgressManagerUtil.animateDown(shellPosition);
        }
    });
    runInWorkspace.setCursor(arrowCursor);

    cancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    cancel.setCursor(arrowCursor);

    createDetailsButton(parent);
}

From source file:de.tub.tfs.muvitor.ui.utils.test.PropertiesDialog.java

License:Open Source License

@Override
protected void buttonPressed(final int buttonId) {
    if (buttonId == IDialogConstants.CLOSE_ID) {
        close();/*from  w w w  .  j a  va  2 s.c om*/
        return;
    }
}

From source file:de.tub.tfs.muvitor.ui.utils.test.PropertiesDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(final Composite parent) {
    // create close button
    closeButton = createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true);
    getShell().setDefaultButton(closeButton);
}

From source file:de.walware.ecommons.ui.mpbv.ManageBookmarksDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(final Composite parent) {
    createButton(parent, IDialogConstants.OPEN_ID, IDialogConstants.OPEN_LABEL, false);
    createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true);
}

From source file:de.walware.ecommons.ui.mpbv.ManageBookmarksDialog.java

License:Open Source License

@Override
protected void buttonPressed(final int buttonId) {
    if (buttonId == IDialogConstants.OPEN_ID) {
        final BrowserBookmark bookmark = (BrowserBookmark) ((IStructuredSelection) fTableViewer.getSelection())
                .getFirstElement();//from www  .j ava2 s  . c  o m
        fView.openBookmark(bookmark, fView.getCurrentSession());
        close();
    }
    if (buttonId == IDialogConstants.CLOSE_ID) {
        close();
    }
}

From source file:de.walware.statet.r.internal.ui.dataeditor.FindDataDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(final Composite parent) {
    createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, false);
}