List of usage examples for org.eclipse.jface.dialogs IDialogConstants SHOW_DETAILS_LABEL
String SHOW_DETAILS_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants SHOW_DETAILS_LABEL.
Click Source Link
From source file:org.seasar.uruma.ui.dialogs.UrumaErrorDialog.java
License:Apache License
protected void toggleDetailsArea() { Point windowSize = getShell().getSize(); Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); if (detailsCreated) { detailTreeViewer.getTree().dispose(); detailsCreated = false;//from w ww . j av a2s .c o m detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); } else { detailTreeViewer = createDetailsTreeViewer((Composite) getContents()); detailTreeViewer.setInput(""); detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL); detailsCreated = true; } Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y))); }
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 w w w . j ava2 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
private void toggleDetailsArea() { Point windowSize = getShell().getSize(); if (detailsComposite != null) { detailsComposite.dispose();//from w w w . j av a2s.c o m detailsComposite = null; detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).span(2, 1) .applyTo(dialogArea); } else { detailsComposite = createDetailsComposite((Composite) getContents()); detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1) .applyTo(dialogArea); } ((Composite) getContents()).layout(); Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); getShell().setSize(new Point(windowSize.x, newSize.y)); }
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 ww w. j av a2s. co m 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.tigris.subversion.subclipse.ui.util.DetailsDialog.java
License:Open Source License
/** * Toggles the unfolding of the details area. This is triggered by * the user pressing the details button. *//* w ww . j a v a 2s . c o m*/ private void toggleDetailsArea() { Point windowSize = getShell().getSize(); Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT); if (detailsCreated) { detailsComposite.dispose(); detailsCreated = false; detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); } else { detailsComposite = createDropDownDialogArea((Composite) getContents()); detailsCreated = true; detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL); } Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT); getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y))); }
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. * //ww w. ja v a 2s.co 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); }
From source file:org.wso2.developerstudio.eclipse.errorreporter.ui.dialogs.ErrorNotificationDialog.java
License:Open Source License
/** * This method contains the logic to execute when the details button is * pressed. This method shows and hides the error report. *///w w w . j a v a 2 s .co m private void toggleDetailsArea() { boolean opened = false; Point windowSize = getShell().getSize(); if (listCreated) { list.dispose(); listCreated = false; detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); opened = false; } else { list = createDropDownList((Composite) getContents()); detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL); getContents().getShell().layout(); opened = true; } Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); int diffY = newSize.y - windowSize.y; // increase the dialog height if details were opened and such increase // is necessary // decrease the dialog height if details were closed and empty space // appeared if ((opened && diffY > 0) || (!opened && diffY < 0)) { getShell().setSize(new Point(windowSize.x, windowSize.y + (diffY))); } }