예제 #1
0
 @Override
 protected void createButtonsForButtonBar(Composite parent) {
   createButton(
       parent,
       AUTOMATIC_SOLVE_ID,
       Messages.getString(
           "org.nightlabs.jfire.trade.ui.transfer.error.ErrorDialog.button.retry.text"),
       true); //$NON-NLS-1$
   createButton(
       parent,
       SEND_ERROR_REPORT_ID,
       Messages.getString(
           "org.nightlabs.jfire.trade.ui.transfer.error.ErrorDialog.button.sendErrorReport.text"),
       false); //$NON-NLS-1$
   //		super.createButtonsForButtonBar(parent);
   createButton(
       parent,
       IGNORE_ID,
       Messages.getString(
           "org.nightlabs.jfire.trade.ui.transfer.error.ErrorDialog.button.ignore.text"),
       false); //$NON-NLS-1$
   detailsButton =
       createButton(
           parent,
           IDialogConstants.DETAILS_ID,
           CompatibleDialogConstants.get().SHOW_DETAILS_LABEL,
           false);
 }
예제 #2
0
 protected void showStackTrace(boolean visible) {
   Point windowSize = getShell().getSize();
   Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
   GridData stackTraceGD = ((GridData) errorStackTrace.getLayoutData());
   if (visible) {
     stackTraceGD.heightHint = errorStackTrace.getLineHeight() * STACK_TRACE_LINE_COUNT;
     detailsButton.setText(CompatibleDialogConstants.get().HIDE_DETAILS_LABEL);
     errorStackTrace.setVisible(true);
   } else {
     stackTraceGD.heightHint = 0;
     detailsButton.setText(CompatibleDialogConstants.get().SHOW_DETAILS_LABEL);
     errorStackTrace.setVisible(false);
   }
   Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
   getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
 }