harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r454289 [13/22] - in /incubator/harmony/enhanced/classlib/trunk/modules/H-1609: ./ modules/ modules/applet/ modules/applet/src/ modules/applet/src/main/ modules/applet/src/main/java/ modules/applet/src/main/java/java/ modules/applet/src/mai...
Date Mon, 09 Oct 2006 05:33:21 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/ServiceUIDialogTemplate.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/ServiceUIDialogTemplate.java?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/ServiceUIDialogTemplate.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/ServiceUIDialogTemplate.java Sun Oct  8 22:33:09 2006
@@ -0,0 +1,1315 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Irina A. Arkhipets 
+ * @version $Revision: 1.3 $ 
+ */ 
+
+/*
+ * ServiceUIDialogTemplate.java
+ * 
+ * This is a superclass for org.apache.harmony.x.print.ServiceUIDialog class.
+ * 
+ * ServiceUIDialogTemplate was automatically created using Eclipse Visual
+ * Editor tool. It is organized to reflect visual dialog representation only.
+ * All attributes and print services logic is concentrated in ServiceUIDialog 
+ * class.
+ *   
+ */
+
+package org.apache.harmony.x.print;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.text.DecimalFormat;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JFormattedTextField;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JSpinner;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextField;
+import javax.swing.border.TitledBorder;
+import javax.swing.text.NumberFormatter;
+
+public class ServiceUIDialogTemplate {
+
+JPanel namePanel=null;
+JLabel nameLabel=null;
+JComboBox servicesBox=null;
+JButton propertiesBtn=null;
+JLabel statusLabel=null;
+JLabel typeLabel=null;
+JLabel infoLabel=null;
+JLabel statusText=null;
+JLabel typeText=null;
+JLabel infoText=null;
+JCheckBox toFileBox=null;
+JPanel printRangePanel=null;
+JPanel copiesPanel=null;
+JRadioButton allRngBtn=null;
+JRadioButton pageRngBtn=null;
+JLabel toLabel=null;
+JFormattedTextField fromTxt=null;
+JFormattedTextField toTxt=null;
+JLabel copiesLabel=null;
+JSpinner cpSpinner=null;
+JCheckBox collateBox=null;
+JPanel generalPanel=null;
+JTabbedPane tabbedPane=null;
+JPanel pageSetupMediaPanel=null;
+JLabel sizeLabel=null;
+JComboBox sizeBox=null;
+JLabel sourceLabel=null;
+JComboBox sourceBox=null;
+JPanel orientationPanel=null;
+JRadioButton portraitBtn=null;
+JRadioButton landscapeBtn=null;
+JRadioButton rvportraitBtn=null;
+JRadioButton rvlandscapeBtn=null;
+JPanel marginsPanel=null;
+JLabel leftLabel=null;
+JLabel rightLabel=null;
+JFormattedTextField rightTxt=null;
+JFormattedTextField leftTxt=null;
+JFormattedTextField topTxt=null;
+JLabel topLabel=null;
+JLabel bottomLabel=null;
+JFormattedTextField bottomTxt=null;
+JPanel pageSetupPanel=null;
+JPanel colorPanel=null;
+JRadioButton monoBtn=null;
+JRadioButton colorBtn=null;
+JPanel qualityPanel=null;
+JRadioButton draftBtn=null;
+JRadioButton normalBtn=null;
+JRadioButton highBtn=null;
+JPanel sidesPanel=null;
+JRadioButton oneSideBtn=null;
+JRadioButton tumbleBtn=null;
+JRadioButton duplexBtn=null;
+JPanel jobAttributesPanel=null;
+JCheckBox bannerBox=null;
+JLabel priorityLabel=null;
+JSpinner prtSpinner=null;
+JTextField jobNameTxt=null;
+JLabel jobNameLabel=null;
+JLabel userNameLabel=null;
+JTextField userNameTxt=null;
+JPanel appearancePanel=null;
+JButton printBtn=null;
+JButton cancelBtn=null;
+JDialog printDialog=null; //  @jve:decl-index=0:visual-constraint="86,16"
+JPanel dialogPanel=null; //  @jve:decl-index=0:visual-constraint="709,338"
+JPanel buttonsPanel=null;
+
+JPanel vendorSuppliedPanel=null;
+
+/*
+ * Formatter for the integer text fields
+ */
+public static NumberFormatter getNumberFormatter() {
+    DecimalFormat format = new DecimalFormat("#####");
+    NumberFormatter ret;
+    format.setParseIntegerOnly(true);
+    format.setDecimalSeparatorAlwaysShown(false);
+    format.setMinimumIntegerDigits(0);
+    format.setMaximumIntegerDigits(5);
+    format.setMinimumFractionDigits(0);
+    format.setMaximumFractionDigits(0);
+    ret = new NumberFormatter(format);
+    ret.setMinimum(new Integer(1));
+    ret.setMaximum(new Integer(Integer.MAX_VALUE));
+    return ret;
+}
+
+/*
+ * Formatter for the float text fields
+ */
+public static NumberFormatter getFloatFormatter() {
+    DecimalFormat format = new DecimalFormat("###.##");
+    NumberFormatter ret;
+    format.setParseIntegerOnly(false);
+    format.setDecimalSeparatorAlwaysShown(true);
+    format.setMinimumIntegerDigits(1);
+    format.setMaximumIntegerDigits(3);
+    format.setMinimumFractionDigits(1);
+    format.setMaximumFractionDigits(2);
+    ret = new NumberFormatter(format);
+    ret.setMinimum(new Float(0.0F));
+    ret.setMaximum(new Float(999F));
+    return ret;
+}
+
+private JPanel getNamePanel() {
+    if(namePanel==null) {
+        namePanel=new JPanel();
+        infoText=new JLabel();
+        typeText=new JLabel();
+        statusText=new JLabel();
+        infoLabel=new JLabel("Info:");
+        typeLabel=new JLabel("Type");
+        statusLabel=new JLabel("Status:");
+        GridBagConstraints gridBagConstraints1=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints3=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints4=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints51=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints7=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints8=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints9=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints10=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints2=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints5=new GridBagConstraints();
+        nameLabel=new JLabel();
+        namePanel.setLayout(new GridBagLayout());
+        nameLabel.setText("Name:");
+        gridBagConstraints2.gridx=0;
+        gridBagConstraints2.gridy=0;
+        gridBagConstraints2.fill=java.awt.GridBagConstraints.BOTH;
+        gridBagConstraints2.anchor=java.awt.GridBagConstraints.CENTER;
+        gridBagConstraints2.gridheight=2;
+        gridBagConstraints2.gridwidth=2;
+        gridBagConstraints5.gridx=4;
+        gridBagConstraints5.gridy=1;
+        gridBagConstraints5.gridheight=4;
+        gridBagConstraints5.anchor=java.awt.GridBagConstraints.NORTH;
+        gridBagConstraints1.gridx=2;
+        gridBagConstraints1.gridy=1;
+        gridBagConstraints1.weightx=1.0;
+        gridBagConstraints1.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints3.gridx=1;
+        gridBagConstraints3.gridy=5;
+        statusLabel.setText("Status:");
+        gridBagConstraints4.gridx=1;
+        gridBagConstraints4.gridy=7;
+        typeLabel.setText("Type:");
+        gridBagConstraints51.gridx=1;
+        gridBagConstraints51.gridy=8;
+        infoLabel.setText("Info:");
+        namePanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Print Service", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        gridBagConstraints7.gridx=2;
+        gridBagConstraints7.gridy=5;
+        gridBagConstraints7.gridwidth=3;
+        gridBagConstraints7.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints8.gridx=2;
+        gridBagConstraints8.gridy=7;
+        gridBagConstraints8.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints9.gridx=2;
+        gridBagConstraints9.gridy=8;
+        gridBagConstraints9.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints9.gridwidth=1;
+        gridBagConstraints9.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints10.gridx=4;
+        gridBagConstraints10.gridy=8;
+        gridBagConstraints10.gridheight=3;
+        gridBagConstraints10.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints10.anchor=java.awt.GridBagConstraints.CENTER;
+        gridBagConstraints2.insets=new java.awt.Insets(9, 7, 9, 7);
+        namePanel.setPreferredSize(new java.awt.Dimension(515, 180));
+        gridBagConstraints5.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints1.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints3.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints3.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints4.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints4.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints51.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints51.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints7.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints8.insets=new java.awt.Insets(9, 7, 9, 7);
+        namePanel.add(infoText, gridBagConstraints9);
+        namePanel.add(typeLabel, gridBagConstraints4);
+        namePanel.add(infoLabel, gridBagConstraints51);
+        namePanel.add(gettoFileBox(), gridBagConstraints10);
+        namePanel.add(typeText, gridBagConstraints8);
+        namePanel.add(statusLabel, gridBagConstraints3);
+        namePanel.add(nameLabel, gridBagConstraints2);
+        namePanel.add(getPropertiesBtn(), gridBagConstraints5);
+        namePanel.add(getservicesBox(), gridBagConstraints1);
+        namePanel.add(statusText, gridBagConstraints7);
+    }
+    return namePanel;
+}
+
+/**
+ * This method initializes jComboBox
+ * 
+ * @return javax.swing.JComboBox
+ */
+private JComboBox getservicesBox() {
+    if(servicesBox==null) {
+        servicesBox=new JComboBox();
+        nameLabel.setDisplayedMnemonic('N');
+        nameLabel.setLabelFor(servicesBox);
+    }
+    return servicesBox;
+}
+
+/**
+ * This method initializes jButton
+ * 
+ * @return javax.swing.JButton
+ */
+private JButton getPropertiesBtn() {
+    if(propertiesBtn==null) {
+        propertiesBtn=new JButton();
+        propertiesBtn.setText("Properties");
+    }
+    return propertiesBtn;
+}
+
+/**
+ * This method initializes jCheckBox
+ * 
+ * @return javax.swing.JCheckBox
+ */
+private JCheckBox gettoFileBox() {
+    if(toFileBox==null) {
+        toFileBox=new JCheckBox();
+        toFileBox.setText("Print to file");
+        toFileBox.setMnemonic('F');
+    }
+    return toFileBox;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getPrintRangePanel() {
+    if(printRangePanel==null) {
+        printRangePanel=new JPanel();
+        toLabel=new JLabel();
+        GridBagConstraints gridBagConstraints11=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints12=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints13=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints14=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints17=new GridBagConstraints();
+        printRangePanel.setLayout(new GridBagLayout());
+        printRangePanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Print Range", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        printRangePanel.setPreferredSize(new java.awt.Dimension(256, 110));
+        gridBagConstraints11.gridx=0;
+        gridBagConstraints11.gridy=0;
+        gridBagConstraints11.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints12.gridx=0;
+        gridBagConstraints12.gridy=1;
+        gridBagConstraints13.gridx=2;
+        gridBagConstraints13.gridy=1;
+        toLabel.setText("to");
+        gridBagConstraints14.gridx=1;
+        gridBagConstraints14.gridy=1;
+        gridBagConstraints14.weightx=1.0;
+        gridBagConstraints14.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints14.insets=new java.awt.Insets(9, 9, 9, 9);
+        gridBagConstraints17.gridx=3;
+        gridBagConstraints17.gridy=1;
+        gridBagConstraints17.weightx=1.0;
+        gridBagConstraints17.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints17.insets=new java.awt.Insets(9, 9, 9, 9);
+        gridBagConstraints11.insets=new java.awt.Insets(9, 9, 9, 9);
+        gridBagConstraints12.insets=new java.awt.Insets(9, 9, 9, 9);
+        gridBagConstraints13.insets=new java.awt.Insets(0, 0, 0, 0);
+        printRangePanel.add(toLabel, gridBagConstraints13);
+        printRangePanel.add(getallRngBtn(), gridBagConstraints11);
+        printRangePanel.add(getFromTxt(), gridBagConstraints14);
+        printRangePanel.add(getpageRngBtn(), gridBagConstraints12);
+        printRangePanel.add(getToTxt(), gridBagConstraints17);
+    }
+    return printRangePanel;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getCopiesPanel() {
+    if(copiesPanel==null) {
+        copiesPanel=new JPanel();
+        GridBagConstraints gridBagConstraints18=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints19=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints20=new GridBagConstraints();
+        copiesLabel=new JLabel();
+        copiesPanel.setLayout(new GridBagLayout());
+        copiesPanel.setBorder(BorderFactory.createTitledBorder(null, "Copies",                
+                TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        copiesPanel.setPreferredSize(new java.awt.Dimension(256, 110));
+        copiesLabel.setText("Number of copies:");
+        gridBagConstraints18.gridx=1;
+        gridBagConstraints18.gridy=0;
+        gridBagConstraints18.insets=new java.awt.Insets(9, 9, 9, 9);
+        gridBagConstraints18.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints19.gridx=4;
+        gridBagConstraints19.gridy=0;
+        gridBagConstraints19.weightx=1.0;
+        gridBagConstraints19.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints19.insets=new java.awt.Insets(9, 9, 9, 9);
+        gridBagConstraints19.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints19.gridwidth=2;
+        gridBagConstraints20.gridx=1;
+        gridBagConstraints20.gridy=1;
+        gridBagConstraints20.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints20.insets=new java.awt.Insets(9, 9, 9, 9);
+        copiesPanel.add(copiesLabel, gridBagConstraints18);
+        copiesPanel.add(getCopiesSpinner(), gridBagConstraints19);
+        copiesPanel.add(getCollateBox(), gridBagConstraints20);
+    }
+    return copiesPanel;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getallRngBtn() {
+    if(allRngBtn==null) {
+        allRngBtn=new JRadioButton();
+        allRngBtn.setText("All");
+        allRngBtn.setMnemonic('L');
+    }
+    return allRngBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getpageRngBtn() {
+    if(pageRngBtn==null) {
+        pageRngBtn=new JRadioButton();
+        pageRngBtn.setText("Pages");
+        pageRngBtn.setMnemonic('E');
+    }
+    return pageRngBtn;
+}
+
+/**
+ * This method initializes JTextField
+ * 
+ * @return javax.swing.JTextField
+ */
+private JFormattedTextField getFromTxt() {
+    if(fromTxt==null) {
+        fromTxt=new JFormattedTextField(getNumberFormatter());
+    }
+    return fromTxt;
+}
+
+/**
+ * This method initializes JTextField
+ * 
+ * @return javax.swing.JTextField
+ */
+private JFormattedTextField getToTxt() {
+    if(toTxt==null) {
+        toTxt=new JFormattedTextField(getNumberFormatter());
+    }
+    return toTxt;
+}
+
+/**
+ * This method initializes JTextField
+ * 
+ * @return javax.swing.JTextField
+ */
+private JSpinner getCopiesSpinner() {
+    if(cpSpinner==null) {
+        cpSpinner=new JSpinner();
+        copiesLabel.setLabelFor(cpSpinner);
+        copiesLabel.setDisplayedMnemonic('O');
+    }
+    return cpSpinner;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JCheckBox getCollateBox() {
+    if(collateBox==null) {
+        collateBox=new JCheckBox();
+        collateBox.setText("Collate");
+        collateBox.setMnemonic('T');
+    }
+    return collateBox;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getGeneralPanel() {
+    if(generalPanel==null) {
+        generalPanel=new JPanel();
+        generalPanel.setLayout(new FlowLayout());
+        generalPanel.setPreferredSize(new java.awt.Dimension(500, 500));
+        generalPanel.add(getNamePanel(), null);
+        generalPanel.add(getCopiesPanel(), null);
+        generalPanel.add(getPrintRangePanel(), null);
+    }
+    return generalPanel;
+}
+
+/**
+ * This method initializes jTabbedPane
+ * 
+ * @return javax.swing.JTabbedPane
+ */
+private JTabbedPane getTabbedPane() {
+    if(tabbedPane==null) {
+        tabbedPane=new JTabbedPane();
+        tabbedPane.setPreferredSize(new java.awt.Dimension(100, 100));
+        tabbedPane.addTab("General", null, getGeneralPanel(), null);
+        tabbedPane.addTab("Page Setup", null, getPageSetupPanel(), null);
+        tabbedPane.addTab("Appearance", null, getAppearancePanel(), null);
+        tabbedPane.setMnemonicAt(0, 'G');
+        tabbedPane.setMnemonicAt(1, 'S');
+        tabbedPane.setMnemonicAt(2, 'A');
+    }
+    return tabbedPane;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getPageSetupMediaPanel() {
+    if(pageSetupMediaPanel==null) {
+        pageSetupMediaPanel=new JPanel();
+        sourceLabel=new JLabel();
+        sizeLabel=new JLabel();
+        GridBagConstraints gridBagConstraints16=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints21=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints31=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints42=new GridBagConstraints();
+        pageSetupMediaPanel.setLayout(new GridBagLayout());
+        pageSetupMediaPanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Media", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        pageSetupMediaPanel.setPreferredSize(new Dimension(515, 120));
+        gridBagConstraints16.gridx=0;
+        gridBagConstraints16.gridy=0;
+        sizeLabel.setText("Size:");
+        gridBagConstraints21.gridx=1;
+        gridBagConstraints21.gridy=0;
+        gridBagConstraints21.weightx=1.0;
+        gridBagConstraints21.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints21.insets=new java.awt.Insets(9, 3, 9, 3);
+        gridBagConstraints16.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints31.gridx=0;
+        gridBagConstraints31.gridy=1;
+        sourceLabel.setText("Source:");
+        gridBagConstraints42.gridx=1;
+        gridBagConstraints42.gridy=1;
+        gridBagConstraints42.weightx=1.0;
+        gridBagConstraints42.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints42.insets=new java.awt.Insets(9, 3, 9, 3);
+        gridBagConstraints31.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints31.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints16.anchor=java.awt.GridBagConstraints.WEST;
+        pageSetupMediaPanel.add(sizeLabel, gridBagConstraints16);
+        pageSetupMediaPanel.add(getsizeBox(), gridBagConstraints21);
+        pageSetupMediaPanel.add(sourceLabel, gridBagConstraints31);
+        pageSetupMediaPanel.add(getsourceBox(), gridBagConstraints42);
+    }
+    return pageSetupMediaPanel;
+}
+
+/**
+ * This method initializes jComboBox
+ * 
+ * @return javax.swing.JComboBox
+ */
+private JComboBox getsizeBox() {
+    if(sizeBox==null) {
+        sizeBox=new JComboBox();
+        sizeBox.setPreferredSize(new java.awt.Dimension(270, 25));
+        sizeLabel.setLabelFor(sizeBox);
+        sizeLabel.setDisplayedMnemonic('Z');
+    }
+    return sizeBox;
+}
+
+/**
+ * This method initializes jComboBox1
+ * 
+ * @return javax.swing.JComboBox
+ */
+private JComboBox getsourceBox() {
+    if(sourceBox==null) {
+        sourceBox=new JComboBox();
+        sourceBox.setPreferredSize(new java.awt.Dimension(270, 25));
+    }
+    return sourceBox;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getOrientationPanel() {
+    if(orientationPanel==null) {
+        orientationPanel=new JPanel();
+        GridBagConstraints gridBagConstraints52=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints6=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints71=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints81=new GridBagConstraints();
+        orientationPanel.setLayout(new GridBagLayout());
+        orientationPanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Orientation", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        orientationPanel.setPreferredSize(new java.awt.Dimension(250, 170));
+        gridBagConstraints52.gridx=0;
+        gridBagConstraints52.gridy=0;
+        gridBagConstraints52.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints52.insets=new java.awt.Insets(5, 9, 5, 9);
+        gridBagConstraints6.gridx=0;
+        gridBagConstraints6.gridy=1;
+        gridBagConstraints6.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints6.insets=new java.awt.Insets(5, 9, 5, 9);
+        gridBagConstraints71.gridx=0;
+        gridBagConstraints71.gridy=2;
+        gridBagConstraints71.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints71.insets=new java.awt.Insets(5, 9, 5, 9);
+        gridBagConstraints81.gridx=0;
+        gridBagConstraints81.gridy=3;
+        gridBagConstraints81.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints81.insets=new java.awt.Insets(5, 9, 5, 9);
+        orientationPanel.add(getportraitBtn(), gridBagConstraints52);
+        orientationPanel.add(getlandscapeBtn(), gridBagConstraints6);
+        orientationPanel.add(getReverseportraitBtn(), gridBagConstraints71);
+        orientationPanel.add(getReverselandscapeBtn(), gridBagConstraints81);
+    }
+    return orientationPanel;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getportraitBtn() {
+    if(portraitBtn==null) {
+        portraitBtn=new JRadioButton();
+        portraitBtn.setText("Portrait");
+        portraitBtn.setMnemonic('O');
+    }
+    return portraitBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getlandscapeBtn() {
+    if(landscapeBtn==null) {
+        landscapeBtn=new JRadioButton();
+        landscapeBtn.setText("Landscape");
+        landscapeBtn.setMnemonic('L');
+    }
+    return landscapeBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getReverseportraitBtn() {
+    if(rvportraitBtn==null) {
+        rvportraitBtn=new JRadioButton();
+        rvportraitBtn.setText("Reverse Portrait");
+        rvportraitBtn.setMnemonic('E');
+    }
+    return rvportraitBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getReverselandscapeBtn() {
+    if(rvlandscapeBtn==null) {
+        rvlandscapeBtn=new JRadioButton();
+        rvlandscapeBtn.setText("Reverse Landscape");
+        rvlandscapeBtn.setMnemonic('N');
+    }
+    return rvlandscapeBtn;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getMarginsPanel() {
+    if(marginsPanel==null) {
+        marginsPanel=new JPanel();
+        bottomLabel=new JLabel();
+        topLabel=new JLabel();
+        rightLabel=new JLabel();
+        GridBagConstraints gridBagConstraints91=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints101=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints111=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints121=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints131=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints141=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints151=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints161=new GridBagConstraints();
+        leftLabel=new JLabel();
+        marginsPanel.setLayout(new GridBagLayout());
+        marginsPanel.setPreferredSize(new java.awt.Dimension(250, 170));
+        marginsPanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Margins", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        leftLabel.setText("Left (mm)");
+        rightLabel.setText("Right (mm)");
+        gridBagConstraints111.gridx=2;
+        gridBagConstraints111.gridy=1;
+        gridBagConstraints111.weightx=1.0;
+        gridBagConstraints111.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints121.gridx=0;
+        gridBagConstraints121.gridy=1;
+        gridBagConstraints121.weightx=1.0;
+        gridBagConstraints121.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints131.gridx=0;
+        gridBagConstraints131.gridy=5;
+        gridBagConstraints131.weightx=1.0;
+        gridBagConstraints131.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints141.gridx=0;
+        gridBagConstraints141.gridy=4;
+        topLabel.setText("Top (mm)");
+        gridBagConstraints151.gridx=2;
+        gridBagConstraints151.gridy=4;
+        bottomLabel.setText("Bottom (mm)");
+        gridBagConstraints161.gridx=2;
+        gridBagConstraints161.gridy=5;
+        gridBagConstraints161.weightx=1.0;
+        gridBagConstraints161.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints161.insets=new java.awt.Insets(7, 9, 7, 9);
+        gridBagConstraints121.insets=new java.awt.Insets(7, 9, 7, 9);
+        gridBagConstraints141.insets=new java.awt.Insets(9, 9, 0, 9);
+        gridBagConstraints131.insets=new java.awt.Insets(7, 9, 7, 9);
+        gridBagConstraints151.insets=new java.awt.Insets(9, 9, 0, 9);
+        gridBagConstraints111.insets=new java.awt.Insets(7, 9, 7, 9);
+        marginsPanel.add(leftLabel, gridBagConstraints91);
+        marginsPanel.add(rightLabel, gridBagConstraints101);
+        marginsPanel.add(getRightTxt(), gridBagConstraints111);
+        marginsPanel.add(getLeftTxt(), gridBagConstraints121);
+        marginsPanel.add(getTopTxt(), gridBagConstraints131);
+        marginsPanel.add(bottomLabel, gridBagConstraints151);
+        marginsPanel.add(getBottomTxt(), gridBagConstraints161);
+        marginsPanel.add(topLabel, gridBagConstraints141);
+        gridBagConstraints91.gridx=0;
+        gridBagConstraints91.gridy=0;
+        gridBagConstraints91.insets=new java.awt.Insets(9, 9, 0, 9);
+        gridBagConstraints101.gridx=2;
+        gridBagConstraints101.gridy=0;
+        gridBagConstraints101.insets=new java.awt.Insets(9, 9, 0, 9);
+    }
+    return marginsPanel;
+}
+
+/**
+ * This method initializes JTextField
+ * 
+ * @return javax.swing.JTextField
+ */
+private JFormattedTextField getRightTxt() {
+    if(rightTxt==null) {
+        rightTxt=new JFormattedTextField(getFloatFormatter());
+        rightLabel.setLabelFor(rightTxt);
+        rightLabel.setDisplayedMnemonic('R');
+    }
+    return rightTxt;
+}
+
+/**
+ * This method initializes JTextField1
+ * 
+ * @return javax.swing.JTextField
+ */
+private JFormattedTextField getLeftTxt() {
+    if(leftTxt==null) {
+        leftTxt=new JFormattedTextField(getFloatFormatter());
+        leftLabel.setLabelFor(leftTxt);
+        leftLabel.setDisplayedMnemonic('F');
+    }
+    return leftTxt;
+}
+
+/**
+ * This method initializes JTextField1
+ * 
+ * @return javax.swing.JTextField
+ */
+private JFormattedTextField getTopTxt() {
+    if(topTxt==null) {
+        topTxt=new JFormattedTextField(getFloatFormatter());
+        topLabel.setLabelFor(topTxt);
+        topLabel.setDisplayedMnemonic('T');        
+    }
+    return topTxt;
+}
+
+/**
+ * This method initializes JTextField1
+ * 
+ * @return javax.swing.JTextField
+ */
+private JFormattedTextField getBottomTxt() {
+    if(bottomTxt==null) {
+        bottomTxt=new JFormattedTextField(getFloatFormatter());
+        bottomLabel.setLabelFor(bottomTxt);
+        bottomLabel.setDisplayedMnemonic('B');
+    }
+    return bottomTxt;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+JPanel getPageSetupPanel() {
+    if(pageSetupPanel==null) {
+        GridBagConstraints gridBagConstraints22=new GridBagConstraints();
+        pageSetupPanel=new JPanel();
+        GridBagConstraints gridBagConstraints191=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints23=new GridBagConstraints();
+        pageSetupPanel.setLayout(new GridBagLayout());
+        pageSetupPanel.setPreferredSize(new java.awt.Dimension(1047, 190));
+        gridBagConstraints191.gridx=0;
+        gridBagConstraints191.gridy=1;
+        gridBagConstraints191.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints191.insets=new java.awt.Insets(5, 5, 5, 5);
+        gridBagConstraints23.gridx=1;
+        gridBagConstraints23.gridy=1;
+        gridBagConstraints23.insets=new java.awt.Insets(5, 5, 5, 5);
+        gridBagConstraints23.anchor=java.awt.GridBagConstraints.EAST;
+        gridBagConstraints22.gridx=0;
+        gridBagConstraints22.gridy=0;
+        gridBagConstraints22.gridwidth=3;
+        gridBagConstraints22.anchor=java.awt.GridBagConstraints.CENTER;
+        gridBagConstraints22.insets=new java.awt.Insets(5, 0, 5, 0);
+        pageSetupPanel.add(getOrientationPanel(), gridBagConstraints191);
+        pageSetupPanel.add(getMarginsPanel(), gridBagConstraints23);
+        pageSetupPanel.add(getPageSetupMediaPanel(), gridBagConstraints22);
+    }
+    return pageSetupPanel;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getColorPanel() {
+    if(colorPanel==null) {
+        colorPanel=new JPanel();
+        GridBagConstraints gridBagConstraints32=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints43=new GridBagConstraints();
+        colorPanel.setLayout(new GridBagLayout());
+        colorPanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Color Appearance", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        colorPanel.setPreferredSize(new java.awt.Dimension(185, 144));
+        gridBagConstraints32.gridx=0;
+        gridBagConstraints32.gridy=0;
+        gridBagConstraints32.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints32.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints43.gridx=0;
+        gridBagConstraints43.gridy=1;
+        gridBagConstraints43.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints43.insets=new java.awt.Insets(9, 7, 9, 7);
+        colorPanel.add(getmonoBtn(), gridBagConstraints32);
+        colorPanel.add(getcolorBtn(), gridBagConstraints43);
+    }
+    return colorPanel;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getmonoBtn() {
+    if(monoBtn==null) {
+        monoBtn=new JRadioButton();
+        monoBtn.setText("Monochrome");
+        monoBtn.setMnemonic('M');
+    }
+    return monoBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getcolorBtn() {
+    if(colorBtn==null) {
+        colorBtn=new JRadioButton();
+        colorBtn.setText("Color");
+        colorBtn.setMnemonic('L');
+    }
+    return colorBtn;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getQualityPanel() {
+    if(qualityPanel==null) {
+        qualityPanel=new JPanel();
+        GridBagConstraints gridBagConstraints61=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints72=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints82=new GridBagConstraints();
+        qualityPanel.setLayout(new GridBagLayout());
+        qualityPanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Quality", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        qualityPanel.setPreferredSize(new java.awt.Dimension(310, 144));
+        gridBagConstraints61.gridx=1;
+        gridBagConstraints61.gridy=0;
+        gridBagConstraints61.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints61.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints72.gridx=1;
+        gridBagConstraints72.gridy=1;
+        gridBagConstraints72.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints72.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints82.gridx=1;
+        gridBagConstraints82.gridy=2;
+        gridBagConstraints82.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints82.insets=new java.awt.Insets(9, 0, 9, 0);
+        qualityPanel.add(getdraftBtn(), gridBagConstraints61);
+        qualityPanel.add(getnormalBtn(), gridBagConstraints72);
+        qualityPanel.add(gethighBtn(), gridBagConstraints82);
+    }
+    return qualityPanel;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getdraftBtn() {
+    if(draftBtn==null) {
+        draftBtn=new JRadioButton();
+        draftBtn.setText("Draft");
+        draftBtn.setMnemonic('F');
+    }
+    return draftBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getnormalBtn() {
+    if(normalBtn==null) {
+        normalBtn=new JRadioButton();
+        normalBtn.setText("Normal");
+        normalBtn.setMnemonic('N');
+    }
+    return normalBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton gethighBtn() {
+    if(highBtn==null) {
+        highBtn=new JRadioButton();
+        highBtn.setText("Hight");
+        highBtn.setMnemonic('H');
+    }
+    return highBtn;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getSidesPanel() {
+    if(sidesPanel==null) {
+        sidesPanel=new JPanel();
+        GridBagConstraints gridBagConstraints102=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints112=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints122=new GridBagConstraints();
+        sidesPanel.setLayout(new GridBagLayout());
+        sidesPanel.setBorder(BorderFactory.createTitledBorder(null, "Sides",
+                TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        sidesPanel.setPreferredSize(new java.awt.Dimension(185, 144));
+        gridBagConstraints102.gridx=1;
+        gridBagConstraints102.gridy=0;
+        gridBagConstraints102.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints102.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints112.gridx=1;
+        gridBagConstraints112.gridy=1;
+        gridBagConstraints112.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints112.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints122.gridx=1;
+        gridBagConstraints122.gridy=2;
+        gridBagConstraints122.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints122.insets=new java.awt.Insets(9, 0, 9, 0);
+        sidesPanel.add(getoneSideBtn(), gridBagConstraints102);
+        sidesPanel.add(gettumbleBtn(), gridBagConstraints112);
+        sidesPanel.add(getduplexBtn(), gridBagConstraints122);
+    }
+    return sidesPanel;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getoneSideBtn() {
+    if(oneSideBtn==null) {
+        oneSideBtn=new JRadioButton();
+        oneSideBtn.setText("One Side");
+        oneSideBtn.setMnemonic('O');
+    }
+    return oneSideBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton gettumbleBtn() {
+    if(tumbleBtn==null) {
+        tumbleBtn=new JRadioButton();
+        tumbleBtn.setText("Tumble");
+        tumbleBtn.setMnemonic('T');
+    }
+    return tumbleBtn;
+}
+
+/**
+ * This method initializes jRadioButton
+ * 
+ * @return javax.swing.JRadioButton
+ */
+private JRadioButton getduplexBtn() {
+    if(duplexBtn==null) {
+        duplexBtn=new JRadioButton();
+        duplexBtn.setText("Duplex");
+        duplexBtn.setMnemonic('D');
+    }
+    return duplexBtn;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getJobAttributesPanel() {
+    if(jobAttributesPanel==null) {
+        jobAttributesPanel=new JPanel();
+        userNameLabel=new JLabel();
+        jobNameLabel=new JLabel();
+        priorityLabel=new JLabel();
+        GridBagConstraints gridBagConstraints132=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints142=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints152=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints162=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints171=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints181=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints192=new GridBagConstraints();
+        jobAttributesPanel.setLayout(new GridBagLayout());
+        jobAttributesPanel.setBorder(BorderFactory.createTitledBorder(null,
+                "Job Attributes", TitledBorder.DEFAULT_JUSTIFICATION,
+                TitledBorder.DEFAULT_POSITION, null, null));
+        jobAttributesPanel.setPreferredSize(new Dimension(310, 144));
+        gridBagConstraints132.gridx=0;
+        gridBagConstraints132.gridy=0;
+        gridBagConstraints142.gridx=1;
+        gridBagConstraints142.gridy=0;
+        priorityLabel.setText("Priority");
+        gridBagConstraints152.gridx=2;
+        gridBagConstraints152.gridy=0;
+        gridBagConstraints152.weightx=1.0;
+        gridBagConstraints152.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints162.gridx=1;
+        gridBagConstraints162.gridy=1;
+        gridBagConstraints162.weightx=1.0;
+        gridBagConstraints162.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints171.gridx=0;
+        gridBagConstraints171.gridy=1;
+        jobNameLabel.setText("Job Name:");
+        gridBagConstraints181.gridx=0;
+        gridBagConstraints181.gridy=2;
+        userNameLabel.setText("User Name:");
+        gridBagConstraints192.gridx=1;
+        gridBagConstraints192.gridy=2;
+        gridBagConstraints192.weightx=1.0;
+        gridBagConstraints192.fill=java.awt.GridBagConstraints.HORIZONTAL;
+        gridBagConstraints192.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints192.gridwidth=2;
+        gridBagConstraints132.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints171.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints171.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints181.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints181.anchor=java.awt.GridBagConstraints.WEST;
+        gridBagConstraints142.insets=new java.awt.Insets(9, 7, 9, 7);
+        gridBagConstraints152.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints162.insets=new java.awt.Insets(9, 0, 9, 0);
+        gridBagConstraints162.gridwidth=2;
+        jobAttributesPanel.add(getBannerBox(), gridBagConstraints132);
+        jobAttributesPanel.add(priorityLabel, gridBagConstraints142);
+        jobAttributesPanel.add(getprtSpinner(), gridBagConstraints152);
+        jobAttributesPanel.add(getJobNameTxt(), gridBagConstraints162);
+        jobAttributesPanel.add(jobNameLabel, gridBagConstraints171);
+        jobAttributesPanel.add(userNameLabel, gridBagConstraints181);
+        jobAttributesPanel.add(getUserNameTxt(), gridBagConstraints192);
+    }
+    return jobAttributesPanel;
+}
+
+/**
+ * This method initializes jCheckBox
+ * 
+ * @return javax.swing.JCheckBox
+ */
+private JCheckBox getBannerBox() {
+    if(bannerBox==null) {
+        bannerBox=new JCheckBox();
+        bannerBox.setText("Banner Page");
+        bannerBox.setMnemonic('B');
+    }
+    return bannerBox;
+}
+
+/**
+ * This method initializes JTextField1
+ * 
+ * @return javax.swing.JTextField
+ */
+private JSpinner getprtSpinner() {
+    if(prtSpinner==null) {
+        prtSpinner=new JSpinner();
+        priorityLabel.setLabelFor(prtSpinner);
+        priorityLabel.setDisplayedMnemonic('R');        
+    }
+    return prtSpinner;
+}
+
+/**
+ * This method initializes JTextField1
+ * 
+ * @return javax.swing.JTextField
+ */
+private JTextField getJobNameTxt() {
+    if(jobNameTxt==null) {
+        jobNameTxt=new JTextField();
+        jobNameTxt.setText("");
+        jobNameLabel.setLabelFor(jobNameTxt);
+        jobNameLabel.setDisplayedMnemonic('J');
+    }
+    return jobNameTxt;
+}
+
+/**
+ * This method initializes JTextField1
+ * 
+ * @return javax.swing.JTextField
+ */
+private JTextField getUserNameTxt() {
+    if(userNameTxt==null) {
+        userNameTxt=new JTextField();
+        userNameLabel.setLabelFor(userNameTxt);
+        userNameLabel.setDisplayedMnemonic('U');
+    }
+    return userNameTxt;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getAppearancePanel() {
+    if(appearancePanel==null) {
+        appearancePanel=new JPanel();
+        GridBagConstraints gridBagConstraints110=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints24=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints33=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints44=new GridBagConstraints();
+        appearancePanel.setLayout(new GridBagLayout());
+        gridBagConstraints110.gridx=0;
+        gridBagConstraints110.gridy=0;
+        gridBagConstraints110.insets=new java.awt.Insets(5, 5, 5, 5);
+        gridBagConstraints24.gridx=1;
+        gridBagConstraints24.gridy=0;
+        gridBagConstraints24.insets=new java.awt.Insets(5, 5, 5, 5);
+        gridBagConstraints33.gridx=0;
+        gridBagConstraints33.gridy=1;
+        gridBagConstraints33.insets=new java.awt.Insets(5, 5, 5, 5);
+        gridBagConstraints44.gridx=1;
+        gridBagConstraints44.gridy=1;
+        gridBagConstraints44.insets=new java.awt.Insets(5, 5, 5, 5);
+        appearancePanel.add(getColorPanel(), gridBagConstraints110);
+        appearancePanel.add(getQualityPanel(), gridBagConstraints24);
+        appearancePanel.add(getSidesPanel(), gridBagConstraints33);
+        appearancePanel.add(getJobAttributesPanel(), gridBagConstraints44);
+    }
+    return appearancePanel;
+}
+
+/**
+ * This method initializes jButton
+ * 
+ * @return javax.swing.JButton
+ */
+private JButton getprintBtn() {
+    if(printBtn==null) {
+        printBtn=new JButton();
+        printBtn.setText("Print");
+        printBtn.setMnemonic('P');
+    }
+    return printBtn;
+}
+
+/**
+ * This method initializes jButton
+ * 
+ * @return javax.swing.JButton
+ */
+private JButton getcancelBtn() {
+    if(cancelBtn==null) {
+        cancelBtn=new JButton();
+        cancelBtn.setText("Cancel");
+        cancelBtn.setMnemonic('C');
+    }
+    return cancelBtn;
+}
+
+/**
+ * This method initializes jDialog
+ * 
+ * @return javax.swing.JDialog
+ */
+private JDialog getPrintDialog() {
+    if(printDialog==null) {
+        printDialog=new JDialog();
+        printDialog.setSize(542, 444);
+        printDialog.setName("dialog");
+        printDialog.setTitle("Print");
+        printDialog.setContentPane(getDialogPanel());
+    }
+    return printDialog;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+private JPanel getDialogPanel() {
+    if(dialogPanel==null) {
+        GridBagConstraints gridBagConstraints182=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints172=new GridBagConstraints();
+        dialogPanel=new JPanel();
+        dialogPanel.setLayout(new GridBagLayout());
+        dialogPanel.setPreferredSize(new java.awt.Dimension(100, 100));
+        dialogPanel.setSize(532, 389);
+        gridBagConstraints172.gridx=0;
+        gridBagConstraints172.gridy=1;
+        gridBagConstraints172.anchor=java.awt.GridBagConstraints.EAST;
+        gridBagConstraints172.gridwidth=3;
+        gridBagConstraints182.gridx=0;
+        gridBagConstraints182.gridy=0;
+        gridBagConstraints182.weightx=1.0;
+        gridBagConstraints182.weighty=1.0;
+        gridBagConstraints182.fill=java.awt.GridBagConstraints.BOTH;
+        dialogPanel.add(getButtonsPanel(), gridBagConstraints172);
+        dialogPanel.add(getTabbedPane(), gridBagConstraints182);
+    }
+    return dialogPanel;
+}
+
+/**
+ * This method initializes jPanel
+ * 
+ * @return javax.swing.JPanel
+ */
+JPanel getButtonsPanel() {
+    if(buttonsPanel==null) {
+        buttonsPanel=new JPanel();
+        GridBagConstraints gridBagConstraints143=new GridBagConstraints();
+        GridBagConstraints gridBagConstraints153=new GridBagConstraints();
+        buttonsPanel.setLayout(new GridBagLayout());
+        gridBagConstraints143.gridx=2;
+        gridBagConstraints143.gridy=0;
+        gridBagConstraints143.anchor=java.awt.GridBagConstraints.EAST;
+        gridBagConstraints143.insets=new java.awt.Insets(7, 7, 7, 15);
+        gridBagConstraints153.gridx=1;
+        gridBagConstraints153.gridy=0;
+        gridBagConstraints153.anchor=java.awt.GridBagConstraints.EAST;
+        gridBagConstraints153.insets=new java.awt.Insets(7, 7, 7, 0);
+        buttonsPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
+        buttonsPanel.setPreferredSize(new java.awt.Dimension(170, 40));
+        buttonsPanel.add(getcancelBtn(), gridBagConstraints143);
+        buttonsPanel.add(getprintBtn(), gridBagConstraints153);
+    }
+    return buttonsPanel;
+}
+
+private JPanel getVendorSuppliedPanel() {
+    if (vendorSuppliedPanel == null) {
+        vendorSuppliedPanel = new JPanel();
+    }
+    return vendorSuppliedPanel;
+}
+
+JPanel getPanel() {
+    return getDialogPanel();
+}
+
+} /* End of ServiceUIDialogTemplate class */

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/ServiceUIDialogTemplate.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java Sun Oct  8 22:33:09 2006
@@ -0,0 +1,298 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Irina A. Arkhipets 
+ * @version $Revision: 1.4 $ 
+ */ 
+
+/*
+ * MediaMargins.java
+ * 
+ * We launch additional printing attribute:
+ *     org.apache.harmony.x.print.attributes.MediaMargins. 
+ * 
+ * This is a printing attribute used to set paper margins for the printed 
+ * document. The MediaMargins is specified to be left, right, top and bottom 
+ * paper margins. It is independent of a particular media. Sometimes it is 
+ * more convenient for a client to use margins instead of printable area.
+ * 
+ * This attribute can be easy calculated if we have MediaSize and 
+ * MediaPrintableArea attributes for the printed document, so in this case we 
+ * do not need to set it clearly. However, it can be very helpful if we do not
+ * know size of the printed document's Media size (for example, if Media 
+ * attribute will be set later or it is MediaTray attribute) - we can not use 
+ * MediaPrintableArea in this case. 
+ * 
+ * It is supposed that our default printers will support MediaMargins  
+ * attribute. 
+ * 
+ * In case of the conflict between MediaPrintableArea and MediaMargins 
+ * attribute the following way of conflict resolving is supposed:
+ * 
+ * - if MediaSize, MediaPrintableArea and MediaMargins attributes are present,
+ *   MediaPrintableArea should be used to calculate paper margins;
+ * 
+ * - if Media attribute is not defined or it is defined, but we are unable to 
+ *   get paper size using it, MediaMargins attribute should be used and 
+ *   MediaPrintableArea should be ignored.
+ *
+ * Like MediaPrintableArea attribute, MediaMargins values are storet internally
+ * as integers in units of micrometers (please, see 
+ * javax.print.attribute.standard.MediaPrintableArea class API Specification
+ * for more details).
+ */
+
+package org.apache.harmony.x.print.attributes;
+
+import javax.print.attribute.DocAttribute;
+import javax.print.attribute.PrintJobAttribute;
+import javax.print.attribute.PrintRequestAttribute;
+import javax.print.attribute.Size2DSyntax;
+import javax.print.attribute.standard.MediaPrintableArea;
+import javax.print.attribute.standard.MediaSize;
+
+public final class MediaMargins 
+        implements DocAttribute,
+                   PrintJobAttribute,
+                   PrintRequestAttribute
+{
+
+public static final int INCH = Size2DSyntax.INCH;   // 25 400
+public static final int MM = Size2DSyntax.MM;       //  1 000
+private int x1;     // left margin
+private int x2;     // right margin
+private int y1;     // top margin
+private int y2;     // bottom margin
+private int units;  // original units
+
+/*
+ * Constructs a MediaMargins object from integer values.
+ * 
+ * Parameters:
+ *      x1 - left margin
+ *      y1 - top margin
+ *      x2 - right margin
+ *      y2 - bottom margin
+ *      units - units in which the values are expressed
+ * 
+ * Throws IllegalArgumentException if margins value are < 0
+ * or units < 1 
+ */
+public MediaMargins(int xx1, int yy1, int xx2, int yy2, int myunits) {
+    if ((xx1 < 0) || (yy1 < 0) || (xx2 < 0) || (yy2 < 0) || (myunits < 1)) {
+        throw new IllegalArgumentException("Incorrect margins!");
+    }
+    x1 = xx1 * myunits;
+    y1 = yy1 * myunits;
+    x2 = xx2 * myunits;
+    y2 = yy2 * myunits;
+    units = myunits;
+}
+
+/*
+ * Constructs a MediaMargins object from float values.
+ * 
+ * Parameters:
+ *      x1 - left margin
+ *      y1 - top margin
+ *      x2 - right margin
+ *      y2 - bottom margin
+ *      units - units in which the values are expressed
+ * 
+ * Throws IllegalArgumentException if margins value are < 0
+ * or units < 1 
+ */
+public MediaMargins(float xx1, float yy1, float xx2, float yy2, int myunits) {
+    if ((xx1 < 0) || (yy1 < 0) || (xx2 < 0) || (yy2 < 0) || (myunits < 1)) {
+        throw new IllegalArgumentException("Incorrect margins!");
+    }
+    x1 = Math.round(xx1 * myunits);
+    y1 = Math.round(yy1 * myunits);
+    x2 = Math.round(xx2 * myunits);
+    y2 = Math.round(yy2 * myunits);
+    units = myunits;
+}
+
+/*
+ * Constructs a MediaMargins object from MediaSize and MediaPrintableArea.
+ * 
+ * Parameters:
+ *      size - MediaSize attribute
+ *      area - MediaPrintableArea attribute
+ * 
+ * Throws IllegalArgumentException if size is null or area is null or 
+ * if given MediaPrintableArea is too big for the given MediaSize.
+ */
+
+public MediaMargins(MediaSize size, MediaPrintableArea area) {
+    if ((size == null) || (area == null)) {
+        throw new IllegalArgumentException("Incorrect margins!");
+    }
+    this.x1 = Math.round(area.getX(MM) * MM);
+    this.x2 = Math.round((size.getX(MM) - area.getX(MM) - area.getWidth(MM)) 
+            * MM);
+    this.y1 = Math.round(area.getY(MM) * MM);
+    this.y2 = Math.round((size.getY(MM) - area.getY(MM) - area.getHeight(MM))
+            * MM);
+    if ((x1 < 0) || (y1 < 0) || (x2 < 0) || (y2 < 0)) {
+        throw new IllegalArgumentException("Incorrect margins!");
+    }
+}
+
+/*
+ * Returns whether this margins attribute is equal to the passed object.
+ * The following conditions must be true:
+ *      - objectis not null;
+ *      - object is an instance of MediaMargins class
+ *      - The margins values are the same
+ */
+public boolean equals(Object object) {
+    if (object instanceof MediaMargins) {
+        MediaMargins m = (MediaMargins) object;
+        return (x1 == m.x1) && (y1 == m.y1) && (x2 == m.x2) && (y2 == m.y2);
+    } 
+    return false;
+}
+
+/*
+ * Returns the printing category attribute class 
+ * (an instance of java.lang.Class class).
+ * For the MediaMargins the category class is MediaMargins class itself.
+ */
+public final Class getCategory() {
+    return MediaMargins.class;
+}
+
+/*
+ * Returns the attribute category name - "media-margins"
+ */
+public final String getName() {
+    return "media-margins";
+}
+
+/*
+ * Returns the left margin value in the specified units.
+ * 
+ * Throws IllegalArgumentException if units < 1.
+ */
+public float getX1(int myunits) {
+    if (myunits < 1) {
+        throw new IllegalArgumentException("units is less than 1");
+    }
+    return ((float) x1) / myunits;
+}
+
+/*
+ * Returns the top margin value in the specified units.
+ * 
+ * Throws IllegalArgumentException if units < 1.
+ */
+public float getY1(int myunits) {
+    if (myunits < 1) {
+        throw new IllegalArgumentException("units is less than 1");
+    }
+    return ((float) y1) / myunits;
+}
+
+/*
+ * Returns the right margin value in the specified units.
+ * 
+ * Throws IllegalArgumentException if units < 1.
+ */
+public float getX2(int myunits) {
+    if (myunits < 1) {
+        throw new IllegalArgumentException("units is less than 1");
+    }
+    return ((float) x2) / myunits;
+}
+
+/*
+ * Returns the bottom margin value in the specified units.
+ * 
+ * Throws IllegalArgumentException if units < 1.
+ */
+public float getY2(int myunits) {
+    if (myunits < 1) {
+        throw new IllegalArgumentException("units is less than 1");
+    }
+    return ((float) y2) / myunits;
+}
+
+/*
+ * Returns the margins value as an array of 4 float values in the order 
+ * left, top, right, bottom in given units.
+ * 
+ * Throws IllegalArgumentException if units < 1.
+ */
+public float[] getMargins(int myunits) {
+    return new float [] { getX1(myunits), 
+                          getY1(myunits),
+                          getX2(myunits),
+                          getY2(myunits) };
+}
+
+/*
+ * Returns a hash code value for the attribute
+ */
+public int hashCode() {
+    return ((x1 + x2) | ((y1 + y2) << 16));
+}
+
+/*
+ * Returns a string version of this margins attribute in mm
+ */
+public String toString() {
+    return toString(MM, "mm");
+}
+
+/*
+ * Returns a string version of this margins attribute in the given units.
+ * 
+ * Parameters:
+ *      units - units conversion factor (for example, INCH or MM)
+ *      unitsName - units name string. If null, no units name is appended to
+ *                  the result string.
+ * 
+ * Throws IllegalArgumentException if units < 1.
+ */
+public String toString(int myunits, String unitsName) {
+    StringBuffer s = new StringBuffer();
+    s.append("x1=");
+    s.append(getX1(myunits));
+    s.append(" y1=");
+    s.append(getY1(myunits));
+    s.append(" x2=");
+    s.append(getX2(myunits));
+    s.append(" y2=");
+    s.append(getY2(myunits));
+    s.append(" "); 
+    s.append((unitsName == null) ? "" : unitsName);    
+    return s.toString();
+}
+
+/*
+ * Calculate MediaPrintableArea attribute for tis margins and the given 
+ * MediaSize object.
+ */
+public MediaPrintableArea getMediaPrintableArea(MediaSize size) {
+    return new MediaPrintableArea(getX1(MM), 
+                                  getY1(MM),
+                                  size.getX(MM) - getX1(MM) - getX2(MM),
+                                  size.getY(MM) - getY1(MM) - getY2(MM),
+                                  MM);
+}
+
+} /* End of MediaMargins */

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/MediaMargins.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/PPDMediaSizeName.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/PPDMediaSizeName.java?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/PPDMediaSizeName.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/PPDMediaSizeName.java Sun Oct  8 22:33:09 2006
@@ -0,0 +1,553 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Igor A. Pyankov 
+ * @version $Revision: 1.2 $ 
+ */ 
+
+package org.apache.harmony.x.print.attributes;
+
+import javax.print.attribute.EnumSyntax;
+import javax.print.attribute.Size2DSyntax;
+import javax.print.attribute.standard.MediaSize;
+import javax.print.attribute.standard.MediaSizeName;
+
+/*
+ * The PPDMediaSizeName attribute is intended for supporting papers
+ * returned by CUPS print servers.
+ * 
+ * Usually, when CUPS servers return list of supported papers, the names
+ * of media are from PostScript Printer Description File Format Specification,
+ * see http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf
+ * 
+ * These media names are not part of Java 2 Platform, Standard Edition, API
+ * Specification. Therefore, we are decided to add this attribute type to printing
+ * API.
+ * 
+ * The class PPDMediaSizeName extends MediaSizeName class and has same
+ * functionality.
+ * 
+ */
+public class PPDMediaSizeName extends MediaSizeName {
+    public static final PPDMediaSizeName s10x11 = new PPDMediaSizeName(0, 720, 792);
+    public static final PPDMediaSizeName s10x13 = new PPDMediaSizeName(1, 720, 936);
+    public static final PPDMediaSizeName s10x14 = new PPDMediaSizeName(2, 720, 1008);
+    public static final PPDMediaSizeName s12x11 = new PPDMediaSizeName(3, 864, 792);
+    public static final PPDMediaSizeName s15x11 = new PPDMediaSizeName(4, 1080, 792);
+    public static final PPDMediaSizeName s7x9 = new PPDMediaSizeName(5, 504, 648);
+    public static final PPDMediaSizeName s8x10 = new PPDMediaSizeName(6, 576, 720);
+    public static final PPDMediaSizeName s9x11 = new PPDMediaSizeName(7, 648, 792);
+    public static final PPDMediaSizeName s9x12 = new PPDMediaSizeName(8, 648, 864);
+    public static final PPDMediaSizeName A0 = new PPDMediaSizeName(9, 2384, 3370);
+    public static final PPDMediaSizeName A1 = new PPDMediaSizeName(10, 1684, 2384);
+    public static final PPDMediaSizeName A2 = new PPDMediaSizeName(11, 1191, 1684);
+    public static final PPDMediaSizeName A3 = new PPDMediaSizeName(12, 842, 1191);
+    public static final PPDMediaSizeName A3_Transverse = new PPDMediaSizeName(13, 842, 1191);
+    public static final PPDMediaSizeName A3Extra = new PPDMediaSizeName(14, 913, 1262);
+    public static final PPDMediaSizeName A3Extra_Transverse = new PPDMediaSizeName(15, 913, 1262);
+    public static final PPDMediaSizeName A3Rotated = new PPDMediaSizeName(16, 1191, 842);
+    public static final PPDMediaSizeName A4 = new PPDMediaSizeName(17, 595, 842);
+    public static final PPDMediaSizeName A4_Transverse = new PPDMediaSizeName(18, 595, 842);
+    public static final PPDMediaSizeName A4Extra = new PPDMediaSizeName(19, 667, 914);
+    public static final PPDMediaSizeName A4Plus = new PPDMediaSizeName(20, 595, 936);
+    public static final PPDMediaSizeName A4Rotated = new PPDMediaSizeName(21, 842, 595);
+    public static final PPDMediaSizeName A4Small = new PPDMediaSizeName(22, 595, 842);
+    public static final PPDMediaSizeName A5 = new PPDMediaSizeName(23, 420, 595);
+    public static final PPDMediaSizeName A5_Transverse = new PPDMediaSizeName(24, 420, 595);
+    public static final PPDMediaSizeName A5Extra = new PPDMediaSizeName(25, 492, 668);
+    public static final PPDMediaSizeName A5Rotated = new PPDMediaSizeName(26, 595, 420);
+    public static final PPDMediaSizeName A6 = new PPDMediaSizeName(27, 297, 420);
+    public static final PPDMediaSizeName A6Rotated = new PPDMediaSizeName(28, 420, 297);
+    public static final PPDMediaSizeName A7 = new PPDMediaSizeName(29, 210, 297);
+    public static final PPDMediaSizeName A8 = new PPDMediaSizeName(30, 148, 210);
+    public static final PPDMediaSizeName A9 = new PPDMediaSizeName(31, 105, 148);
+    public static final PPDMediaSizeName A10 = new PPDMediaSizeName(32, 73, 105);
+    public static final PPDMediaSizeName AnsiC = new PPDMediaSizeName(33, 1224, 1584);
+    public static final PPDMediaSizeName AnsiD = new PPDMediaSizeName(34, 1584, 2448);
+    public static final PPDMediaSizeName AnsiE = new PPDMediaSizeName(35, 2448, 3168);
+    public static final PPDMediaSizeName ARCHA = new PPDMediaSizeName(36, 648, 864);
+    public static final PPDMediaSizeName ARCHB = new PPDMediaSizeName(37, 864, 1296);
+    public static final PPDMediaSizeName ARCHC = new PPDMediaSizeName(38, 1296, 1728);
+    public static final PPDMediaSizeName ARCHD = new PPDMediaSizeName(39, 1728, 2592);
+    public static final PPDMediaSizeName ARCHE = new PPDMediaSizeName(40, 2592, 3456);
+    public static final PPDMediaSizeName B0 = new PPDMediaSizeName(41, 2920, 4127);
+    public static final PPDMediaSizeName B1 = new PPDMediaSizeName(42, 2064, 2920);
+    public static final PPDMediaSizeName B2 = new PPDMediaSizeName(43, 1460, 2064);
+    public static final PPDMediaSizeName B3 = new PPDMediaSizeName(44, 1032, 1460);
+    public static final PPDMediaSizeName B4 = new PPDMediaSizeName(45, 729, 1032);
+    public static final PPDMediaSizeName B4Rotated = new PPDMediaSizeName(46, 1032, 729);
+    public static final PPDMediaSizeName B5 = new PPDMediaSizeName(47, 516, 729);
+    public static final PPDMediaSizeName B5_Transverse = new PPDMediaSizeName(48, 516, 729);
+    public static final PPDMediaSizeName B5Rotated = new PPDMediaSizeName(49, 729, 516);
+    public static final PPDMediaSizeName B6 = new PPDMediaSizeName(50, 363, 516);
+    public static final PPDMediaSizeName B6Rotated = new PPDMediaSizeName(51, 516, 363);
+    public static final PPDMediaSizeName B7 = new PPDMediaSizeName(52, 258, 363);
+    public static final PPDMediaSizeName B8 = new PPDMediaSizeName(53, 181, 258);
+    public static final PPDMediaSizeName B9 = new PPDMediaSizeName(54, 127, 181);
+    public static final PPDMediaSizeName B10 = new PPDMediaSizeName(55, 91, 127);
+    public static final PPDMediaSizeName C4 = new PPDMediaSizeName(56, 649, 918);
+    public static final PPDMediaSizeName C5 = new PPDMediaSizeName(57, 459, 649);
+    public static final PPDMediaSizeName C6 = new PPDMediaSizeName(58, 323, 459);
+    public static final PPDMediaSizeName Comm10 = new PPDMediaSizeName(59, 297, 684);
+    public static final PPDMediaSizeName DL = new PPDMediaSizeName(60, 312, 624);
+    public static final PPDMediaSizeName DoublePostcard = new PPDMediaSizeName(61, 567, (float) 419.5);
+    public static final PPDMediaSizeName DoublePostcardRotated = new PPDMediaSizeName(62, (float) 419.5, 567);
+    public static final PPDMediaSizeName Env9 = new PPDMediaSizeName(63, 279, 639);
+    public static final PPDMediaSizeName Env10 = new PPDMediaSizeName(64, 297, 684);
+    public static final PPDMediaSizeName Env11 = new PPDMediaSizeName(65, 324, 747);
+    public static final PPDMediaSizeName Env12 = new PPDMediaSizeName(66, 342, 792);
+    public static final PPDMediaSizeName Env14 = new PPDMediaSizeName(67, 360, 828);
+    public static final PPDMediaSizeName EnvC0 = new PPDMediaSizeName(68, 2599, 3676);
+    public static final PPDMediaSizeName EnvC1 = new PPDMediaSizeName(69, 1837, 2599);
+    public static final PPDMediaSizeName EnvC2 = new PPDMediaSizeName(70, 1298, 1837);
+    public static final PPDMediaSizeName EnvC3 = new PPDMediaSizeName(71, 918, 1296);
+    public static final PPDMediaSizeName EnvC4 = new PPDMediaSizeName(72, 649, 918);
+    public static final PPDMediaSizeName EnvC5 = new PPDMediaSizeName(73, 459, 649);
+    public static final PPDMediaSizeName EnvC6 = new PPDMediaSizeName(74, 323, 459);
+    public static final PPDMediaSizeName EnvC65 = new PPDMediaSizeName(75, 324, 648);
+    public static final PPDMediaSizeName EnvC7 = new PPDMediaSizeName(76, 230, 323);
+    public static final PPDMediaSizeName EnvChou3 = new PPDMediaSizeName(77, 340, 666);
+    public static final PPDMediaSizeName EnvChou3Rotated = new PPDMediaSizeName(78, 666, 340);
+    public static final PPDMediaSizeName EnvChou4 = new PPDMediaSizeName(79, 255, 581);
+    public static final PPDMediaSizeName EnvChou4Rotated = new PPDMediaSizeName(80, 581, 255);
+    public static final PPDMediaSizeName EnvDL = new PPDMediaSizeName(81, 312, 624);
+    public static final PPDMediaSizeName EnvInvite = new PPDMediaSizeName(82, 624, 624);
+    public static final PPDMediaSizeName EnvISOB4 = new PPDMediaSizeName(83, 708, 1001);
+    public static final PPDMediaSizeName EnvISOB5 = new PPDMediaSizeName(84, 499, 709);
+    public static final PPDMediaSizeName EnvISOB6 = new PPDMediaSizeName(85, 499, 354);
+    public static final PPDMediaSizeName EnvItalian = new PPDMediaSizeName(86, 312, 652);
+    public static final PPDMediaSizeName EnvKaku2 = new PPDMediaSizeName(87, 680, 941);
+    public static final PPDMediaSizeName EnvKaku2Rotated = new PPDMediaSizeName(88, 941, 680);
+    public static final PPDMediaSizeName EnvKaku3 = new PPDMediaSizeName(89, 612, 785);
+    public static final PPDMediaSizeName EnvKaku3Rotated = new PPDMediaSizeName(90, 785, 612);
+    public static final PPDMediaSizeName EnvMonarch = new PPDMediaSizeName(91, 279, 540);
+    public static final PPDMediaSizeName EnvPersonal = new PPDMediaSizeName(92, 261, 468);
+    public static final PPDMediaSizeName EnvPRC1 = new PPDMediaSizeName(93, 289, 468);
+    public static final PPDMediaSizeName EnvPRC1Rotated = new PPDMediaSizeName(94, 468, 289);
+    public static final PPDMediaSizeName EnvPRC2 = new PPDMediaSizeName(95, 289, 499);
+    public static final PPDMediaSizeName EnvPRC2Rotated = new PPDMediaSizeName(96, 499, 289);
+    public static final PPDMediaSizeName EnvPRC3 = new PPDMediaSizeName(97, 354, 499);
+    public static final PPDMediaSizeName EnvPRC3Rotated = new PPDMediaSizeName(98, 499, 354);
+    public static final PPDMediaSizeName EnvPRC4 = new PPDMediaSizeName(99, 312, 590);
+    public static final PPDMediaSizeName EnvPRC4Rotated = new PPDMediaSizeName(100, 590, 312);
+    public static final PPDMediaSizeName EnvPRC5 = new PPDMediaSizeName(101, 312, 624);
+    public static final PPDMediaSizeName EnvPRC5Rotated = new PPDMediaSizeName(102, 624, 312);
+    public static final PPDMediaSizeName EnvPRC6 = new PPDMediaSizeName(103, 340, 652);
+    public static final PPDMediaSizeName EnvPRC6Rotated = new PPDMediaSizeName(104, 652, 340);
+    public static final PPDMediaSizeName EnvPRC7 = new PPDMediaSizeName(105, 454, 652);
+    public static final PPDMediaSizeName EnvPRC7Rotated = new PPDMediaSizeName(106, 652, 454);
+    public static final PPDMediaSizeName EnvPRC8 = new PPDMediaSizeName(107, 340, 876);
+    public static final PPDMediaSizeName EnvPRC8Rotated = new PPDMediaSizeName(108, 876, 340);
+    public static final PPDMediaSizeName EnvPRC9 = new PPDMediaSizeName(109, 649, 918);
+    public static final PPDMediaSizeName EnvPRC9Rotated = new PPDMediaSizeName(110, 918, 649);
+    public static final PPDMediaSizeName EnvPRC10 = new PPDMediaSizeName(111, 918, 1298);
+    public static final PPDMediaSizeName EnvPRC10Rotated = new PPDMediaSizeName(112, 1298, 918);
+    public static final PPDMediaSizeName EnvYou4 = new PPDMediaSizeName(113, 298, 666);
+    public static final PPDMediaSizeName EnvYou4Rotated = new PPDMediaSizeName(114, 666, 298);
+    public static final PPDMediaSizeName Executive = new PPDMediaSizeName(115, 522, 756);
+    public static final PPDMediaSizeName FanFoldUS = new PPDMediaSizeName(116, 1071, 792);
+    public static final PPDMediaSizeName FanFoldGerman = new PPDMediaSizeName(117, 612, 864);
+    public static final PPDMediaSizeName FanFoldGermanLegal = new PPDMediaSizeName(118, 612, 936);
+    public static final PPDMediaSizeName Folio = new PPDMediaSizeName(119, 595, 935);
+    public static final PPDMediaSizeName ISOB0 = new PPDMediaSizeName(120, 2835, 4008);
+    public static final PPDMediaSizeName ISOB1 = new PPDMediaSizeName(121, 2004, 2835);
+    public static final PPDMediaSizeName ISOB2 = new PPDMediaSizeName(122, 1417, 2004);
+    public static final PPDMediaSizeName ISOB3 = new PPDMediaSizeName(123, 1001, 1417);
+    public static final PPDMediaSizeName ISOB4 = new PPDMediaSizeName(124, 709, 1001);
+    public static final PPDMediaSizeName ISOB5 = new PPDMediaSizeName(125, 499, 709);
+    public static final PPDMediaSizeName ISOB5Extra = new PPDMediaSizeName(126, (float) 569.7, 782);
+    public static final PPDMediaSizeName ISOB6 = new PPDMediaSizeName(127, 354, 499);
+    public static final PPDMediaSizeName ISOB7 = new PPDMediaSizeName(128, 249, 354);
+    public static final PPDMediaSizeName ISOB8 = new PPDMediaSizeName(129, 176, 249);
+    public static final PPDMediaSizeName ISOB9 = new PPDMediaSizeName(130, 125, 176);
+    public static final PPDMediaSizeName ISOB10 = new PPDMediaSizeName(131, 88, 125);
+    public static final PPDMediaSizeName Ledger = new PPDMediaSizeName(132, 1224, 792);
+    public static final PPDMediaSizeName Legal = new PPDMediaSizeName(133, 612, 1008);
+    public static final PPDMediaSizeName LegalExtra = new PPDMediaSizeName(134, 684, 1080);
+    public static final PPDMediaSizeName Letter = new PPDMediaSizeName(135, 612, 792);
+    public static final PPDMediaSizeName Letter_Transverse = new PPDMediaSizeName(136, 612, 792);
+    public static final PPDMediaSizeName LetterExtra = new PPDMediaSizeName(137, 684, 864);
+    public static final PPDMediaSizeName LetterExtra_Transverse = new PPDMediaSizeName(138, 684, 864);
+    public static final PPDMediaSizeName LetterPlus = new PPDMediaSizeName(139, 612, (float) 913.7);
+    public static final PPDMediaSizeName LetterRotated = new PPDMediaSizeName(140, 792, 612);
+    public static final PPDMediaSizeName LetterSmall = new PPDMediaSizeName(141, 612, 792);
+    public static final PPDMediaSizeName Monarch = new PPDMediaSizeName(142, 279, 540);
+    public static final PPDMediaSizeName Note = new PPDMediaSizeName(143, 612, 792);
+    public static final PPDMediaSizeName Postcard = new PPDMediaSizeName(144, 284, 419);
+    public static final PPDMediaSizeName PostcardRotated = new PPDMediaSizeName(145, 419, 284);
+    public static final PPDMediaSizeName PRC16K = new PPDMediaSizeName(146, 414, 610);
+    public static final PPDMediaSizeName PRC16KRotated = new PPDMediaSizeName(147, 610, 414);
+    public static final PPDMediaSizeName PRC32K = new PPDMediaSizeName(148, 275, 428);
+    public static final PPDMediaSizeName PRC32KBig = new PPDMediaSizeName(149, 275, 428);
+    public static final PPDMediaSizeName PRC32KBigRotated = new PPDMediaSizeName(150, 428, 275);
+    public static final PPDMediaSizeName PRC32KRotated = new PPDMediaSizeName(151, 428, 275);
+    public static final PPDMediaSizeName Quarto = new PPDMediaSizeName(152, 610, 780);
+    public static final PPDMediaSizeName Statement = new PPDMediaSizeName(153, 396, 612);
+    public static final PPDMediaSizeName SuperA = new PPDMediaSizeName(154, 643, 1009);
+    public static final PPDMediaSizeName SuperB = new PPDMediaSizeName(155, 864, 1380);
+    public static final PPDMediaSizeName Tabloid = new PPDMediaSizeName(156, 792, 1224);
+    public static final PPDMediaSizeName TabloidExtra = new PPDMediaSizeName(157, 864, 1296);
+
+    private static final String[] stringTable = { "10x11",
+            "10x13",
+            "10x14",
+            "12x11",
+            "15x11",
+            "7x9",
+            "8x10",
+            "9x11",
+            "9x12",
+            "A0",
+            "A1",
+            "A2",
+            "A3",
+            "A3.Transverse",
+            "A3Extra",
+            "A3Extra.Transverse",
+            "A3Rotated",
+            "A4",
+            "A4.Transverse",
+            "A4Extra",
+            "A4Plus",
+            "A4Rotated",
+            "A4Small",
+            "A5",
+            "A5.Transverse",
+            "A5Extra",
+            "A5Rotated",
+            "A6",
+            "A6Rotated",
+            "A7",
+            "A8",
+            "A9",
+            "A10",
+            "AnsiC",
+            "AnsiD",
+            "AnsiE",
+            "ARCHA",
+            "ARCHB",
+            "ARCHC",
+            "ARCHD",
+            "ARCHE",
+            "B0",
+            "B1",
+            "B2",
+            "B3",
+            "B4",
+            "B4Rotated",
+            "B5",
+            "B5.Transverse",
+            "B5Rotated",
+            "B6",
+            "B6Rotated",
+            "B7",
+            "B8",
+            "B9",
+            "B10",
+            "C4",
+            "C5",
+            "C6",
+            "Comm10",
+            "DL",
+            "DoublePostcard",
+            "DoublePostcardRotated",
+            "Env9",
+            "Env10",
+            "Env11",
+            "Env12",
+            "Env14",
+            "EnvC0",
+            "EnvC1",
+            "EnvC2",
+            "EnvC3",
+            "EnvC4",
+            "EnvC5",
+            "EnvC6",
+            "EnvC65",
+            "EnvC7",
+            "EnvChou3",
+            "EnvChou3Rotated",
+            "EnvChou4",
+            "EnvChou4Rotated",
+            "EnvDL",
+            "EnvInvite",
+            "EnvISOB4",
+            "EnvISOB5",
+            "EnvISOB6",
+            "EnvItalian",
+            "EnvKaku2",
+            "EnvKaku2Rotated",
+            "EnvKaku3",
+            "EnvKaku3Rotated",
+            "EnvMonarch",
+            "EnvPersonal",
+            "EnvPRC1",
+            "EnvPRC1Rotated",
+            "EnvPRC2",
+            "EnvPRC2Rotated",
+            "EnvPRC3",
+            "EnvPRC3Rotated",
+            "EnvPRC4",
+            "EnvPRC4Rotated",
+            "EnvPRC5",
+            "EnvPRC5Rotated",
+            "EnvPRC6",
+            "EnvPRC6Rotated",
+            "EnvPRC7",
+            "EnvPRC7Rotated",
+            "EnvPRC8",
+            "EnvPRC8Rotated",
+            "EnvPRC9",
+            "EnvPRC9Rotated",
+            "EnvPRC10",
+            "EnvPRC10Rotated",
+            "EnvYou4",
+            "EnvYou4Rotated",
+            "Executive",
+            "FanFoldUS",
+            "FanFoldGerman",
+            "FanFoldGermanLegal",
+            "Folio",
+            "ISOB0",
+            "ISOB1",
+            "ISOB2",
+            "ISOB3",
+            "ISOB4",
+            "ISOB5",
+            "ISOB5Extra",
+            "ISOB6",
+            "ISOB7",
+            "ISOB8",
+            "ISOB9",
+            "ISOB10",
+            "Ledger",
+            "Legal",
+            "LegalExtra",
+            "Letter",
+            "Letter.Transverse",
+            "LetterExtra",
+            "LetterExtra.Transverse",
+            "LetterPlus",
+            "LetterRotated",
+            "LetterSmall",
+            "Monarch",
+            "Note",
+            "Postcard",
+            "PostcardRotated",
+            "PRC16K",
+            "PRC16KRotated",
+            "PRC32K",
+            "PRC32KBig",
+            "PRC32KBigRotated",
+            "PRC32KRotated",
+            "Quarto",
+            "Statement",
+            "SuperA",
+            "SuperB",
+            "Tabloid",
+            "TabloidExtra" };
+
+    private static final PPDMediaSizeName[] enumValueTable = { s10x11,
+            s10x13,
+            s10x14,
+            s12x11,
+            s15x11,
+            s7x9,
+            s8x10,
+            s9x11,
+            s9x12,
+            A0,
+            A1,
+            A2,
+            A3,
+            A3_Transverse,
+            A3Extra,
+            A3Extra_Transverse,
+            A3Rotated,
+            A4,
+            A4_Transverse,
+            A4Extra,
+            A4Plus,
+            A4Rotated,
+            A4Small,
+            A5,
+            A5_Transverse,
+            A5Extra,
+            A5Rotated,
+            A6,
+            A6Rotated,
+            A7,
+            A8,
+            A9,
+            A10,
+            AnsiC,
+            AnsiD,
+            AnsiE,
+            ARCHA,
+            ARCHB,
+            ARCHC,
+            ARCHD,
+            ARCHE,
+            B0,
+            B1,
+            B2,
+            B3,
+            B4,
+            B4Rotated,
+            B5,
+            B5_Transverse,
+            B5Rotated,
+            B6,
+            B6Rotated,
+            B7,
+            B8,
+            B9,
+            B10,
+            C4,
+            C5,
+            C6,
+            Comm10,
+            DL,
+            DoublePostcard,
+            DoublePostcardRotated,
+            Env9,
+            Env10,
+            Env11,
+            Env12,
+            Env14,
+            EnvC0,
+            EnvC1,
+            EnvC2,
+            EnvC3,
+            EnvC4,
+            EnvC5,
+            EnvC6,
+            EnvC65,
+            EnvC7,
+            EnvChou3,
+            EnvChou3Rotated,
+            EnvChou4,
+            EnvChou4Rotated,
+            EnvDL,
+            EnvInvite,
+            EnvISOB4,
+            EnvISOB5,
+            EnvISOB6,
+            EnvItalian,
+            EnvKaku2,
+            EnvKaku2Rotated,
+            EnvKaku3,
+            EnvKaku3Rotated,
+            EnvMonarch,
+            EnvPersonal,
+            EnvPRC1,
+            EnvPRC1Rotated,
+            EnvPRC2,
+            EnvPRC2Rotated,
+            EnvPRC3,
+            EnvPRC3Rotated,
+            EnvPRC4,
+            EnvPRC4Rotated,
+            EnvPRC5,
+            EnvPRC5Rotated,
+            EnvPRC6,
+            EnvPRC6Rotated,
+            EnvPRC7,
+            EnvPRC7Rotated,
+            EnvPRC8,
+            EnvPRC8Rotated,
+            EnvPRC9,
+            EnvPRC9Rotated,
+            EnvPRC10,
+            EnvPRC10Rotated,
+            EnvYou4,
+            EnvYou4Rotated,
+            Executive,
+            FanFoldUS,
+            FanFoldGerman,
+            FanFoldGermanLegal,
+            Folio,
+            ISOB0,
+            ISOB1,
+            ISOB2,
+            ISOB3,
+            ISOB4,
+            ISOB5,
+            ISOB5Extra,
+            ISOB6,
+            ISOB7,
+            ISOB8,
+            ISOB9,
+            ISOB10,
+            Ledger,
+            Legal,
+            LegalExtra,
+            Letter,
+            Letter_Transverse,
+            LetterExtra,
+            LetterExtra_Transverse,
+            LetterPlus,
+            LetterRotated,
+            LetterSmall,
+            Monarch,
+            Note,
+            Postcard,
+            PostcardRotated,
+            PRC16K,
+            PRC16KRotated,
+            PRC32K,
+            PRC32KBig,
+            PRC32KBigRotated,
+            PRC32KRotated,
+            Quarto,
+            Statement,
+            SuperA,
+            SuperB,
+            Tabloid,
+            TabloidExtra };
+
+    protected PPDMediaSizeName(int value) {
+        super(value);
+    }
+
+    // unit == 1/72 inch
+    protected PPDMediaSizeName(int value, float x, float y) {
+        super(value);
+        if (x > y) {
+            float z = x;
+            y = x;
+            x = z;
+        }
+        new MediaSize(x / 72, y / 72, Size2DSyntax.INCH, this);
+    }
+
+    public EnumSyntax[] getEnumValueTable() {
+        return (EnumSyntax[]) enumValueTable.clone();
+    }
+
+    public String[] getStringTable() {
+        return (String[]) stringTable.clone();
+    }
+
+    public PPDMediaSizeName getPPDMediaSizeNameByName(String name) {
+        for (int i = 0, ii = stringTable.length; i < ii; i++) {
+            if (name.equals(stringTable[i])) {
+                return enumValueTable[i];
+            }
+        }
+        return null;
+    }
+}
\ No newline at end of file

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/common/org/apache/harmony/x/print/attributes/PPDMediaSizeName.java
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message