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

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

Introduction

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

Prototype

String HIDE_DETAILS_LABEL_KEY

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

Click Source Link

Document

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

Usage

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  a  va  2  s.com
 */
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)));
}