Example usage for org.eclipse.jface.dialogs IDialogLabelKeys SHOW_DETAILS_LABEL_KEY

List of usage examples for org.eclipse.jface.dialogs IDialogLabelKeys SHOW_DETAILS_LABEL_KEY

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogLabelKeys SHOW_DETAILS_LABEL_KEY.

Prototype

String SHOW_DETAILS_LABEL_KEY

To view the source code for org.eclipse.jface.dialogs IDialogLabelKeys SHOW_DETAILS_LABEL_KEY.

Click Source Link

Document

The key used to retrieve the label for show details buttons.

Usage

From source file:org.csstudio.ui.util.dialogs.ExceptionDetailsErrorDialog.java

License:Open Source License

/**
 * Create the details button if it should be included.
 *
 * @param parent// w  w  w.j a va 2 s.  c  o m
 *            the parent composite
 * @since 3.2
 */
protected void createDetailsButton(Composite parent) {
    if (shouldShowDetailsButton()) {
        detailsButton = createButton(parent, IDialogConstants.DETAILS_ID,
                JFaceResources.getString(IDialogLabelKeys.SHOW_DETAILS_LABEL_KEY), false);
    }
}

From source file:org.csstudio.ui.util.dialogs.ExceptionDetailsErrorDialog.java

License:Open Source License

/**
 * Toggles the unfolding of the details area. This is triggered by the user
 * pressing the details button.//  w  w w . j  ava 2s  . co  m
 */
private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    if (listCreated) {
        text.dispose();
        listCreated = false;
        detailsButton.setText(JFaceResources.getString(IDialogLabelKeys.SHOW_DETAILS_LABEL_KEY));
    } else {
        text = createDropDownList((Composite) getContents());
        detailsButton.setText(JFaceResources.getString(IDialogLabelKeys.HIDE_DETAILS_LABEL_KEY));
    }
    Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    // newSize = new Point(newSize.x, Math.min(newSize.y, 500));
    getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
}