From: <doc...@us...> - 2007-07-20 23:53:39
|
Revision: 110 http://openpcl.svn.sourceforge.net/openpcl/?rev=110&view=rev Author: documentsystems Date: 2007-07-20 16:53:33 -0700 (Fri, 20 Jul 2007) Log Message: ----------- Howard Hoagland. Changed the PosPrintSetupChoices getter and setter method names and class variable names to match what is on the print setup dialog when the "Print Order" was changed to "Paper Size" and the "Print all on Legal" and the "Print all on Letter (shrinks Legal)" check boxes were moved into the "Print Order" group box and change to radio buttons in the radio button set with the "Legal first, then Letter" and "Letter first, then Legal". This caused the need to fix all those getter/setter method calls and radio button names in the 5 other classes checked in at this time. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java openpcl/src/com/openpcl/viewer/printing/PosPrintBufferedImage.java openpcl/src/com/openpcl/viewer/printing/PosPrintPageableInterface.java openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java Modified: openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java 2007-07-17 01:53:21 UTC (rev 109) +++ openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java 2007-07-20 23:53:33 UTC (rev 110) @@ -20,14 +20,12 @@ import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JLabel; -import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JTextField; import javax.swing.border.TitledBorder; import com.openpcl.viewer.OpenPCLViewer; -import com.openpcl.viewer.panels.PosView; import com.openpcl.viewer.printing.PosPrintSetupDialog; import com.openpcl.viewer.printing.PosPrintSetupDialogChoices; import com.openpcl.viewer.util.PosReadImageIcon; @@ -216,7 +214,7 @@ private void showPrintSetupDefaultsDialog() { mPosPrintSetupDialog = new PosPrintSetupDialog(mParentFrame, "Print Setup Defaults", mOpenPCLViewer.getPosStartupOptions(), mPosPrintSetupDialogChoices, - mPrintRequestAttributeSet, mPrinterJob, "No pages will print at this time because this is Printer Setup Defaluts."); + mPrintRequestAttributeSet, mPrinterJob, "No pages will print at this time because this is Printer Setup Defaults."); mPosPrintSetupDialog.setLocationRelativeTo(mParentFrame); mPosPrintSetupDialog.setVisible(true); Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintBufferedImage.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintBufferedImage.java 2007-07-17 01:53:21 UTC (rev 109) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintBufferedImage.java 2007-07-20 23:53:33 UTC (rev 110) @@ -98,9 +98,9 @@ // Save the passed in AffineTransform (to put it back before returning) mOrigAffineTransform = g2D.getTransform(); - if (mPosPrintSetupDialogChoices.shouldShrinkLegalToFitOnLetter() && + if (mPosPrintSetupDialogChoices.isPaperSizePrintAllOnLetterShrinksLegal() && ( !(mPosView.getOpenPCLViewer().isTreeNodePageLetterSize(mPrintThisTreeNode)) )) { - // The user has a check in the "Shrink All Legal Pages to Fit On Letter" check box so shrink to Legal to fit on Letter + // The user has clicked the "Print all on Letter paper (shrinks Legal)" radio button so shrink Legal to fit on Letter g2D.transform(mShrinkLegalToLetterAffineTransform); } else { Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintPageableInterface.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintPageableInterface.java 2007-07-17 01:53:21 UTC (rev 109) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintPageableInterface.java 2007-07-20 23:53:33 UTC (rev 110) @@ -76,14 +76,14 @@ throw new IndexOutOfBoundsException( makeIndexOutOfBoundsInfoString(pForPageNumber, mNumberOfPages)); } else { - if (mPosPrintSetupDialogChoices != null && mPosPrintSetupDialogChoices.shouldPrintAllOnLegalSize()) { - // The user has a check in the Print Setup dialog box for "Print all Documents on Legal size" - // so FORCE ALL PAGES TO LEGAL SIZE no matter if LTR in the DSP values or no matter if this is a PCL file + if (mPosPrintSetupDialogChoices != null && mPosPrintSetupDialogChoices.isPaperSizePrintAllOnLegal()) { + // The user has a check in the Print Setup dialog box for "Print all on Legal paper" + // so FORCE ALL PAGES TO LEGAL SIZE no matter if LTR in the Blockument DSP values + // or if this is a PCL file with a letter size PCL command tBuiltPageFormat.setPaper(mLegalPaperPortrait); - } else if (mPosPrintSetupDialogChoices != null && mPosPrintSetupDialogChoices.shouldShrinkLegalToFitOnLetter()) { - // The user has a check in the "Shrink All Legal Pages to Fit On Letter" check box - // so force all pages to Letter size + } else if (mPosPrintSetupDialogChoices != null && mPosPrintSetupDialogChoices.isPaperSizePrintAllOnLetterShrinksLegal()) { + // The user has clicked the "Print all on Letter paper (shrinks Legal)" radio button so force all pages to Letter size tBuiltPageFormat.setPaper(mLetterPaperPortrait); } else { Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java 2007-07-17 01:53:21 UTC (rev 109) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java 2007-07-20 23:53:33 UTC (rev 110) @@ -236,33 +236,46 @@ threadShowProgressBar.start(); StringBuffer tMsgStringBuffer = new StringBuffer(); - tMsgStringBuffer.append(" to printer selected: "); - tMsgStringBuffer.append(mPrintService.getName()); - tMsgStringBuffer.append("\n Shrink All Legal Pages to Fit On Letter is "); - if (mPosPrintSetupDialogChoices.shouldShrinkLegalToFitOnLetter()) { - tMsgStringBuffer.append("\"True\""); + // Java Console output window will show all the below: + // "Windows Print" or "Print PCL Direct" + if (mPosPrintSetupDialogChoices.isPrintFormatPclDirect()) { + tMsgStringBuffer.append("\"Print PCL Direct\""); } else { - tMsgStringBuffer.append("\"False\""); + tMsgStringBuffer.append("\"Windows Print\""); } - - tMsgStringBuffer.append("\n Print all Documents on Legal Size is "); - if (mPosPrintSetupDialogChoices.shouldPrintAllOnLegalSize()) { - tMsgStringBuffer.append("\"True\""); - } else { - tMsgStringBuffer.append("\"False\""); + + // to printer selected + tMsgStringBuffer.append(" to printer selected: "); + tMsgStringBuffer.append(mPrintService.getName()); + + // The 5 radio buttons in the "Paper Size" group box + if (mPosPrintSetupDialogChoices.isPaperSizeAsDisplayedOrSelected()) { + tMsgStringBuffer.append("\n Print as displayed/selected."); + + } else if (mPosPrintSetupDialogChoices.isPaperSizeLegalFirstThenLetter()) { + tMsgStringBuffer.append("\n Print Legal first, then Letter."); + + } else if (mPosPrintSetupDialogChoices.isPaperSizeLetterFirstThenLegal()) { + tMsgStringBuffer.append("\n Print Letter first, then Legal."); + + } else if (mPosPrintSetupDialogChoices.isPaperSizePrintAllOnLegal()) { + tMsgStringBuffer.append("\n Print all on Legal paper."); + + } else if (mPosPrintSetupDialogChoices.isPaperSizePrintAllOnLetterShrinksLegal()) { + tMsgStringBuffer.append("\n Print all on Letter paper (shrinks Legal). "); } - + + // Additional copies tMsgStringBuffer.append("\n Additional Copies is " + mPosPrintSetupDialogChoices.getNumAdditionalCopies()); + // "Print All" or "Print Selected" or "Print Remaining" or "Print Changed" + // N pages + // Index numbers are: n, n, n, ... n tMsgStringBuffer.append("\n " + mIndexNumbersStringBuffer); - // Console output print type "Use Windows Print" or "Print PCL Direct" - if (mPosPrintSetupDialogChoices.isPrintFormatPclDirect()) { - PriDebug.releaseln("\"Print PCL Direct\"" + tMsgStringBuffer.toString()); - } else { - PriDebug.releaseln("\"Windows Print\"" + tMsgStringBuffer.toString()); - } + // Send the built multi line string to the Java Console + PriDebug.releaseln(tMsgStringBuffer.toString()); // The number of additional copies has already been validated and is guaranteed to be 0 to 3 at this point mNumberOfPrintPasses = 1 + mPosPrintSetupDialogChoices.getNumAdditionalCopies(); @@ -356,9 +369,10 @@ // PriDebug.releaseln("Pcl page before, after bytes: " + tPclBytes.length + ", " + tModifiedPclBytes.length); try { - if (pPosPrintSetupDialogChoices != null && pPosPrintSetupDialogChoices.shouldPrintAllOnLegalSize()) { - // The user has a check in the Print Setup dialog box for "Print all Documents on Legal size" - // so FORCE ALL PAGES TO LEGAL SIZE no matter if LTR in the DSP values or no matter if this is a PCL file + if (pPosPrintSetupDialogChoices != null && pPosPrintSetupDialogChoices.isPaperSizePrintAllOnLegal()) { + // The user has a check in the Print Setup dialog box for "Print all on Legal paper" + // so FORCE ALL PAGES TO LEGAL SIZE no matter if LTR in the Blockument DSP values + // or if this is a PCL file with a letter size PCL command tByteArrayOutputStream.write(tLegalSizePaperBytes); } else { Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-07-17 01:53:21 UTC (rev 109) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-07-20 23:53:33 UTC (rev 110) @@ -58,7 +58,6 @@ private static final long serialVersionUID = 1L; private PosPrintSetupDialog mThisPosPrintSetupDialog = null; private PosStartupOptions mPosStartupOptions = null; - private Frame mParentFrame = null; private PosPrintSetupDialogChoices mPrintChoices = null; private PrintRequestAttributeSet mPrintRequestAttributeSet = null; private PrinterJob mPrinterJob = null; @@ -121,11 +120,11 @@ private Font mTextAreaFont = new Font("Arial", Font.PLAIN, 12); // JRadioButtons - private JRadioButton mPrintOrderAsDisplayedOrSelectedJRadioButton = new JRadioButton("As displayed / selected"); - private JRadioButton mPrintOrderLegalFirstThenLetterJRadioButton = new JRadioButton("Legal first, then Letter"); - private JRadioButton mPrintOrderLetterFirstThenLegalJRadioButton = new JRadioButton("Letter first, then Legal"); - private JRadioButton mAllOnLegalJRadioButton = new JRadioButton("Print all on Legal paper"); - private JRadioButton mAllOnLetterShrinkLegalJRadioButton = new JRadioButton("Print all on Letter paper (shrinks Legal)"); + private JRadioButton mPaperSizeAsDisplayedOrSelected = new JRadioButton("As displayed / selected"); + private JRadioButton mPaperSizeLegalFirstThenLetter = new JRadioButton("Legal first, then Letter"); + private JRadioButton mPaperSizeLetterFirstThenLegal = new JRadioButton("Letter first, then Legal"); + private JRadioButton mPaperSizePrintAllOnLegal = new JRadioButton("Print all on Legal paper"); + private JRadioButton mPaperSizePrintAllOnLetterShrinksLegal = new JRadioButton("Print all on Letter paper (shrinks Legal)"); private JRadioButton mPrintFormNamesYesJRadioButton = new JRadioButton("Yes"); private JRadioButton mPrintFormNamesNoJRadioButton = new JRadioButton("No"); private JRadioButton mDuplexYesJRadioButton = new JRadioButton("Yes (If Supported by Printer)"); @@ -162,7 +161,6 @@ super(pParentFrame, pTitleBarText, true); mThisPosPrintSetupDialog = this; // needed for the ActionListeners to put up the JOptionPane info dialogs mPosStartupOptions = pPosStartupOptions; - mParentFrame = pParentFrame; // Set to false the show DSML buttons even if the user said true on the command line mPosStartupOptions.setShowDSMLPrintDialogButtons(false); @@ -279,12 +277,12 @@ mIsPclPrinterJCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (mIsPclPrinterJCheckBox.isSelected()) { - mAllOnLetterShrinkLegalJRadioButton.setEnabled(true); + mPaperSizePrintAllOnLetterShrinksLegal.setEnabled(true); } else { - if (mAllOnLetterShrinkLegalJRadioButton.isSelected()) { - mPrintOrderAsDisplayedOrSelectedJRadioButton.setSelected(true); + if (mPaperSizePrintAllOnLetterShrinksLegal.isSelected()) { + mPaperSizeAsDisplayedOrSelected.setSelected(true); } - mAllOnLetterShrinkLegalJRadioButton.setEnabled(false); + mPaperSizePrintAllOnLetterShrinksLegal.setEnabled(false); } } }); @@ -399,12 +397,12 @@ private void checkforGrayOutShrinkToLetter() { if (mIsPclPrinterJCheckBox.isSelected()) { - mAllOnLetterShrinkLegalJRadioButton.setEnabled(true); + mPaperSizePrintAllOnLetterShrinksLegal.setEnabled(true); } else { - if (mAllOnLetterShrinkLegalJRadioButton.isSelected()) { - mPrintOrderAsDisplayedOrSelectedJRadioButton.setSelected(true); + if (mPaperSizePrintAllOnLetterShrinksLegal.isSelected()) { + mPaperSizeAsDisplayedOrSelected.setSelected(true); } - mAllOnLetterShrinkLegalJRadioButton.setEnabled(false); + mPaperSizePrintAllOnLetterShrinksLegal.setEnabled(false); } } @@ -451,31 +449,31 @@ private JPanel makePaperSizePanel() { JPanel panel = new JPanel(); - int tTextHeight = mPrintOrderAsDisplayedOrSelectedJRadioButton.getPreferredSize().height - 6; + int tTextHeight = mPaperSizeAsDisplayedOrSelected.getPreferredSize().height - 6; double tloGridSpec[][] = new double[][] {{ mTloPref}, { tTextHeight, tTextHeight, tTextHeight, tTextHeight, tTextHeight}}; TableLayout tloLayout = new TableLayout(tloGridSpec); panel.setLayout(tloLayout); ButtonGroup buttonGroup = new ButtonGroup(); - buttonGroup.add(mPrintOrderAsDisplayedOrSelectedJRadioButton); - buttonGroup.add(mPrintOrderLegalFirstThenLetterJRadioButton); - buttonGroup.add(mPrintOrderLetterFirstThenLegalJRadioButton); - buttonGroup.add(mAllOnLegalJRadioButton); - buttonGroup.add(mAllOnLetterShrinkLegalJRadioButton); + buttonGroup.add(mPaperSizeAsDisplayedOrSelected); + buttonGroup.add(mPaperSizeLegalFirstThenLetter); + buttonGroup.add(mPaperSizeLetterFirstThenLegal); + buttonGroup.add(mPaperSizePrintAllOnLegal); + buttonGroup.add(mPaperSizePrintAllOnLetterShrinksLegal); - panel.add(makeFillerOnRightPanel(mPrintOrderAsDisplayedOrSelectedJRadioButton), "0, 0"); - panel.add(makeFillerOnRightPanel(mPrintOrderLegalFirstThenLetterJRadioButton), "0, 1"); - panel.add(makeFillerOnRightPanel(mPrintOrderLetterFirstThenLegalJRadioButton), "0, 2"); - panel.add(makeFillerOnRightPanel(mAllOnLegalJRadioButton), "0, 3"); - panel.add(makeFillerOnRightPanel(mAllOnLetterShrinkLegalJRadioButton), "0, 4"); + panel.add(makeFillerOnRightPanel(mPaperSizeAsDisplayedOrSelected), "0, 0"); + panel.add(makeFillerOnRightPanel(mPaperSizeLegalFirstThenLetter), "0, 1"); + panel.add(makeFillerOnRightPanel(mPaperSizeLetterFirstThenLegal), "0, 2"); + panel.add(makeFillerOnRightPanel(mPaperSizePrintAllOnLegal), "0, 3"); + panel.add(makeFillerOnRightPanel(mPaperSizePrintAllOnLetterShrinksLegal), "0, 4"); return panel; } private JPanel makePrintFormNamesPanel() { JPanel panel = new JPanel(); - int tTextHeight = mPrintOrderAsDisplayedOrSelectedJRadioButton.getPreferredSize().height - 6; + int tTextHeight = mPaperSizeAsDisplayedOrSelected.getPreferredSize().height - 6; double tloGridSpec[][] = new double[][] {{ mTloPref }, { tTextHeight, tTextHeight }}; TableLayout tloLayout = new TableLayout(tloGridSpec); panel.setLayout(tloLayout); @@ -491,7 +489,7 @@ private JPanel makeDuplexPanel() { JPanel panel = new JPanel(); - int tTextHeight = mPrintOrderAsDisplayedOrSelectedJRadioButton.getPreferredSize().height - 6; + int tTextHeight = mPaperSizeAsDisplayedOrSelected.getPreferredSize().height - 6; double tloGridSpec[][] = new double[][] {{ mTloPref }, { tTextHeight, tTextHeight }}; TableLayout tloLayout = new TableLayout(tloGridSpec); panel.setLayout(tloLayout); @@ -550,15 +548,24 @@ private void putPrintChoicesOnScreen() { mAddlCopiesJTextField.setText(Integer.toString(mPrintChoices.getNumAdditionalCopies())); mIsPclPrinterJCheckBox.setSelected(!(mPrintChoices.isPrintFormatPclDirect())); - mPrintOrderAsDisplayedOrSelectedJRadioButton.setSelected(mPrintChoices.isPrintOrderAsDisplayedOrSelected()); - mPrintOrderLegalFirstThenLetterJRadioButton.setSelected(mPrintChoices.isPrintOrderLegalFirstThenLetter()); - mPrintOrderLetterFirstThenLegalJRadioButton.setSelected(mPrintChoices.isPrintOrderLetterFirstThenLegal()); - mPrintFormNamesYesJRadioButton.setSelected(mPrintChoices.shouldPrintFormNames()); - mPrintFormNamesNoJRadioButton.setSelected( !(mPrintChoices.shouldPrintFormNames()) ); - mDuplexYesJRadioButton.setSelected(mPrintChoices.shouldDuplex()); - mDuplexNoJRadioButton.setSelected( !(mPrintChoices.shouldDuplex()) ); - mAllOnLetterShrinkLegalJRadioButton.setSelected(mPrintChoices.shouldShrinkLegalToFitOnLetter()); - mAllOnLegalJRadioButton.setSelected(mPrintChoices.shouldPrintAllOnLegalSize()); + + mPaperSizeAsDisplayedOrSelected.setSelected(mPrintChoices.isPaperSizeAsDisplayedOrSelected()); + mPaperSizeLegalFirstThenLetter.setSelected(mPrintChoices.isPaperSizeLegalFirstThenLetter()); + mPaperSizeLetterFirstThenLegal.setSelected(mPrintChoices.isPaperSizeLetterFirstThenLegal()); + mPaperSizePrintAllOnLegal.setSelected(mPrintChoices.isPaperSizePrintAllOnLegal()); + mPaperSizePrintAllOnLetterShrinksLegal.setSelected(mPrintChoices.isPaperSizePrintAllOnLetterShrinksLegal()); + + if (mPrintChoices.shouldPrintFormNames()) { + mPrintFormNamesYesJRadioButton.setSelected(true); + } else { + mPrintFormNamesYesJRadioButton.setSelected(false); + } + + if (mPrintChoices.shouldDuplex()) { + mDuplexYesJRadioButton.setSelected(true); + } else { + mDuplexYesJRadioButton.setSelected(false); + } } private void getPrintChoicesFromScreen() { @@ -583,21 +590,23 @@ mPrintChoices.setPrintFormatIsPclDirect(); } - // Print order - if (mPrintOrderAsDisplayedOrSelectedJRadioButton.isSelected()) { - mPrintChoices.setPrintOrderAsDisplayedOrSelected(); - } else if (mPrintOrderLegalFirstThenLetterJRadioButton.isSelected()) { - mPrintChoices.setPrintOrderLegalFirstThenLetter(); - } else { - mPrintChoices.setPrintOrderLetterFirstThenLegal(); + // Paper Size + if (mPaperSizeAsDisplayedOrSelected.isSelected()) { + mPrintChoices.setPaperSizeAsDisplayedSelected(); + + } else if (mPaperSizeLegalFirstThenLetter.isSelected()) { + mPrintChoices.setPaperSizeLegalFirstThenLetter(); + + } else if (mPaperSizeLetterFirstThenLegal.isSelected()) { + mPrintChoices.setPaperSizeLetterFirstThenLegal(); + + } else if (mPaperSizePrintAllOnLegal.isSelected()) { + mPrintChoices.setPaperSizePrintAllOnLegal(); + + } else if (mPaperSizePrintAllOnLetterShrinksLegal.isSelected()) { + mPrintChoices.setPaperSizePrintAllOnLetterShrinksLegal(); } - // Shrink All Legal Pages to Fit On Letter - mPrintChoices.setShouldShrinkLegalToFitOnLetter(mAllOnLetterShrinkLegalJRadioButton.isSelected()); - - // Print all on legal size - mPrintChoices.setShouldPrintAllOnLegalSize(mAllOnLegalJRadioButton.isSelected()); - // Print form names mPrintChoices.setShouldPrintFormNames(mPrintFormNamesYesJRadioButton.isSelected()); @@ -609,13 +618,15 @@ private void makeArrayListOfDialogItems() { mItemsOnDialogBox.add(mListOfPrintersJList); mItemsOnDialogBox.add(mIsPclPrinterJCheckBox); - mItemsOnDialogBox.add(mAllOnLetterShrinkLegalJRadioButton); - mItemsOnDialogBox.add(mAllOnLegalJRadioButton); mItemsOnDialogBox.add(mAddlCopiesJLabel); mItemsOnDialogBox.add(mAddlCopiesJTextField); - mItemsOnDialogBox.add(mPrintOrderAsDisplayedOrSelectedJRadioButton); - mItemsOnDialogBox.add(mPrintOrderLegalFirstThenLetterJRadioButton); - mItemsOnDialogBox.add(mPrintOrderLetterFirstThenLegalJRadioButton); + + mItemsOnDialogBox.add(mPaperSizeAsDisplayedOrSelected); + mItemsOnDialogBox.add(mPaperSizeLegalFirstThenLetter); + mItemsOnDialogBox.add(mPaperSizeLetterFirstThenLegal); + mItemsOnDialogBox.add(mPaperSizePrintAllOnLegal); + mItemsOnDialogBox.add(mPaperSizePrintAllOnLetterShrinksLegal); + mItemsOnDialogBox.add(mPrintFormNamesYesJRadioButton); mItemsOnDialogBox.add(mPrintFormNamesNoJRadioButton); mItemsOnDialogBox.add(mDuplexYesJRadioButton); @@ -740,12 +751,12 @@ mIsPclPrinterJCheckBox.setToolTipText(sPrinterModeHoverOverString); mAddlCopiesJTextField.setToolTipText("Allowed values are 0 to 3 additional copies"); - mAllOnLegalJRadioButton.setToolTipText("Print all pages on Legal paper"); - mAllOnLetterShrinkLegalJRadioButton.setToolTipText( + mPaperSizeAsDisplayedOrSelected.setToolTipText("Print pages in the order shown on the screen"); + mPaperSizeLegalFirstThenLetter.setToolTipText("Print Legal first then Letter"); + mPaperSizeLetterFirstThenLegal.setToolTipText("Print Letter first then Legal"); + mPaperSizePrintAllOnLegal.setToolTipText("Print all pages on Legal paper"); + mPaperSizePrintAllOnLetterShrinksLegal.setToolTipText( "Print all pages on Letter paper. This is grayed out if \"Use Windows Print\" is unchecked"); - mPrintOrderAsDisplayedOrSelectedJRadioButton.setToolTipText("Print pages in the order shown in the tree"); - mPrintOrderLegalFirstThenLetterJRadioButton.setToolTipText("Print Legal first then Letter"); - mPrintOrderLetterFirstThenLegalJRadioButton.setToolTipText("Print Letter first then Legal"); mPrintFormNamesYesJRadioButton.setToolTipText("Print form names"); mPrintFormNamesNoJRadioButton.setToolTipText("Don't print form names"); Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java 2007-07-17 01:53:21 UTC (rev 109) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java 2007-07-20 23:53:33 UTC (rev 110) @@ -8,22 +8,22 @@ */ public class PosPrintSetupDialogChoices { - public static final int mPrintFormatIsPclDirect = 1; - public static final int mPrintFormatIsGdiDriver = 2; + public static final int sPrintFormatIsPclDirect = 1; + public static final int sPrintFormatIsGdiDriver = 2; - public static final int mPrintOrderAsDisplayedOrSelected = 1; - public static final int mPrintOrderLegalFirstThenLetter = 2; - public static final int mPrintOrderLetterFirstThenLegal = 3; + public static final int sPaperSizeAsDisplayedSelected = 1; + public static final int sPaperSizeLegalFirstThenLetter = 2; + public static final int sPaperSizeLetterFirstThenLegal = 3; + public static final int sPaperSizePrintAllOnLegal = 4; + public static final int sPaperSizePrintAllOnLetterShrinksLegal = 5; // TODO Add code to take the defaults from the user options in the Preferences, instead of the below initializations private PrintService mSelectedPrintService = null; private int mNumAdditionalCopies = 0; - private int mPrintFormat = mPrintFormatIsGdiDriver; - private int mPrintOrder = mPrintOrderAsDisplayedOrSelected; + private int mPrintFormat = sPrintFormatIsGdiDriver; + private int mPaperSize = sPaperSizeAsDisplayedSelected; private boolean mShouldPrintFormNames = false; private boolean mShouldDuplex = false; - private boolean mShouldShrinkLegalToFitOnLetter = false; - private boolean mShouldPrintAllOnLegalSize = false; private boolean mUserHitOk = false; @@ -39,32 +39,32 @@ return mNumAdditionalCopies; } public boolean isPrintFormatPclDirect() { - return (mPrintFormat == mPrintFormatIsPclDirect); + return (mPrintFormat == sPrintFormatIsPclDirect); } public boolean isPrintFormatGdiDriver() { - return (mPrintFormat == mPrintFormatIsGdiDriver); + return (mPrintFormat == sPrintFormatIsGdiDriver); } - public boolean isPrintOrderAsDisplayedOrSelected() { - return (mPrintOrder == mPrintOrderAsDisplayedOrSelected); + public boolean isPaperSizeAsDisplayedOrSelected() { + return (mPaperSize == sPaperSizeAsDisplayedSelected); } - public boolean isPrintOrderLegalFirstThenLetter() { - return (mPrintOrder == mPrintOrderLegalFirstThenLetter); + public boolean isPaperSizeLegalFirstThenLetter() { + return (mPaperSize == sPaperSizeLegalFirstThenLetter); } - public boolean isPrintOrderLetterFirstThenLegal() { - return (mPrintOrder == mPrintOrderLetterFirstThenLegal); + public boolean isPaperSizeLetterFirstThenLegal() { + return (mPaperSize == sPaperSizeLetterFirstThenLegal); } + public boolean isPaperSizePrintAllOnLegal() { + return (mPaperSize == sPaperSizePrintAllOnLegal); + } + public boolean isPaperSizePrintAllOnLetterShrinksLegal() { + return (mPaperSize == sPaperSizePrintAllOnLetterShrinksLegal); + } public boolean shouldPrintFormNames() { return mShouldPrintFormNames; } public boolean shouldDuplex() { return mShouldDuplex; } - public boolean shouldShrinkLegalToFitOnLetter() { - return mShouldShrinkLegalToFitOnLetter; - } - public boolean shouldPrintAllOnLegalSize() { - return mShouldPrintAllOnLegalSize; - } public boolean getDidUserHitOk() { return mUserHitOk; } @@ -77,32 +77,32 @@ mNumAdditionalCopies = numCopies; } public void setPrintFormatIsPclDirect() { - mPrintFormat = mPrintFormatIsPclDirect; + mPrintFormat = sPrintFormatIsPclDirect; } public void setPrintFormatIsGdiDriver() { - mPrintFormat = mPrintFormatIsGdiDriver; + mPrintFormat = sPrintFormatIsGdiDriver; } - public void setPrintOrderAsDisplayedOrSelected() { - mPrintOrder = mPrintOrderAsDisplayedOrSelected; + public void setPaperSizeAsDisplayedSelected() { + mPaperSize = sPaperSizeAsDisplayedSelected; } - public void setPrintOrderLegalFirstThenLetter() { - mPrintOrder = mPrintOrderLegalFirstThenLetter; + public void setPaperSizeLegalFirstThenLetter() { + mPaperSize = sPaperSizeLegalFirstThenLetter; } - public void setPrintOrderLetterFirstThenLegal() { - mPrintOrder = mPrintOrderLetterFirstThenLegal; + public void setPaperSizeLetterFirstThenLegal() { + mPaperSize = sPaperSizeLetterFirstThenLegal; } + public void setPaperSizePrintAllOnLegal() { + mPaperSize = sPaperSizePrintAllOnLegal; + } + public void setPaperSizePrintAllOnLetterShrinksLegal() { + mPaperSize = sPaperSizePrintAllOnLetterShrinksLegal; + } public void setShouldPrintFormNames(boolean yesOrNo) { mShouldPrintFormNames = yesOrNo; } public void setShouldDuplex(boolean yesOrNo) { mShouldDuplex = yesOrNo; } - public void setShouldShrinkLegalToFitOnLetter(boolean yesOrNo) { - mShouldShrinkLegalToFitOnLetter = yesOrNo; - } - public void setShouldPrintAllOnLegalSize(boolean yesOrNo) { - mShouldPrintAllOnLegalSize = yesOrNo; - } public void setUserHitOk(boolean yesOrNo) { mUserHitOk = yesOrNo; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |