Java Code Examples for org.eclipse.jface.dialogs.IDialogConstants#CLOSE_ID

The following examples show how to use org.eclipse.jface.dialogs.IDialogConstants#CLOSE_ID . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultImportStatusDialogHandler.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
@Override
public int open(final Shell parentShell) {
    if (importStatus.getSeverity() == IStatus.WARNING
            && (importStatus.getChildren() == null || importStatus.getChildren().length == 0)) {
        MessageDialog.openWarning(parentShell, org.bonitasoft.studio.importer.i18n.Messages.importResultTitle,
                importStatus.getMessage());
        return IDialogConstants.CLOSE_ID;
    } else {
        switch (importStatus.getSeverity()) {
            case IStatus.OK:
                return openImportStatus(parentShell, customSuccessMessage.orElse(org.bonitasoft.studio.importer.i18n.Messages.importSucessfulMessage));
            case IStatus.INFO:
                return openImportStatus(parentShell, customSuccessMessage
                        .orElse(org.bonitasoft.studio.importer.i18n.Messages.importSucessfulMessage));
            default:
                return openImportStatus(parentShell,
                        customErrorMessage.orElse(org.bonitasoft.studio.importer.i18n.Messages.importStatusMsg));
        }
    }
}
 
Example 2
Source File: DataItemDetailsDialog.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void buttonPressed ( final int buttonId )
{
    if ( buttonId == IDialogConstants.CLOSE_ID )
    {
        closePressed ();
    }
}
 
Example 3
Source File: ChangeTrackingDialog.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void buttonPressed(final int buttonId) {
    if (buttonId == IDialogConstants.CLOSE_ID) {
        setReturnCode(buttonId);
        close();
    }

    super.buttonPressed(buttonId);
}
 
Example 4
Source File: ExportWarningDialog.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void buttonPressed(final int buttonId) {
    if (buttonId == IDialogConstants.CLOSE_ID || buttonId == IDialogConstants.CANCEL_ID) {
        setReturnCode(buttonId);
        close();

    } else if (buttonId == IDialogConstants.OK_ID) {
        setReturnCode(buttonId);
        close();
    }

    super.buttonPressed(buttonId);
}
 
Example 5
Source File: ExportWarningDialog.java    From erflute with Apache License 2.0 5 votes vote down vote up
@Override
protected void buttonPressed(int buttonId) {
    if (buttonId == IDialogConstants.CLOSE_ID || buttonId == IDialogConstants.CANCEL_ID) {
        setReturnCode(buttonId);
        close();

    } else if (buttonId == IDialogConstants.OK_ID) {
        setReturnCode(buttonId);
        close();
    }

    super.buttonPressed(buttonId);
}
 
Example 6
Source File: BTEditor.java    From jbt with Apache License 2.0 5 votes vote down vote up
protected void buttonPressed(int buttonId) {
	this.setReturnCode(buttonId);
	if (buttonId == IDialogConstants.CLOSE_ID) {
		viewer.update(this.node, null);
		close();
	}
}
 
Example 7
Source File: BTEditor.java    From jbt with Apache License 2.0 5 votes vote down vote up
protected void buttonPressed(int buttonId) {
	this.setReturnCode(buttonId);
	if (buttonId == IDialogConstants.CLOSE_ID) {
		close();
	} else {
		setGuardFromSelection();
		treeChanged(this);
		close();
	}
}
 
Example 8
Source File: ChangeTrackingDialog.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void buttonPressed(int buttonId) {
	if (buttonId == IDialogConstants.CLOSE_ID) {
		setReturnCode(buttonId);
		close();
	}

	super.buttonPressed(buttonId);
}
 
Example 9
Source File: ExportWarningDialog.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void buttonPressed(int buttonId) {
	if (buttonId == IDialogConstants.CLOSE_ID
			|| buttonId == IDialogConstants.CANCEL_ID) {
		setReturnCode(buttonId);
		close();

	} else if (buttonId == IDialogConstants.OK_ID) {
		setReturnCode(buttonId);
		close();
	}

	super.buttonPressed(buttonId);
}
 
Example 10
Source File: FindReplaceDialog.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void buttonPressed(int buttonID) {
	if (buttonID == IDialogConstants.CLOSE_ID) {
		close();
	}
}
 
Example 11
Source File: FindReplaceDialog.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void buttonPressed(int buttonID) {
	if (buttonID == IDialogConstants.CLOSE_ID) {
		close();
	}
}