| java.lang.Object | |
| ↳ | android.print.PrinterCapabilitiesInfo.Builder | 
       Builder for creating of a
       
        
         PrinterCapabilitiesInfo
        
       
       . This class is
 responsible to enforce that all required attributes have at least one
 default value. In other words, this class creates only well-formed
       
        
         PrinterCapabilitiesInfo
        
       
       s.
      
Look at the individual methods for a reference whether a property is required or if it is optional.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
          | 
        
          
          Creates a new instance.
          
         | 
       ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
          | 
        
          
          Adds a supported media size.
          
         | 
       ||||||||||
| 
          | 
        
          
          Adds a supported resolution.
          
         | 
       ||||||||||
| 
          | 
        
          
          Crates a new
           
        
           
            PrinterCapabilitiesInfo
           
          
          enforcing that all
 required properties have been specified.
          | 
       ||||||||||
| 
          | 
        
          
          Sets the color modes.
          
         | 
       ||||||||||
| 
          | 
        
          
          Sets the minimal margins.
          
         | 
       ||||||||||
| 
         
          [Expand]
         
          
          Inherited Methods
          
         | 
       |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
         
           
         
         From class
         
          java.lang.Object
         
          | 
       |||||||||||
Creates a new instance.
| printerId | 
           The printer id. Cannot be
           
            null
           
           .
           | 
         
|---|
| IllegalArgumentException | 
           If the printer id is
           
            null
           
           .
           | 
         
|---|
Adds a supported media size.
Required: Yes
| mediaSize | A media size. | 
|---|---|
| isDefault | Whether this is the default. | 
| IllegalArgumentException | If set as default and there is already a default. | 
|---|
Adds a supported resolution.
Required: Yes
| resolution | A resolution. | 
|---|---|
| isDefault | Whether this is the default. | 
| IllegalArgumentException | If set as default and there is already a default. | 
|---|
         Crates a new
         
          
           PrinterCapabilitiesInfo
          
         
         enforcing that all
 required properties have been specified. See individual methods
 in this class for reference about required attributes.
        
           
            PrinterCapabilitiesInfo
           
          
          .
         | IllegalStateException | If a required attribute was not specified. | 
|---|
Sets the color modes.
Required: Yes
| colorModes | The color mode bit mask. | 
|---|---|
| defaultColorMode | The default color mode. | 
Note: On platform version 19 (Kitkat) specifying only PrintAttributes#COLOR_MODE_MONOCHROME leads to a print spooler crash. Hence, you should declare either both color modes or PrintAttributes#COLOR_MODE_COLOR.
| IllegalArgumentException | If color modes contains an invalid mode bit or if the default color mode is invalid. | 
|---|
Sets the minimal margins. These are the minimal margins the printer physically supports.
Required: Yes
| margins | The margins. | 
|---|
| IllegalArgumentException | 
           If margins are
           
            null
           
           .
           | 
         
|---|