[OpenJDK 2D-Dev] [9] RFR JDK-6357887: selected printertray is ignored under linux

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Thu Aug 18 06:42:37 UTC 2016



On 8/18/2016 12:11 PM, Prasanta Sadhukhan wrote:
> MediaTray values are bundled with "Media" attribute so calling 
> attributes.get(CustomMediatray.class) returns null.
> Modified webrev to get Media attribute and then see if the attribute 
> is an instance of CustomMediatray.
>
> http://cr.openjdk.java.net/~psadhukhan/6357887/webrev.01/
>
Also,removed some unused imports.
> Regards
> Prasanta
> On 8/17/2016 9:09 PM, Philip Race wrote:
>> This all looks fine although this can be a simple call to
>> attributes.get(CustomMediaTray.class) can't it ?
>>
>> 502         for (int i=0; i< attrs.length; i++) {
>>  503             Attribute attr = attrs[i];
>>  504             try {
>>  505                 if (attr instanceof CustomMediaTray) {
>>  506                     CustomMediaTray customTray = 
>> (CustomMediaTray)attr;
>>  507                     mOptions = " InputSlot="+ 
>> customTray.getChoiceName();
>>  508                 }
>>  509             } catch (ClassCastException e) {
>>
>> -phil.
>>
>> On 8/10/16, 1:59 AM, Prasanta Sadhukhan wrote:
>>> Hi All,
>>>
>>> Please review a fix for an issue where it is seen that the selected 
>>> printer tray is ignored in linux and default standard tray is used 
>>> for printing.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-6357887
>>> webrev: http://cr.openjdk.java.net/~psadhukhan/6357887/webrev.00/
>>>
>>> Issue was lpr command needs "-o InputSlot=<trayname>" to select the 
>>> printertray which was not being passed to lpr command.
>>> Proposed fix added InputSlot option to lpr command to select the 
>>> printertray.
>>>
>>> Tested in ubuntu and solaris11.
>>>
>>> Regards
>>> Prasanta
>




More information about the 2d-dev mailing list