< prev index next >

src/java.desktop/share/classes/sun/print/ServiceDialog.java

Print this page




 944                 }
 945             }
 946             cbPrintToFile.setEnabled(dstSupported && dstAllowed);
 947             cbPrintToFile.setSelected(dstSelected && dstAllowed
 948                                       && dstSupported);
 949 
 950             // setup PrintService information widgets
 951             Attribute type = psCurrent.getAttribute(PrinterMakeAndModel.class);
 952             if (type != null) {
 953                 lblType.setText(type.toString());
 954             }
 955             Attribute status =
 956                 psCurrent.getAttribute(PrinterIsAcceptingJobs.class);
 957             if (status != null) {
 958                 lblStatus.setText(getMsg(status.toString()));
 959             }
 960             Attribute info = psCurrent.getAttribute(PrinterInfo.class);
 961             if (info != null) {
 962                 lblInfo.setText(info.toString());
 963             }
 964             btnProperties.setEnabled(uiFactory != null);






 965         }
 966     }
 967 
 968     @SuppressWarnings("serial") // Superclass is not serializable across versions
 969     private class PrintRangePanel extends JPanel
 970         implements ActionListener, FocusListener
 971     {
 972         private final String strTitle = getMsg("border.printrange");
 973         private final PageRanges prAll = new PageRanges(1, Integer.MAX_VALUE);
 974         private JRadioButton rbAll, rbPages, rbSelect;
 975         private JFormattedTextField tfRangeFrom, tfRangeTo;
 976         private JLabel lblRangeTo;
 977         private boolean prSupported;
 978         private boolean prPgRngSupported;
 979 
 980         public PrintRangePanel() {
 981             super();
 982 
 983             GridBagLayout gridbag = new GridBagLayout();
 984             GridBagConstraints c = new GridBagConstraints();




 944                 }
 945             }
 946             cbPrintToFile.setEnabled(dstSupported && dstAllowed);
 947             cbPrintToFile.setSelected(dstSelected && dstAllowed
 948                                       && dstSupported);
 949 
 950             // setup PrintService information widgets
 951             Attribute type = psCurrent.getAttribute(PrinterMakeAndModel.class);
 952             if (type != null) {
 953                 lblType.setText(type.toString());
 954             }
 955             Attribute status =
 956                 psCurrent.getAttribute(PrinterIsAcceptingJobs.class);
 957             if (status != null) {
 958                 lblStatus.setText(getMsg(status.toString()));
 959             }
 960             Attribute info = psCurrent.getAttribute(PrinterInfo.class);
 961             if (info != null) {
 962                 lblInfo.setText(info.toString());
 963             }
 964             PrinterJob job = null;
 965             PrinterJobWrapper wrapper = (PrinterJobWrapper)
 966                                         asCurrent.get(PrinterJobWrapper.class);
 967             if (wrapper != null) {
 968                 job = wrapper.getPrinterJob();
 969             }
 970             btnProperties.setEnabled(uiFactory != null &&  job != null);
 971         }
 972     }
 973 
 974     @SuppressWarnings("serial") // Superclass is not serializable across versions
 975     private class PrintRangePanel extends JPanel
 976         implements ActionListener, FocusListener
 977     {
 978         private final String strTitle = getMsg("border.printrange");
 979         private final PageRanges prAll = new PageRanges(1, Integer.MAX_VALUE);
 980         private JRadioButton rbAll, rbPages, rbSelect;
 981         private JFormattedTextField tfRangeFrom, tfRangeTo;
 982         private JLabel lblRangeTo;
 983         private boolean prSupported;
 984         private boolean prPgRngSupported;
 985 
 986         public PrintRangePanel() {
 987             super();
 988 
 989             GridBagLayout gridbag = new GridBagLayout();
 990             GridBagConstraints c = new GridBagConstraints();


< prev index next >