167 * Initialize print dialog. 168 */ 169 void initPrintDialog(int x, int y, 170 PrintService[] services, 171 int defaultServiceIndex, 172 DocFlavor flavor, 173 PrintRequestAttributeSet attributes) 174 { 175 this.services = services; 176 this.defaultServiceIndex = defaultServiceIndex; 177 this.asOriginal = attributes; 178 this.asCurrent = new HashPrintRequestAttributeSet(attributes); 179 this.psCurrent = services[defaultServiceIndex]; 180 this.docFlavor = flavor; 181 SunPageSelection pages = 182 (SunPageSelection)attributes.get(SunPageSelection.class); 183 if (pages != null) { 184 isAWT = true; 185 } 186 187 Container c = getContentPane(); 188 c.setLayout(new BorderLayout()); 189 190 tpTabs = new JTabbedPane(); 191 tpTabs.setBorder(new EmptyBorder(5, 5, 5, 5)); 192 193 String gkey = getMsg("tab.general"); 194 int gmnemonic = getVKMnemonic("tab.general"); 195 pnlGeneral = new GeneralPanel(); 196 tpTabs.add(gkey, pnlGeneral); 197 tpTabs.setMnemonicAt(0, gmnemonic); 198 199 String pkey = getMsg("tab.pagesetup"); 200 int pmnemonic = getVKMnemonic("tab.pagesetup"); 201 pnlPageSetup = new PageSetupPanel(); 202 tpTabs.add(pkey, pnlPageSetup); 203 tpTabs.setMnemonicAt(1, pmnemonic); 204 205 String akey = getMsg("tab.appearance"); 206 int amnemonic = getVKMnemonic("tab.appearance"); | 167 * Initialize print dialog. 168 */ 169 void initPrintDialog(int x, int y, 170 PrintService[] services, 171 int defaultServiceIndex, 172 DocFlavor flavor, 173 PrintRequestAttributeSet attributes) 174 { 175 this.services = services; 176 this.defaultServiceIndex = defaultServiceIndex; 177 this.asOriginal = attributes; 178 this.asCurrent = new HashPrintRequestAttributeSet(attributes); 179 this.psCurrent = services[defaultServiceIndex]; 180 this.docFlavor = flavor; 181 SunPageSelection pages = 182 (SunPageSelection)attributes.get(SunPageSelection.class); 183 if (pages != null) { 184 isAWT = true; 185 } 186 187 if (attributes.get(DialogOnTop.class) != null) { 188 setAlwaysOnTop(true); 189 } 190 Container c = getContentPane(); 191 c.setLayout(new BorderLayout()); 192 193 tpTabs = new JTabbedPane(); 194 tpTabs.setBorder(new EmptyBorder(5, 5, 5, 5)); 195 196 String gkey = getMsg("tab.general"); 197 int gmnemonic = getVKMnemonic("tab.general"); 198 pnlGeneral = new GeneralPanel(); 199 tpTabs.add(gkey, pnlGeneral); 200 tpTabs.setMnemonicAt(0, gmnemonic); 201 202 String pkey = getMsg("tab.pagesetup"); 203 int pmnemonic = getVKMnemonic("tab.pagesetup"); 204 pnlPageSetup = new PageSetupPanel(); 205 tpTabs.add(pkey, pnlPageSetup); 206 tpTabs.setMnemonicAt(1, pmnemonic); 207 208 String akey = getMsg("tab.appearance"); 209 int amnemonic = getVKMnemonic("tab.appearance"); |