当前位置: 首页>>代码示例>>Java>>正文


Java JXErrorPane.setErrorReporter方法代码示例

本文整理汇总了Java中org.jdesktop.swingx.JXErrorPane.setErrorReporter方法的典型用法代码示例。如果您正苦于以下问题:Java JXErrorPane.setErrorReporter方法的具体用法?Java JXErrorPane.setErrorReporter怎么用?Java JXErrorPane.setErrorReporter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jdesktop.swingx.JXErrorPane的用法示例。


在下文中一共展示了JXErrorPane.setErrorReporter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showErrorDialog

import org.jdesktop.swingx.JXErrorPane; //导入方法依赖的package包/类
public static void showErrorDialog(Component parent, ErrorInfo errorInfo)
{

    if (parent == null)
    {
        if (org.springframework.richclient.application.Application.isLoaded())
        {
            ApplicationWindow activeWindow = org.springframework.richclient.application.Application
                    .instance().getActiveWindow();
            if (activeWindow != null)
                parent = activeWindow.getControl();
        }
    }

    JXErrorPane pane = new JXErrorPane();
    pane.setErrorInfo(errorInfo);
    pane.setErrorReporter(new JdicEmailNotifierErrorReporter());

    JXErrorPane.showDialog(parent, pane);
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:21,代码来源:RcpSupport.java

示例2: onEvent

import org.jdesktop.swingx.JXErrorPane; //导入方法依赖的package包/类
/**
 *
 * @param topic
 * @param data
 */
public void onEvent(String topic, Exception data) {

    String msg = randomHaiku();
    String details = formatStackTraceForDialogs(data, false);

    /*
     * Create an error pane to display the error stuff
     */
    JXErrorPane errorPane = new JXErrorPane();
    Icon errorIcon = randomImage();
    ErrorInfo errorInfo = new ErrorInfo("VARS - Fatal Error", msg, details, null, data, ErrorLevel.FATAL, null);

    errorPane.setIcon(errorIcon);
    errorPane.setErrorInfo(errorInfo);
    errorPane.setErrorReporter(new EmailErrorReporter(errorPane));
    JXErrorPane.showDialog(null, errorPane);

}
 
开发者ID:hohonuuli,项目名称:vars,代码行数:24,代码来源:FatalExceptionSubscriber.java

示例3: notifyUserAboutException

import org.jdesktop.swingx.JXErrorPane; //导入方法依赖的package包/类
/**
 * Shows the {@link JXErrorPane} to the user.
 */
public void notifyUserAboutException(Thread thread, Throwable throwable) {
    ErrorInfo errorInfo = new ErrorInfo(
            resolveExceptionCaption(throwable),
            (String) createExceptionContent(throwable),
            getDetailsAsHTML(throwable.getMessage(), logLevel, throwable),
            null, throwable, logLevel.getJdkLogLevel(), null);
    JXErrorPane pane = new JXErrorPane();
    pane.setErrorInfo(errorInfo);
    if (errorReporter != null) {
        pane.setErrorReporter(errorReporter);
    }

    JXErrorPane.showDialog(resolveParentFrame(), pane);
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:18,代码来源:JXErrorDialogExceptionHandler.java

示例4: onEvent

import org.jdesktop.swingx.JXErrorPane; //导入方法依赖的package包/类
/**
 *
 * @param topic
 * @param error
 */
public void onEvent(String topic, Object error) {

    String msg = "An error occurred. Refer to the details for more information.";
    String details = null;
    Throwable data = null;

    if (error instanceof Throwable) {
        data = (Throwable) error;
        details = formatStackTraceForDialogs(data, true);
    }
    else {
        details = error.toString();
    }


    /*
     * Create an error pane to display the error stuff
     */
    JXErrorPane errorPane = new JXErrorPane();
    Icon errorIcon = randomImage();
    ErrorInfo errorInfo = new ErrorInfo("VARS - Something exceptional occurred (and we don't like that)", msg,
        details, null, data, ErrorLevel.WARNING, null);

    errorPane.setIcon(errorIcon);
    errorPane.setErrorInfo(errorInfo);
    errorPane.setErrorReporter(new EmailErrorReporter(errorPane));
    JXErrorPane.showDialog(parentFrame, errorPane);
}
 
开发者ID:hohonuuli,项目名称:vars,代码行数:34,代码来源:NonFatalErrorSubscriber.java


注:本文中的org.jdesktop.swingx.JXErrorPane.setErrorReporter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。