Java 8 Copies - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Copies class.

This code example shows how to use the following methods:
        if (printService == null) {
            throw new PrintException("Printer lookup failure. No default printer set up for this host");
        } 
        flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
        printRequestAttributeSet = new HashPrintRequestAttributeSet();
        printRequestAttributeSet.add(new Copies(1));
        printRequestAttributeSet.add(MediaSizeName.NA_LETTER);
        printRequestAttributeSet.add(Sides.ONE_SIDED);
    } 
 
    public PrinterOperations(PrintService printService, DocFlavor flavor, PrintRequestAttributeSet printRequestAttributeSet) throws PrintException {
        this.setPrintService(printService);
        this.setFlavor(flavor);
        this.setPrintRequestAttributeSet(printRequestAttributeSet);
    } 
 
    public void print(Doc doc, int copies, boolean sendToPrinter, String mimeType, String jobName) throws PrintException {
        LOG.trace("Print Service: " + this.printService.getName());
        LOG.trace("About to print " + copies + " copy(s)");
         
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	 * 
	 * @param numberOfCopies Must be greater than 0 
	 */ 
	public void setCopies(int numberOfCopies) {
		Assert.isTrue(numberOfCopies > 0, "'copies' must be greater than 0.");
		this.copies = new Copies(numberOfCopies);
	} 
 
	/** 
	 * Specifies the media tray/bin for the print job. This property can be used 
	 * instead of providing the {@link #mediaSizeName} property. Under the covers, 
	 * this property will add the provided {@link MediaTray} instance to the 
	 * respective {@link PrintRequestAttributeSet}. This property is not used, 
	 * if not specified (No explicit default value). 
	 * 
	 * @param mediaTray Must not be null 
	 */ 
	public void setMediaTray(MediaTray mediaTray) {
		Assert.notNull(mediaTray, "'mediaTray' must not be null.");
		this.mediaTray = mediaTray;
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
	} 
	 
	@Override 
	public void setCopies(int copies) {
		// Will be ignored, but add attribute anyway 
		attributes.add(new Copies(copies));
	} 
 
	/** 
	 * Sets the creator for this document. 
	 *  
	 * @param creator the application name. 
	 */ 
	public void setCreator(String creator) {
		info.setCreator(creator);
	} 
 
	@Override 
	public void setJobName(String jobName) {
		attributes.add(new JobName(jobName, Locale.getDefault()));
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 Copies Methods: