From: <doc...@us...> - 2007-08-02 21:20:43
|
Revision: 137 http://openpcl.svn.sourceforge.net/openpcl/?rev=137&view=rev Author: documentsystems Date: 2007-08-02 14:20:46 -0700 (Thu, 02 Aug 2007) Log Message: ----------- Howard Hoagland. We decided to release Duplexing for Pcl Direct printing and not do at this time (back burner, do it later) the code for Windows/Image print for Duplexing which will take a significant amount of hours to implement. In PosPrintSetupDialog, made the "Duplex Yes" radio button gray out and auto select the "Duplex No" when the user puts a check in "Use Windows Print", and updated the hover help to say it does that, and ungray out when the user unchecks "Use Windows Print", and also does that behavior upon when the print setup dialog is first shown. Now on the screen, the "Print all on Letter paper (shrinks Legal)" radio button is grayed out when the "Duplex Yes" radio button is not grayed out, and visa versa as the user checks and unchecks the "Use Window Print". Modified Paths: -------------- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-08-02 18:31:26 UTC (rev 136) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-08-02 21:20:46 UTC (rev 137) @@ -276,14 +276,8 @@ mIsPclPrinterJCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - if (mIsPclPrinterJCheckBox.isSelected()) { - mPaperSizePrintAllOnLetterShrinksLegal.setEnabled(true); - } else { - if (mPaperSizePrintAllOnLetterShrinksLegal.isSelected()) { - mPaperSizeAsDisplayedOrSelected.setSelected(true); - } - mPaperSizePrintAllOnLetterShrinksLegal.setEnabled(false); - } + checkforGrayOutShrinkToLetter(); + checkforGrayOutDuplexYes(); } }); @@ -391,11 +385,14 @@ putPrintChoicesOnScreen(); setHoverHelpOnItems(); checkforGrayOutShrinkToLetter(); + checkforGrayOutDuplexYes(); // Make dialog box outer frame width and height exactly to be all item's preferred sizes pack(); } private void checkforGrayOutShrinkToLetter() { + // If "Use Windows Print" is not checked then gray out the "Print all on Letter" check box, + // and select the "Print as displayed/selected" check box if (mIsPclPrinterJCheckBox.isSelected()) { mPaperSizePrintAllOnLetterShrinksLegal.setEnabled(true); } else { @@ -406,6 +403,18 @@ } } + private void checkforGrayOutDuplexYes() { + // If "Use Windows Print" is checked then gray out the Duplex Yes radio button + if (mIsPclPrinterJCheckBox.isSelected()) { + if (mDuplexYesJRadioButton.isSelected()) { + mDuplexNoJRadioButton.setSelected(true); + } + mDuplexYesJRadioButton.setEnabled(false); + } else { + mDuplexYesJRadioButton.setEnabled(true); + } + } + private JPanel makeListOfPrintersPanel() { JPanel panel = new JPanel(); double tloGridSpec[][] = new double[][] {{mTloHgap, mTloFill, mTloHgap }, {mTloFill, mTloVgap }}; @@ -760,7 +769,7 @@ mPrintFormNamesYesJRadioButton.setToolTipText("Print form names"); mPrintFormNamesNoJRadioButton.setToolTipText("Don't print form names"); - mDuplexYesJRadioButton.setToolTipText("Duplex pages"); + mDuplexYesJRadioButton.setToolTipText("Duplex pages. This is grayed out if \"Use Windows Print\" is checked"); mDuplexNoJRadioButton.setToolTipText("Don't duplex pages"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |