@Test public void testCopyAuxillaryAttributes() { MasterReport report = mockReport( PageFormat.LANDSCAPE ); PrintRequestAttributeSet result = Java14PrintUtil.copyAuxillaryAttributes( null, report ); verifyCopyAuxillaryResult( result ); PrintRequestAttributeSet existingResult = Java14PrintUtil.copyAuxillaryAttributes( result, report ); verifyCopyAuxillaryResult( existingResult ); }
public static PrintRequestAttributeSet copyAuxillaryAttributes( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } if ( attributes.containsKey( JobName.class ) == false ) { final String jobName = report.getReportConfiguration().getConfigProperty( PrintUtil.PRINTER_JOB_NAME_KEY, report.getTitle() ); if ( jobName != null ) { attributes.add( new JobName( jobName, null ) ); } } if ( attributes.containsKey( Copies.class ) == false ) { final int numberOfCopies = PrintUtil.getNumberOfCopies( report.getReportConfiguration() ); attributes.add( new Copies( numberOfCopies ) ); } return attributes; }
Java14PrintUtil { public static PrintRequestAttributeSet copyAuxillaryAttributes( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } if ( attributes.containsKey( JobName.class ) == false ) { final String jobName = report.getReportConfiguration().getConfigProperty( PrintUtil.PRINTER_JOB_NAME_KEY, report.getTitle() ); if ( jobName != null ) { attributes.add( new JobName( jobName, null ) ); } } if ( attributes.containsKey( Copies.class ) == false ) { final int numberOfCopies = PrintUtil.getNumberOfCopies( report.getReportConfiguration() ); attributes.add( new Copies( numberOfCopies ) ); } return attributes; } }
Java14PrintUtil { public static PrintRequestAttributeSet copyAuxillaryAttributes( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } if ( attributes.containsKey( JobName.class ) == false ) { final String jobName = report.getReportConfiguration().getConfigProperty( PrintUtil.PRINTER_JOB_NAME_KEY, report.getTitle() ); if ( jobName != null ) { attributes.add( new JobName( jobName, null ) ); } } if ( attributes.containsKey( Copies.class ) == false ) { final int numberOfCopies = PrintUtil.getNumberOfCopies( report.getReportConfiguration() ); attributes.add( new Copies( numberOfCopies ) ); } return attributes; } private  Java14PrintUtil(); }
Java14PrintUtil { public static PrintRequestAttributeSet copyAuxillaryAttributes( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } if ( attributes.containsKey( JobName.class ) == false ) { final String jobName = report.getReportConfiguration().getConfigProperty( PrintUtil.PRINTER_JOB_NAME_KEY, report.getTitle() ); if ( jobName != null ) { attributes.add( new JobName( jobName, null ) ); } } if ( attributes.containsKey( Copies.class ) == false ) { final int numberOfCopies = PrintUtil.getNumberOfCopies( report.getReportConfiguration() ); attributes.add( new Copies( numberOfCopies ) ); } return attributes; } private  Java14PrintUtil(); static int isValidConfiguration( final PrintRequestAttributeSet attributes, final MasterReport report ); static PrintRequestAttributeSet copyConfiguration( PrintRequestAttributeSet attributes,
      final MasterReport report ); static PrintRequestAttributeSet copyAuxillaryAttributes( PrintRequestAttributeSet attributes,
      final MasterReport report ); static PageFormat extractPageFormat( final PrintRequestAttributeSet attributeSet ); static void printDirectly( final MasterReport report, PrintService printService ); static boolean print( final MasterReport report ); static boolean print( final MasterReport report, final ReportProgressListener progressListener ); }
Java14PrintUtil { public static PrintRequestAttributeSet copyAuxillaryAttributes( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } if ( attributes.containsKey( JobName.class ) == false ) { final String jobName = report.getReportConfiguration().getConfigProperty( PrintUtil.PRINTER_JOB_NAME_KEY, report.getTitle() ); if ( jobName != null ) { attributes.add( new JobName( jobName, null ) ); } } if ( attributes.containsKey( Copies.class ) == false ) { final int numberOfCopies = PrintUtil.getNumberOfCopies( report.getReportConfiguration() ); attributes.add( new Copies( numberOfCopies ) ); } return attributes; } private  Java14PrintUtil(); static int isValidConfiguration( final PrintRequestAttributeSet attributes, final MasterReport report ); static PrintRequestAttributeSet copyConfiguration( PrintRequestAttributeSet attributes,
      final MasterReport report ); static PrintRequestAttributeSet copyAuxillaryAttributes( PrintRequestAttributeSet attributes,
      final MasterReport report ); static PageFormat extractPageFormat( final PrintRequestAttributeSet attributeSet ); static void printDirectly( final MasterReport report, PrintService printService ); static boolean print( final MasterReport report ); static boolean print( final MasterReport report, final ReportProgressListener progressListener ); static final int CONFIGURATION_VALID; static final int CONFIGURATION_REPAGINATE; static final int CONFIGURATION_SHOW_DIALOG; }