-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathOptions.java
More file actions
139 lines (122 loc) · 2.94 KB
/
Options.java
File metadata and controls
139 lines (122 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
package com.printnode.api;
import java.io.Serializable;
/**
* Object to be serailized into JSON in createPrintJob.
* */
public class Options implements Serializable {
/**
* Which bin you want to use....
* */
private String bin;
/**
* Whether you want to have collate enabled.
* */
private Boolean collate;
/**
* the amount of copies you want to have.
* */
private int copies = -1;
/**
* The DPI you want to use.
* */
private String dpi;
/**
* The duplex you want to use.
* */
private String duplex;
/**
* Whether you want to fit the printjob to page.
* */
private Boolean fitToPage;
/**
* Which type of media you want to use.
* */
private String media;
/**
* The NUP you want to use.
* */
private int nup = -1;
/**
* Which pages of the printjob you want to print.
* */
private String pages;
/**
* What type of paper you are using.
* */
private String paper;
/**
* Rotation of the printjob.
* */
private int rotate = -1;
/**
* Default constructor.
* */
public Options() {
}
/**
* @param newBin set the bin we want to use.
* */
public final void setBin(final String newBin) {
bin = newBin;
}
/**
* @param newCollate Set whether we want to collate.
* */
public final void setCollate(final boolean newCollate) {
collate = newCollate;
}
/**
* @param newCopies Set the amount of copies we want to print.
* */
public final void setCopies(final int newCopies) {
copies = newCopies;
}
/**
* @param newDpi Set the DPI.
* */
public final void setDpi(final String newDpi) {
dpi = newDpi;
}
/**
* @param newDuplex Set the duplex.
* */
public final void setDuplex(final String newDuplex) {
duplex = newDuplex;
}
/**
* @param newFitToPage set whether we want to fit the content to the page.
* */
public final void setFitToPage(final boolean newFitToPage) {
fitToPage = newFitToPage;
}
/**
* @param newMedia Set the media for the printer.
* */
public final void setMedia(final String newMedia) {
media = newMedia;
}
/**
* @param newNup Set number of pages to print per page for a compact layout printing.
* */
public final void setNup(final int newNup) {
nup = newNup;
}
/**
* @param newPages set the pages to print.
* */
public final void setPages(final String newPages) {
pages = newPages;
}
/**
* @param newPaper set paper type.
* */
public final void setPaper(final String newPaper) {
paper = newPaper;
}
/**
* @param newRotate set rotation. Can only be 90,180 or 270.
* */
public final void setRotate(final int newRotate) {
rotate = newRotate;
}
}