List of usage examples for org.eclipse.jface.dialogs IDialogConstants DETAILS_ID
int DETAILS_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants DETAILS_ID.
Click Source Link
From source file:org.seasar.uruma.ui.dialogs.UrumaErrorDialog.java
License:Apache License
protected void createDetailsButton(final Composite parent) { detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);//w w w . ja v a2s . com }
From source file:org.seasar.uruma.ui.dialogs.UrumaErrorDialog.java
License:Apache License
@Override protected void buttonPressed(final int id) { if (id == IDialogConstants.DETAILS_ID) { toggleDetailsArea();/*from w w w.ja v a 2 s .c om*/ } else { super.buttonPressed(id); } }
From source file:org.talend.mdm.repository.core.service.ConsistencyService.java
License:Open Source License
private ConsistencyCheckResult warnUserWhenConflict(Map<IRepositoryViewObject, Integer> viewObCmdOpjMap, Map<IRepositoryViewObject, WSDigest> viewObjMap, int conflictCount) { ConsistencyCheckResult result;//ww w.j a va 2s. c om ConfirmConflictMessageDialog confirmDialog = new ConfirmConflictMessageDialog(getShell(), conflictCount); int returnValue = confirmDialog.open(); if (returnValue == IDialogConstants.OK_ID) { int strategy = confirmDialog.getStrategy(); result = getCheckResultByStrategy(strategy, viewObjMap, viewObCmdOpjMap); } else if (returnValue == IDialogConstants.DETAILS_ID) { ConsistencyConflictDialog dialog = new ConsistencyConflictDialog(getShell(), conflictCount, viewObjMap, viewObCmdOpjMap); dialog.open(); result = dialog.getResult(); } else { result = new ConsistencyCheckResult(); } return result; }
From source file:org.talend.mdm.repository.ui.dialogs.consistency.ConfirmConflictMessageDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.DETAILS_ID, Messages.ConfirmConflictMessageDialog_showConflicts, false);// w w w . j a va 2 s .c o m super.createButtonsForButtonBar(parent); }
From source file:org.talend.mdm.repository.ui.dialogs.consistency.ConfirmConflictMessageDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { ConsistencyService service = ConsistencyService.getInstance(); if (buttonId == IDialogConstants.OK_ID) { selectedStrategy = getSelectedStrategy(); } else if (buttonId == IDialogConstants.DETAILS_ID) { setReturnCode(IDialogConstants.DETAILS_ID); close();/*from www . ja v a2 s. c om*/ return; } if (!rememberBun.getSelection()) { service.setWarnUserWhenConflict(true); } else { service.setWarnUserWhenConflict(false); service.setConflictStrategy(selectedStrategy); } super.buttonPressed(buttonId); }
From source file:org.talend.mdm.repository.ui.dialogs.ValidationResultDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);/*from ww w. jav a 2 s. c o m*/ GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.CENTER).applyTo(detailsButton); Composite rightArea = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(0).equalWidth(true).applyTo(rightArea); GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).grab(true, false).applyTo(rightArea); createButton(parent, IModelValidationService.BUTTON_OK, IDialogConstants.OK_LABEL, true); }
From source file:org.talend.mdm.repository.ui.dialogs.ValidationResultDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { if (IDialogConstants.DETAILS_ID == buttonId) { toggleDetailsArea();/*from w w w . ja v a 2s . c o m*/ return; } int condition = validationPref.getValidationCondition(); if (condition == IModelValidationService.VALIDATE_BEFORE_DEPLOY) { int returnCode = getSelectedRadioBun(); setReturnCode(returnCode); if (!validationPref.shouldShowResults(result)) { validationPref.updateLastSelectedBun(returnCode, result); } close(); } else { super.buttonPressed(buttonId); } }
From source file:org.testeditor.ui.reporting.TestExecutionProgressDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // adding new button for closing the dialog on demand closeButton = createButton(parent, IDialogConstants.CLOSE_ID, IDialogConstants.CLOSE_LABEL, true); closeButton.setEnabled(false);/*w w w . j a v a 2 s .c o m*/ closeButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { close(); dispose(); } }); // adding new button for closing the dialog on demand detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, true); detailsButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (logViewerComposite.getVisible()) { logViewerComposite.setVisible(false); detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); TestExecutionProgressDialog.this.parent.getShell().setSize(DEFAULT_DIALOG_SIZE); } else { logViewerComposite.setVisible(true); detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL); TestExecutionProgressDialog.this.parent.getShell().setSize(ENLARGED_DIALOG_SIZE); } TestExecutionProgressDialog.this.parent.getShell().layout(); } }); super.createButtonsForButtonBar(parent); }
From source file:org.tigris.subversion.subclipse.ui.util.DetailsDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { // create OK and Details buttons if (includeOkButton()) { okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }/*from w w w.j a v a 2 s . com*/ if (includeCancelButton()) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false); updateEnablements(); }
From source file:org.wso2.developerstudio.eclipse.errorreporter.ui.dialogs.ErrorNotificationDialog.java
License:Open Source License
/** * This method creates the contents in the Dialog Box. * /*from w w w .j ava 2 s .c o m*/ * @param parent * */ @Override protected void createButtonsForButtonBar(Composite parent) { // labels and radio buttons to select the sending options Label label = new Label(parent, SWT.NULL); label.setText(DialogBoxLabels.SENDING_OPTIONS_LABEL); // create radio button-Publish in Jira Button jira = new Button(parent, SWT.RADIO); jira.setText(DialogBoxLabels.SENDING_OPTIONS_JIRA); jira.addSelectionListener(new SelectionListener() { // if Jira option is selected, return int is set to zero @Override public void widgetSelected(SelectionEvent e) { selection = 0; } @Override public void widgetDefaultSelected(SelectionEvent e) { selection = 0; } }); // create radio button-Publish in Jira and Email Button email = new Button(parent, SWT.RADIO); email.setText(DialogBoxLabels.SENDING_OPTIONS_JIRA_EMAIL); email.addSelectionListener(new SelectionListener() { // if Email option is selected, return int is set to one @Override public void widgetSelected(SelectionEvent e) { selection = 1; } @Override public void widgetDefaultSelected(SelectionEvent e) { selection = 1; } }); Activator.getDefault().getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty() == PreferencePageStrings.SEND_OPTIONS) { System.out.println("changed"); update(); } } private void update() { // TODO Auto-generated method stub } }); // create a link to edit prefernces final Link link = new Link(parent, SWT.NONE); link.setFont(parent.getFont()); link.setText("<A>" + DialogBoxLabels.PREFERENCE_PAGE_LINK + "</A>"); GridData data = new GridData(SWT.LEFT, SWT.TOP, false, false); data.horizontalSpan = 3; link.setLayoutData(data); // open up the preferences page link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(final SelectionEvent e) { Shell shell = new Shell(); PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn(shell, ProjectConstants.PREFERENCE_PAGE, null, null); if (pref != null) pref.open(); } }); // create OK CANCEL and Details buttons createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false); }