public static final class PrintDocumentInfo.Builder
extends Object
| java.lang.Object | |
| android.print.PrintDocumentInfo.Builder | |
用于创建 PrintDocumentInfo生成器。
Public constructors |
|
|---|---|
PrintDocumentInfo.Builder(String name) 构造函数。 |
|
公共方法(Public methods) |
|
|---|---|
PrintDocumentInfo |
build() 创建一个新的 |
PrintDocumentInfo.Builder |
setContentType(int type) 设置内容类型。 |
PrintDocumentInfo.Builder |
setPageCount(int pageCount) 设置总页数。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
PrintDocumentInfo.Builder (String name)
构造函数。
相关属性的值使用默认值进行初始化。 有关默认值的信息,请参阅各个setter的文档。
| 参数(Parameters) | |
|---|---|
name |
String: The document name which may be shown to the user and is the file name if the content it describes is saved as a PDF. Cannot be empty. |
PrintDocumentInfo build ()
创建一个新的 PrintDocumentInfo实例。
| 返回(Returns) | |
|---|---|
PrintDocumentInfo |
The new instance. |
PrintDocumentInfo.Builder setContentType (int type)
设置内容类型。
| 参数(Parameters) | |
|---|---|
type |
int: The content type. |
| 返回(Returns) | |
|---|---|
PrintDocumentInfo.Builder |
This builder. |
PrintDocumentInfo.Builder setPageCount (int pageCount)
设置总页数。
| 参数(Parameters) | |
|---|---|
pageCount |
int: The number of pages. Must be greater than or equal to zero or PAGE_COUNT_UNKNOWN. |
| 返回(Returns) | |
|---|---|
PrintDocumentInfo.Builder |
This builder. |