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

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

Introduction

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

Prototype

int OK_ID

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

Click Source Link

Document

Button id for an "Ok" button (value 0).

Usage

From source file:com.bdaum.zoom.ui.internal.dialogs.ViewVocabDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    if (select)/*from  w  w  w.ja  v  a  2s.co m*/
        super.createButtonsForButtonBar(parent);
    else
        createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}

From source file:com.bdaum.zoom.ui.internal.dialogs.WebFontDialog.java

License:Open Source License

private void updateButtons() {
    boolean enabled = isValid();
    getShell().setModified(enabled);
    getButton(IDialogConstants.OK_ID).setEnabled(enabled);
}

From source file:com.bdaum.zoom.ui.internal.dialogs.WebGalleryEditDialog.java

License:Open Source License

private void updateButtons() {
    repeatBgButton.setEnabled(!imageField.getText().isEmpty());
    Button okButton = getButton(IDialogConstants.OK_ID);
    if (okButton != null) {
        boolean enabled = validate() && !readonly;
        getShell().setModified(enabled);
        okButton.setEnabled(enabled);//from ww  w.  ja  va2  s . c o  m
    }
    int selectionIndex = tabFolder.getSelectionIndex();
    getButton(PREVIOUS).setEnabled(selectionIndex > 0);
    getButton(NEXT).setEnabled(selectionIndex < tabFolder.getTabList().length - 1);
}

From source file:com.bdaum.zoom.ui.internal.preferences.FileExtensionDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    okButton.setEnabled(false);// w  w  w. j  a  v  a  2 s .c o  m
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:com.binge.workforce.widgets.dialogs.SelectionDialog.java

License:Open Source License

/**
 * Returns the ok button.//from w w w  . java  2  s.  c om
 * 
 * @return the ok button or <code>null</code> if the button is not created
 *         yet.
 */
public Button getOkButton() {
    return getButton(IDialogConstants.OK_ID);
}

From source file:com.bluexml.side.application.ui.action.ConfigurationDialog.java

License:Open Source License

protected void buttonPressed(int buttonId) {
    if (buttonId == IDialogConstants.OK_ID) {
        _name = nameText.getText();/*from  w w w.  jav  a 2  s. c o  m*/
        _description = descriptionText.getText();
    }
    super.buttonPressed(buttonId);
}

From source file:com.bluexml.side.application.ui.action.GeneratePopUp.java

License:Open Source License

/**
 * Create contents of the button bar/*  w ww .  j  a va 2s.com*/
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, Activator.Messages.getString("GeneratePopUp_3"), true);
    createButton(parent, IDialogConstants.CANCEL_ID, Activator.Messages.getString("GeneratePopUp_2"), false);
}

From source file:com.bluexml.side.application.ui.action.GeneratePopUp.java

License:Open Source License

/**
 * Method to setup dialog when job's done
 *///from   w  ww .  ja v a 2 s .  c om
public void displayLink() {
    Display currentDisp = ApplicationUtil.getDisplay();
    currentDisp.syncExec(new Runnable() {
        public void run() {
            final String logPath = getGeneralMonitor().getConsoleLog().getLogDirectory();
            logLink.setVisible(true);
            logLink.addHyperlinkListener(new HyperlinkAdapter() {
                public void linkActivated(HyperlinkEvent event) {
                    ApplicationUtil.browseTo("file://" //$NON-NLS-1$
                            + IFileHelper.getIFolder(logPath).getRawLocation().toFile().getAbsolutePath()
                            + File.separator + LogSave.LOG_HTML_FILE_NAME);
                }
            });
            // change button according to the "done" state
            getButton(IDialogConstants.CANCEL_ID).setEnabled(false);
            getButton(IDialogConstants.OK_ID).setText(Activator.Messages.getString("GeneratePopUp_9"));
            setButtonLayoutData(getButton(IDialogConstants.OK_ID));
            setButtonLayoutData(getButton(IDialogConstants.CANCEL_ID));
        }
    });

}

From source file:com.buildml.eclipse.actions.dialogs.MatchPatternSelectionDialog.java

License:Open Source License

@Override
protected Control createButtonBar(Composite parent) {
    Control result = super.createButtonBar(parent);

    /* until something is selected, the OK button is greyed out */
    getButton(IDialogConstants.OK_ID).setEnabled(false);

    return result;
}

From source file:com.buildml.eclipse.actions.dialogs.MatchPatternSelectionDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {

    /* /*from  ww w  . j av  a 2s  .  c o m*/
     * Replace the standard "OK" label with the name of the operation we're performing
     * (e.g "Delete" or "Make Atomic".
     */
    createButton(parent, IDialogConstants.OK_ID, operation, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}