Package com.cedarsoft.spring.rcp.events

Examples of com.cedarsoft.spring.rcp.events.ApplicationAlertEvent


    this.context = applicationContext;
  }

  @Override
  public void notifyUserAboutException( @NotNull Thread thread, @NotNull Throwable throwable ) {
    ApplicationAlertEvent event = new ApplicationAlertEvent( ApplicationAlertEvent.EventType.ERROR, throwable.getLocalizedMessage(), throwable );
    context.publishEvent( event );
  }
View Full Code Here


  private JTextPane messageTextPane;

  @Override
  public void onApplicationEvent( ApplicationEvent event ) {
    if ( event instanceof ApplicationAlertEvent ) {
      ApplicationAlertEvent alertEvent = ( ApplicationAlertEvent ) event;
      if ( alertEvent.isErrorEvent() ) {
        if ( alertEvent.getSource() != null && alertEvent.getSource() instanceof Throwable ) {
          Throwable throwable = ( Throwable ) alertEvent.getSource();
          setErrorMessage( getStackTraceString( throwable ) );
        } else {
          setErrorMessage( alertEvent.getMessage() );
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.cedarsoft.spring.rcp.events.ApplicationAlertEvent

Copyright © 2018 www.massapicom. 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.