/** * Returns the errort message string of this throwable object. * * @return the error message string of this <code>Throwable</code> object if it was created with an error message * string; or <code>null</code> if it was created with no error message. */ public String getMessage() { return super.getMessage() + ": " + childExceptions.size() + " exceptions occured."; }
private JScrollPane createParametersPanel() { parametersPanel = new ParameterReportControllerPane(); try { parametersPanel.setReport( masterReport ); } catch ( ReportProcessingException e ) { parametersPanel.setErrorMessage( e.getMessage() ); logger.error( "Failed to query parameters", e ); // NON-NLS } parametersPanel.hideControls(); final JPanel carrierPanel = new JPanel( new BorderLayout() ); carrierPanel.setBorder( BorderFactory.createEmptyBorder( 10, 10, 10, 10 ) ); carrierPanel.add( parametersPanel, BorderLayout.NORTH ); final JScrollPane result = new JScrollPane( carrierPanel ); result.setVerticalScrollBarPolicy( ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED ); return result; }
/** * Called when the report controller gets removed. * * @param pane */ public void deinitialize( final PreviewPane pane ) { try { this.previewPane.removePropertyChangeListener( PreviewPane.REPORT_JOB_PROPERTY, reportUpdateHandler ); this.controllerPane.setReport( null ); } catch ( ReportProcessingException e ) { // Cannot recover from that controllerPane.setErrorMessage( e.getMessage() ); logger.debug( "Failed", e ); // NON-NLS } } }
public void reportDone( final ReportEvent event ) { try { if ( event.getState().isSubReportEvent() == false ) { this.template.finishReport(); } } catch ( ReportProcessingException pre ) { throw new InvalidReportStateException( pre.getMessage(), pre ); } }
protected void performUpdate() { isUpdating = true; try { report.getParameterValues().clear(); report.getParameterValues().putAll( reportParameterValues ); setReport( report ); final ChangeEvent event = new ChangeEvent( this ); for ( int i = 0; i < changeListeners.size(); i++ ) { final ChangeListener listener = changeListeners.get( i ); listener.stateChanged( event ); } } catch ( ReportProcessingException e ) { ExceptionDialog.showExceptionDialog( this, messages.getString( "ParameterReportControllerPane.Error" ), messages .getString( "ParameterReportControllerPane.ErrorWhileConfiguringParameterUI", e.getMessage() ), e ); } isUpdating = false; }
/** * This method gets called when a bound property is changed. * * @param evt * A PropertyChangeEvent object describing the event source and the property that has changed. */ public void propertyChange( final PropertyChangeEvent evt ) { final MasterReport report = getPreviewPane().getReportJob(); final ParameterReportControllerPane reportControllerPane = getControllerPane(); try { reportControllerPane.setReport( report ); } catch ( ReportProcessingException e ) { // Cannot recover from that reportControllerPane.setErrorMessage( e.getMessage() ); logger.debug( "Failed", e ); // NON-NLS } } }
public void initialize( final PreviewPane pane ) { try { if ( this.previewPane != null ) { this.previewPane.removePropertyChangeListener( PreviewPane.REPORT_JOB_PROPERTY, reportUpdateHandler ); this.controllerPane.setReport( null ); } this.previewPane = pane; if ( this.previewPane != null ) { this.previewPane.addPropertyChangeListener( PreviewPane.REPORT_JOB_PROPERTY, reportUpdateHandler ); this.controllerPane.setReport( previewPane.getReportJob() ); } } catch ( ReportProcessingException e ) { // Cannot recover from that controllerPane.setErrorMessage( e.getMessage() ); logger.debug( "Failed", e ); // NON-NLS } }