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:at.medevit.elexis.gdt.ui.dialog.NeueUntersuchungAnfordernDialog.java

License:Open Source License

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

}

From source file:at.medevit.elexis.impfplan.ui.dialogs.SupplementVaccinationDialog.java

License:Open Source License

/**
 * Create contents of the button bar.//from  w  w  w  . j  a  v a  2s  .c  om
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:at.medevit.menus.dialog.AddPersonDialog.java

License:Open Source License

/**
 * Create contents of the button bar.// w  w  w. ja  v  a  2  s .  co m
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    m_bindingContext = initDataBindings();
}

From source file:at.medevit.menus.handlers.AddPersonHandler.java

License:Open Source License

@Execute
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) {

    Person newPerson = MenusFactory.eINSTANCE.createPerson();

    AddPersonDialog adp = new AddPersonDialog(shell);
    adp.setPerson(newPerson);/*from w w  w  .  j av a2 s. com*/
    int retVal = adp.open();

    if (retVal == IDialogConstants.OK_ID)
        SampleModel.getSampleModel().getContents().add(newPerson);
}

From source file:at.spardat.xma.gui.mapper.BDInstanceSelectionDialog.java

License:Open Source License

/**
 * Adds buttons to this dialog's button bar.
 */// www .jav  a  2s .c o  m
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:at.spardat.xma.gui.mapper.MapperDialog.java

License:Open Source License

/**
 * Adds buttons to this dialog's button bar.
 *///from w  w w. ja v  a2  s  . c  om
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, "Close", true);
}

From source file:at.spardat.xma.guidesign.presentation.dialog.compprops.CompPropertyDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    // create OK and Cancel buttons by default
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}

From source file:at.spardat.xma.guidesign.presentation.dialog.newpage.NewPageDialog.java

License:Open Source License

/**
 * Create a button bar with only a ok button
 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
 *///from   w  w  w  .  j av a 2 s .  c  o m
protected void createButtonsForButtonBar(Composite parent) {
    // create OK button
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}

From source file:at.spardat.xma.guidesign.presentation.dialog.table.TransformTableLayoutDialog.java

License:Open Source License

/**
 * Create a button bar with only a ok button
 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
 *//* w ww.jav  a  2  s. c o  m*/
protected void createButtonsForButtonBar(Composite parent) {
    // create OK button
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}

From source file:at.spardat.xma.guidesign.presentation.dialog.XMADialog.java

License:Open Source License

/**
 * set the dialog buttons dependend of the dialog complete state
 *
 *///from   w w  w .j  av a 2s.  c om
protected void setDialogButtons() {
    if (isDialogComplete()) {
        if (getButton(IDialogConstants.OK_ID) != null)
            getButton(IDialogConstants.OK_ID).setEnabled(true);
    } else {
        if (getButton(IDialogConstants.OK_ID) != null)
            getButton(IDialogConstants.OK_ID).setEnabled(false);
    }
}