@Test public void testCopyConfiguration() { PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet(); checkCopyConf( null ); checkCopyConf( attributes ); }
public static PrintRequestAttributeSet copyConfiguration( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } final PageDefinition pdef = report.getPageDefinition(); final PageFormat format = pdef.getPageFormat( 0 ); final Paper paper = format.getPaper(); final Media media = MediaSize.findMedia( (float) ( paper.getWidth() / POINTS_PER_INCH ), (float) ( paper.getHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( media ); final MediaPrintableArea printableArea = new MediaPrintableArea( (float) ( paper.getImageableX() / POINTS_PER_INCH ), (float) ( paper.getImageableY() / POINTS_PER_INCH ), (float) ( paper.getImageableWidth() / POINTS_PER_INCH ), (float) ( paper.getImageableHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( printableArea ); attributes.add( mapOrientation( format.getOrientation() ) ); return attributes; }
Java14PrintUtil { public static PrintRequestAttributeSet copyConfiguration( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } final PageDefinition pdef = report.getPageDefinition(); final PageFormat format = pdef.getPageFormat( 0 ); final Paper paper = format.getPaper(); final Media media = MediaSize.findMedia( (float) ( paper.getWidth() / POINTS_PER_INCH ), (float) ( paper.getHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( media ); final MediaPrintableArea printableArea = new MediaPrintableArea( (float) ( paper.getImageableX() / POINTS_PER_INCH ), (float) ( paper.getImageableY() / POINTS_PER_INCH ), (float) ( paper.getImageableWidth() / POINTS_PER_INCH ), (float) ( paper.getImageableHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( printableArea ); attributes.add( mapOrientation( format.getOrientation() ) ); return attributes; } }
Java14PrintUtil { public static PrintRequestAttributeSet copyConfiguration( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } final PageDefinition pdef = report.getPageDefinition(); final PageFormat format = pdef.getPageFormat( 0 ); final Paper paper = format.getPaper(); final Media media = MediaSize.findMedia( (float) ( paper.getWidth() / POINTS_PER_INCH ), (float) ( paper.getHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( media ); final MediaPrintableArea printableArea = new MediaPrintableArea( (float) ( paper.getImageableX() / POINTS_PER_INCH ), (float) ( paper.getImageableY() / POINTS_PER_INCH ), (float) ( paper.getImageableWidth() / POINTS_PER_INCH ), (float) ( paper.getImageableHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( printableArea ); attributes.add( mapOrientation( format.getOrientation() ) ); return attributes; } private  Java14PrintUtil(); }
Java14PrintUtil { public static PrintRequestAttributeSet copyConfiguration( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } final PageDefinition pdef = report.getPageDefinition(); final PageFormat format = pdef.getPageFormat( 0 ); final Paper paper = format.getPaper(); final Media media = MediaSize.findMedia( (float) ( paper.getWidth() / POINTS_PER_INCH ), (float) ( paper.getHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( media ); final MediaPrintableArea printableArea = new MediaPrintableArea( (float) ( paper.getImageableX() / POINTS_PER_INCH ), (float) ( paper.getImageableY() / POINTS_PER_INCH ), (float) ( paper.getImageableWidth() / POINTS_PER_INCH ), (float) ( paper.getImageableHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( printableArea ); attributes.add( mapOrientation( format.getOrientation() ) ); 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 copyConfiguration( PrintRequestAttributeSet attributes, final MasterReport report ) { if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet(); } final PageDefinition pdef = report.getPageDefinition(); final PageFormat format = pdef.getPageFormat( 0 ); final Paper paper = format.getPaper(); final Media media = MediaSize.findMedia( (float) ( paper.getWidth() / POINTS_PER_INCH ), (float) ( paper.getHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( media ); final MediaPrintableArea printableArea = new MediaPrintableArea( (float) ( paper.getImageableX() / POINTS_PER_INCH ), (float) ( paper.getImageableY() / POINTS_PER_INCH ), (float) ( paper.getImageableWidth() / POINTS_PER_INCH ), (float) ( paper.getImageableHeight() / POINTS_PER_INCH ), Size2DSyntax.INCH ); attributes.add( printableArea ); attributes.add( mapOrientation( format.getOrientation() ) ); 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; }