org.springframework.richclient.exceptionhandling
Class AbstractDialogExceptionHandler

java.lang.Object
  extended by org.springframework.richclient.exceptionhandling.AbstractRegisterableExceptionHandler
      extended by org.springframework.richclient.exceptionhandling.AbstractLoggingExceptionHandler
          extended by org.springframework.richclient.exceptionhandling.AbstractDialogExceptionHandler
All Implemented Interfaces:
Thread.UncaughtExceptionHandler, InitializingBean, RegisterableExceptionHandler
Direct Known Subclasses:
HibernateValidatorDialogExceptionHandler, MessagesDialogExceptionHandler

public abstract class AbstractDialogExceptionHandler
extends AbstractLoggingExceptionHandler
implements InitializingBean

Logs a throwable and shows a dialog about it to the user.

Since:
0.3
Author:
Geoffrey De Smet

Field Summary
protected  MessageSourceAccessor messageSourceAccessor
           
protected  boolean modalDialog
           
protected  ShutdownPolicy shutdownPolicy
           
 
Fields inherited from class org.springframework.richclient.exceptionhandling.AbstractLoggingExceptionHandler
exceptionPurger, LOG_MESSAGE, logger, logLevel
 
Constructor Summary
AbstractDialogExceptionHandler()
           
 
Method Summary
 void afterPropertiesSet()
           
abstract  Object createExceptionContent(Throwable throwable)
           
 void notifyUserAboutException(Thread thread, Throwable throwable)
          Notify user about an exception
abstract  String resolveExceptionCaption(Throwable throwable)
           
protected  JFrame resolveParentFrame()
           
 void setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)
           
 void setModalDialog(boolean modalDialog)
          Where or not the shown dialog should be modal (see JDialog API).
 void setShutdownPolicy(ShutdownPolicy shutdownPolicy)
          Wheter or not the user should be asked or obligated to shutdown the application.
 
Methods inherited from class org.springframework.richclient.exceptionhandling.AbstractLoggingExceptionHandler
logException, setExceptionPurger, setLogLevel, uncaughtException
 
Methods inherited from class org.springframework.richclient.exceptionhandling.AbstractRegisterableExceptionHandler
registerExceptionHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageSourceAccessor

protected MessageSourceAccessor messageSourceAccessor

modalDialog

protected boolean modalDialog

shutdownPolicy

protected ShutdownPolicy shutdownPolicy
Constructor Detail

AbstractDialogExceptionHandler

public AbstractDialogExceptionHandler()
Method Detail

setMessageSourceAccessor

public void setMessageSourceAccessor(MessageSourceAccessor messageSourceAccessor)

setModalDialog

public void setModalDialog(boolean modalDialog)
Where or not the shown dialog should be modal (see JDialog API). The default is true;

Parameters:
modalDialog -

setShutdownPolicy

public void setShutdownPolicy(ShutdownPolicy shutdownPolicy)
Wheter or not the user should be asked or obligated to shutdown the application. The default is ASK.

Parameters:
shutdownPolicy -

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

notifyUserAboutException

public void notifyUserAboutException(Thread thread,
                                     Throwable throwable)
Description copied from class: AbstractLoggingExceptionHandler
Notify user about an exception

Specified by:
notifyUserAboutException in class AbstractLoggingExceptionHandler

resolveParentFrame

protected JFrame resolveParentFrame()

createExceptionContent

public abstract Object createExceptionContent(Throwable throwable)

resolveExceptionCaption

public abstract String resolveExceptionCaption(Throwable throwable)


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.