Examples of ErrorInfo


Examples of org.eclipse.wst.sse.core.internal.validate.ErrorInfo

    ErrorInfo info = new ErrorInfoImpl(state, errorSeg, node);
    reporter.report(info);
  }

  private void report(int state, Segment errorSeg, Node node, String[] preTargetMsgInjections, String[] postTargetMsgInjections) {
    ErrorInfo info = new ErrorInfoImpl(state, errorSeg, node, preTargetMsgInjections, postTargetMsgInjections);
    reporter.report(info);
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.validate.ErrorInfo

      }
    }
  }

  private void report(int state, Segment errorSeg, Node node) {
    ErrorInfo info = new ErrorInfoImpl(state, errorSeg, node);
    reporter.report(info);
  }
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

  }

  public static void showErrorMessage(final String shortMessage, final String detailedMessage, final Throwable exception) {
    JXErrorPane.setDefaultLocale(Locale.ENGLISH);
    final JXErrorPane errorPane = new JXErrorPane();
    final ErrorInfo info = new ErrorInfo(shortMessage, detailedMessage, null, "error", exception, ErrorLevel.SEVERE,
        null);
    errorPane.setErrorInfo(info);
    final JDialog dialog = JXErrorPane.createDialog(null, errorPane);
    centerOnScreen(dialog);
    dialog.setLocale(Locale.ENGLISH);
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

        setDetailsVisible(false);
        Action reportAction = pane.getActionMap().get(JXErrorPane.REPORT_ACTION_KEY);
        reportButton.setAction(reportAction);
        reportButton.setVisible(reportAction != null && reportAction.isEnabled() && pane.getErrorReporter() != null);
        reportButton.setEnabled(reportButton.isVisible());
        ErrorInfo errorInfo = pane.getErrorInfo();
        if (errorInfo == null) {
            iconLabel.setIcon(pane.getIcon());
            setErrorMessage("");
            closeButton.setText(UIManagerExt.getString(
                    CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
            setDetails("");
            //TODO Does this ever happen? It seems like if errorInfo is null and
            //this is called, it would be an IllegalStateException.
        } else {
            //change the "closeButton"'s text to either the default "ok"/"close" text
            //or to the "fatal" text depending on the error level of the incident info
            if (errorInfo.getErrorLevel() == ErrorLevel.FATAL) {
                closeButton.setText(UIManagerExt.getString(
                        CLASS_NAME + ".fatal_button_text", closeButton.getLocale()));
            } else {
                closeButton.setText(UIManagerExt.getString(
                        CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
            }

            //if the icon for the pane has not been specified by the developer,
            //then set it to the default icon based on the error level
            Icon icon = pane.getIcon();
            if (icon == null || icon instanceof UIResource) {
                if (errorInfo.getErrorLevel().intValue() <= Level.WARNING.intValue()) {
                    icon = getDefaultWarningIcon();
                } else {
                    icon = getDefaultErrorIcon();
                }
            }
            iconLabel.setIcon(icon);
            setErrorMessage(errorInfo.getBasicErrorMessage());
            String details = errorInfo.getDetailedErrorMessage();
            if(details == null) {
                details = getDetailsAsHTML(errorInfo);
            }
            setDetails(details);
        }
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

        });
        w.pack();
    }

    private void exitIfFatal() {
        ErrorInfo info = pane.getErrorInfo();
        // FYI: info can be null
        if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) {
            Action fatalAction = pane.getActionMap().get(JXErrorPane.FATAL_ACTION_KEY);
            if (fatalAction == null) {
                System.exit(1);
            } else {
                ActionEvent ae = new ActionEvent(closeButton, -1, "fatal");
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

     */
    public void setErrorInfo(ErrorInfo info) {
        if (info == null) {
            throw new NullPointerException("ErrorInfo can't be null. Provide valid ErrorInfo object.");
        }
        ErrorInfo old = this.errorInfo;
        this.errorInfo = info;
        firePropertyChange("errorInfo", old, this.errorInfo);
    }
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

     * block until the error dialog has been shown and hidden on the EDT.</p>
     *
     * @param e Exception that contains information about the error cause and stack trace
     */
    public static void showDialog(Throwable e) {
        ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null);
        showDialog(null, ii);
    }
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

     * block until the error frame has been shown and hidden on the EDT.</p>
     *
     * @param e Exception that contains information about the error cause and stack trace
     */
    public static void showFrame(Throwable e) {
        ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null);
        showFrame(null, ii);
    }
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

     * block until the error frame has been shown and hidden on the EDT.</p>
     *
     * @param e Exception that contains information about the error cause and stack trace
     */
    public static void showInternalFrame(Throwable e) {
        ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null);
        showInternalFrame(null, ii);
    }
View Full Code Here

Examples of org.jdesktop.swingx.error.ErrorInfo

     * {@inheritDoc}
     */
    @Override
    protected void reinit() {
        super.reinit();
        ErrorInfo info = pane == null ? null : pane.getErrorInfo();
        titleLabel.setText(info == null ? "Unknown Error" : info.getTitle());
       
        Object finePrint = pane.getClientProperty("fine-print");
        String text = finePrint == null ? null : finePrint.toString();
        disclaimerText.setText(text);
        disclaimerText.setVisible(text != null);
       
        if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) {
            closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale()));
        } else {
            closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale()));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.