Example usage for org.eclipse.jface.dialogs IDialogConstants HIDE_DETAILS_LABEL

List of usage examples for org.eclipse.jface.dialogs IDialogConstants HIDE_DETAILS_LABEL

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants HIDE_DETAILS_LABEL.

Prototype

String HIDE_DETAILS_LABEL

To view the source code for org.eclipse.jface.dialogs IDialogConstants HIDE_DETAILS_LABEL.

Click Source Link

Document

The label for hide details buttons.

Usage

From source file:aurora.ide.helpers.StatusDialog.java

License:Open Source License

/**
 * Toggles the unfolding of the details area. This is triggered by the user
 * pressing the details button./*ww w.  ja  v  a  2 s  . c  o m*/
 */
private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    if (textCreated) {
        text.dispose();
        textCreated = false;
        detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        text = createDropDownText((Composite) getContents());
        detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
        getContents().getShell().layout();
    }
    Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
}

From source file:com.byterefinery.rmbench.dialogs.AbstractDependencyDialog.java

License:Open Source License

private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    if (detailsCreated) {
        detailsText.dispose();/*from w  w w . j  a va 2 s. c  om*/
        detailsCreated = false;
        detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        detailsText = createDetailsText((Composite) getContents());
        detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
    }
    Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
}

From source file:com.elphel.vdt.ui.dialogs.VDTErrorDialog.java

License:Open Source License

/**
 * Toggles the unfolding of the details area. This is triggered by the user
 * pressing the details button./*  www  .  j a v  a 2 s  .  com*/
 */
private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);

    if (textCreated) {
        text.dispose();
        textCreated = false;
        detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        text = createDropDownText((Composite) getContents());
        detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
    }

    Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
}

From source file:com.github.fengtan.sophie.dialogs.ExceptionDialog.java

License:Open Source License

/**
 * Show/hide the stack trace.//from w w  w .  ja  v a 2  s  .  co m
 */
private void toggleDetails() {
    Point windowSize = getShell().getSize();
    Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);

    if (listCreated) {
        list.dispose();
        listCreated = false;
        detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        list = createDropDownList((Composite) getContents());
        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:com.google.code.t4eclipse.tools.dialog.InternalErrorDialog.java

License:Open Source License

/**
 * Toggles the unfolding of the details area. This is triggered by the user
 * pressing the details button./*w  ww .  jav  a2s.c om*/
 */
private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);

    if (text != null) {
        text.dispose();
        text = null;
        getButton(detailButtonID).setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        createDropDownText((Composite) getContents());
        getButton(detailButtonID).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:com.jaspersoft.studio.jface.dialogs.DataAdapterErrorDialog.java

License:Open Source License

/**
 * Toggles the unfolding of the details area. This is triggered by the user
 * pressing the details button./*from  w w w. j ava2  s. c om*/
 */
private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    if (textCreated) {
        text.dispose();
        textCreated = false;
        detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        text = createDropDownList((Composite) getContents());
        detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
        getContents().getShell().layout();
    }
    Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
}

From source file:com.maccasoft.ui.internal.application.InternalErrorDialog.java

License:Open Source License

/**
 * Toggles the unfolding of the details area.  This is triggered by
 * the user pressing the details button.
 *///from  www .j  a  v  a  2s.  c  o m
private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);

    if (text != null) {
        text.dispose();
        text = null;
        getButton(detailButtonID).setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        createDropDownText((Composite) getContents());
        getButton(detailButtonID).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:com.mercatis.lighthouse3.base.ui.widgets.LighthouseErrorDialog.java

License:Apache License

/**
 * /*w  w  w.j  a v  a2 s  .  com*/
 */
private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    if (stackTraceExpanded) {
        stackTraceText.dispose();
        stackTraceExpanded = false;
        detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        stackTraceText = createStackTraceText((Composite) getContents());
        detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
        stackTraceExpanded = true;
    }
    Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
}

From source file:com.sap.netweaver.porta.ide.eclipse.server.ui.dialogs.PublishProblemDialog.java

License:Open Source License

private void toggleDetailsArea() {
    Point windowSize = getShell().getSize();
    Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);

    if (detailsText != null) {
        detailsText.dispose();/*w w  w . j a v  a  2 s .c o  m*/
        detailsText = null;
        getButton(DETAILS_BUTTON_ID).setText(IDialogConstants.SHOW_DETAILS_LABEL);
    } else {
        createDropDownText((Composite) getContents());
        getButton(DETAILS_BUTTON_ID).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:com.windowtester.eclipse.ui.dialogs.AbstractDetailsDialog.java

License:Open Source License

/**
 * Toggles the unfolding of the details area.  This is triggered by
 * the user pressing the details button.
 *//*from  w w  w.  ja  v a2  s  . co  m*/
protected void toggleDetailsArea() {
    Point oldWindowSize = getShell().getSize();
    Point newWindowSize = cachedWindowSize;
    cachedWindowSize = oldWindowSize;

    // show the details area
    if (detailsArea == null) {
        detailsArea = createDetailsArea((Composite) getContents());
        detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
    }

    // hide the details area
    else {
        detailsArea.dispose();
        detailsArea = null;
        detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
    }

    /*
     * Must be sure to call getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT)
     * before calling getShell().setSize(newWindowSize);
     * since controls have been added or removed
     */

    // compute the new window size
    Point oldSize = getContents().getSize();
    Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
    if (newWindowSize == null)
        newWindowSize = new Point(oldWindowSize.x, oldWindowSize.y + (newSize.y - oldSize.y));

    // crop new window size to screen
    Point windowLoc = getShell().getLocation();
    Rectangle screenArea = getContents().getDisplay().getClientArea();
    if (newWindowSize.y > screenArea.height - (windowLoc.y - screenArea.y))
        newWindowSize.y = screenArea.height - (windowLoc.y - screenArea.y);

    getShell().setSize(newWindowSize);
    ((Composite) getContents()).layout();
}