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

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

Introduction

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

Prototype

String OK_LABEL

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

Click Source Link

Document

The label for OK buttons.

Usage

From source file:gov.redhawk.ide.spd.internal.ui.InternalErrorDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    // create OK and Details buttons
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
    createDetailsButton(parent);//from   w w w. j a  va 2s .  co m
}

From source file:gov.va.isaac.mdht.otf.ui.properties.PrimitiveInputDialog.java

License:Apache License

protected void createButtonsForButtonBar(Composite parent) {
    // create OK and Cancel buttons by default
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    //do this here because setting the text will set enablement on the ok
    // button/*  ww  w  . j  av a2  s. c  om*/
    text.setFocus();
    if (valueString != null) {
        text.setText(valueString);
        text.selectAll();
    }
}

From source file:hydrograph.ui.dataviewer.dialog.SelectColumnActionDialog.java

License:Apache License

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

From source file:hydrograph.ui.dataviewer.preferencepage.ViewDataPreferencesDialog.java

License:Apache License

/**
 * Create contents of the button bar./*from   w ww  . ja v  a2 s .c  om*/
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    parent.setLayout(new GridLayout(1, false));
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    warningImageLabel = new Label(composite, SWT.NONE);
    warningImageLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));

    warningImageLabel.setImage(ImagePathConstant.WARNING_ICON.getImageFromRegistry());

    warningLabel = new Label(composite, SWT.NONE);
    warningLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, true, 1, 1));
    warningLabel.setText(Messages.WARNING_MESSAGE);

    warningLabel.setVisible(false);
    warningImageLabel.setVisible(false);
    if (!delimiterTextBox.getText().equalsIgnoreCase(",")
            || !quoteCharactorTextBox.getText().equalsIgnoreCase("\"")) {
        warningImageLabel.setVisible(true);
        warningLabel.setVisible(true);
    }
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:hydrograph.ui.help.aboutDialog.CustomAboutDialog.java

License:Apache License

protected void createButtonsForButtonBar(Composite parent) {
    parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Button button = createButton(parent, 0, "", false);
    Bundle bundle = Platform.getBundle(Constants.ABOUT_DIALOG_IMAGE_BUNDLE_NAME);
    URL fullPathString = BundleUtility.find(bundle, Constants.ABOUT_DIALOG_FEATURE_IMAGE_PATH);
    button.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false));
    button.setToolTipText("Help");
    Image image = ImageDescriptor.createFromURL(fullPathString).createImage();
    button.setImage(image);//from   w w w.jav  a2 s.c  om
    images.add(image);

    button.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            IWorkbenchPart workbenchPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
                    .getActivePart();
            IHandlerService handlerService = (IHandlerService) workbenchPart.getSite()
                    .getService(IHandlerService.class);
            try {
                handlerService.executeCommand("org.eclipse.ui.help.displayHelp", null);
            } catch (Exception ex) {
                throw new RuntimeException("Help File Not Found!");
            }
        }
    });

    Button installationButton = new Button(parent, SWT.PUSH);
    installationButton.setLayoutData(new GridData());
    GridLayout layout = (GridLayout) parent.getLayout();
    installationButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
    layout.numColumns++;
    layout.makeColumnsEqualWidth = false;
    installationButton.setText("Installation Details");
    installationButton.setToolTipText("Installation Details");
    installationButton.addSelectionListener(new SelectionListener() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
            HydrographInstallationDialog dialog = new HydrographInstallationDialog(getShell());
            dialog.open();
        }

        @Override
        public void widgetDefaultSelected(SelectionEvent e) {
            // {Do-nothing}
        }
    });

    Label installationLabel = new Label(parent, SWT.NONE);
    installationLabel.setLayoutData(new GridData());
    GridLayout installationLabelLayout = (GridLayout) parent.getLayout();
    installationLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
    installationLabelLayout.numColumns++;
    installationLabelLayout.makeColumnsEqualWidth = false;

    Button ok = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    ok.setFocus();

}

From source file:hydrograph.ui.parametergrid.dialog.MultiParameterFileDialog.java

License:Apache License

/**
 * Create contents of the button bar.//from  www. ja v a 2 s .  c  o m
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    Button okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    okButton.setFocus();
    applyButton = createButton(parent, IDialogConstants.NO_ID, "Apply", false);
    applyButton.setEnabled(false);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:hydrograph.ui.propertywindow.propertydialog.PropertyDialog.java

License:Apache License

private Button createOKButton(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    return okButton;
}

From source file:hydrograph.ui.propertywindow.runconfig.RunConfigDialog.java

License:Apache License

/**
 * Create contents of the button bar./*  ww  w .  j  a va2s .  co m*/
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

    applyServerDetailsCrossTextEmptyValidationListener(txtEdgeNode);
    applyServerDetailsCrossTextEmptyValidationListener(txtPassword);
    applyServerDetailsCrossTextEmptyValidationListener(txtUserName);
    applyServerDetailsCrossTextEmptyValidationListener(txtBasePath);
    applyServerDetailsCrossTextEmptyValidationListener(txtKeyFile);
    applyServerDetailsCrossTextEmptyValidationListener(txtRunUtility);
    applyServerDetailsCrossTextEmptyValidationListener(txtProjectPath);
    loadBuildProperties();
}

From source file:hydrograph.ui.propertywindow.widgets.customwidgets.joinproperty.JoinMapGrid.java

License:Apache License

/**
 * Create contents of the button bar./*from   w  ww .  ja  v a2 s  .c o m*/
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {

    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);

    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

}

From source file:hydrograph.ui.propertywindow.widgets.customwidgets.lookupproperty.ELTLookupConfigGrid.java

License:Apache License

/**
 * Create contents of the button bar.//w w  w . j  a  v a  2 s.  co m
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    Button button = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    button.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {

        }
    });
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}