From: <doc...@us...> - 2007-07-17 01:53:19
|
Revision: 109 http://openpcl.svn.sourceforge.net/openpcl/?rev=109&view=rev Author: documentsystems Date: 2007-07-16 18:53:21 -0700 (Mon, 16 Jul 2007) Log Message: ----------- Howard Hoagland. Changed Print Setup Dialog to move the "Print all on Legal, Print all on Letter (Shrink Legal)" from check boxes to radio buttons that are now part of the "Paper Size" group box of 5 radio buttons instead of the "Print Order" 3 radio buttons. Added the "Print Form Names" and "Duplex" group boxes with their yes/no radio buttons. Removed the "Print Bar Codes" source code because that's for generating bar codes on the fly which we are not going to do. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-07-16 21:46:41 UTC (rev 108) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-07-17 01:53:21 UTC (rev 109) @@ -2,6 +2,7 @@ import info.clearthought.layout.TableLayout; +import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; @@ -55,6 +56,7 @@ public class PosPrintSetupDialog extends JDialog { private static final long serialVersionUID = 1L; + private PosPrintSetupDialog mThisPosPrintSetupDialog = null; private PosStartupOptions mPosStartupOptions = null; private Frame mParentFrame = null; private PosPrintSetupDialogChoices mPrintChoices = null; @@ -94,8 +96,7 @@ private JPanel mListOfPrintersJPanel = null; private JPanel mAddlCopiesJPanel = null; private JPanel mWindowsPrintOrPclPrintJPanel = null; - private JPanel mPrintBarCodesJPanel = null; - private JPanel mPrintOrderJPanel = null; + private JPanel mPaperSizeJPanel = null; private JPanel mPrintFormNamesJPanel = null; private JPanel mDuplexJPanel = null; @@ -120,11 +121,11 @@ private Font mTextAreaFont = new Font("Arial", Font.PLAIN, 12); // JRadioButtons - private JRadioButton mPrintBarCodesYesJRadioButton = new JRadioButton("Yes"); - private JRadioButton mPrintBarCodesNoJRadioButton = new JRadioButton("No"); - 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 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 mPrintFormNamesYesJRadioButton = new JRadioButton("Yes"); private JRadioButton mPrintFormNamesNoJRadioButton = new JRadioButton("No"); private JRadioButton mDuplexYesJRadioButton = new JRadioButton("Yes (If Supported by Printer)"); @@ -144,21 +145,14 @@ // JCheckBoxes private JCheckBox mIsPclPrinterJCheckBox = new JCheckBox("Use Windows Print (recommended)"); - private JCheckBox mShrinkLegalToFitOnLetterJCheckBox = new JCheckBox( - "Shrink All Legal Pages to Fit On Letter"); - private JCheckBox mPrintAllOnLegalSizeJCheckBox = new JCheckBox("Print All Documents on Legal Size"); // JLists private JList mListOfPrintersJList = null; private ListModel mPrintersListModel = null; private ListOfPrintersSelectionListener mListOfPrintersSelectionListener = new ListOfPrintersSelectionListener(); private JScrollPane mListOfPrintersJScrollPane = null; - + // Strings - private static final String sNotImplementedString = "Not implemented: "; - private static final String sBarCodeHoverString = - "Bar codes already in the PCL are printed, but bar codes are not generated on the fly."; - private static final String sPrinterModeHoverOverString = "<html>Unselect if printer supports PCL (Example: HP LaserJet 4050)</html>"; @@ -166,6 +160,7 @@ PosPrintSetupDialogChoices pPrintChoices, PrintRequestAttributeSet pPrintRequestAttributeSet, PrinterJob pPrinterJob, String pSelectedPageNumbers) throws HeadlessException { 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 @@ -194,31 +189,27 @@ mListOfPrintersJPanel = makeListOfPrintersPanel(); mWindowsPrintOrPclPrintJPanel = makeWindowsPrintOrPclPrintPanel(); mAddlCopiesJPanel = makeAdditionalCopiesPanel(); - mPrintBarCodesJPanel = makePrintBarCodesPanel(); - mPrintOrderJPanel = makePrintOrderPanel(); + mPaperSizeJPanel = makePaperSizePanel(); mPrintFormNamesJPanel = makePrintFormNamesPanel(); mDuplexJPanel = makeDuplexPanel(); // Lay out tab 1 items double tloTab1GridSpec[][] = new double[][] { - { mTloFill, mTloHgap, mTloFill}, // columns - { mTloFill, mTloVgap, mTloPref, mTloPref, mTloPref, mTloPref, mTloVgap, mTloPref, mTloPref}}; // rows + { mTloPref, 10, mTloFill}, // columns + { mTloFill, mTloVgap, mTloPref, mTloPref, mTloPref}}; // rows TableLayout tloTab1Layout = new TableLayout(tloTab1GridSpec); mTab1.setLayout(tloTab1Layout); mTab1.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); mTab1.add(mListOfPrintersJPanel, "0, 0, 2, 0"); - mTab1.add(mWindowsPrintOrPclPrintJPanel, "0, 2, 2, 2"); - mTab1.add(makeFillerOnRightPanel(mShrinkLegalToFitOnLetterJCheckBox), "0, 3, 2, 3"); - mTab1.add(makeFillerOnRightPanel(mPrintAllOnLegalSizeJCheckBox), "0, 4, 2, 4"); - mTab1.add(mAddlCopiesJPanel, "0, 5, 2, 5"); - mTab1.add(mPrintOrderJPanel, "0, 7, 2, 7"); - mTab1.add(makeFillerOnRightPanel(mOpenJDKPrintDialogJButton), "0, 8, 2, 8"); + mTab1.add(mWindowsPrintOrPclPrintJPanel, "0, 2"); + mTab1.add(mAddlCopiesJPanel, "2, 2"); + mTab1.add(mPaperSizeJPanel, "0, 3, 0, 4"); -// mTab1.add(mPrintBarCodesJPanel, "0, 6"); -// mTab1.add(mPrintOrderJPanel, "2, 6"); -// mTab1.add(mPrintFormNamesJPanel, "0, 8"); -// mTab1.add(mDuplexJPanel, "2, 8"); + mTab1.add(mPrintFormNamesJPanel, "2, 3"); + mTab1.add(mDuplexJPanel, "2, 4"); + // mTab1.add(makeFillerOnRightPanel(mOpenJDKPrintDialogJButton), "0, 8, 2, 8"); + // Lay out tab 2 items // double tloTab2GridSpec[][] = new double[][] { // { mTloPref, mTloFill }, // columns @@ -267,7 +258,7 @@ // Add the Control Panel, JTabbedPane, and buttons panel to the contentPane double tloContentPaneGridSpec[][] = new double[][] { { mTloHgap, mTloFill, mTloHgap }, // columns - { mTloFill, mTloPref, mTloVgap }}; // rows + { mTloFill, mTloPref, 10 }}; // rows TableLayout tloContentPaneLayout = new TableLayout(tloContentPaneGridSpec); setLayout(tloContentPaneLayout); // mControlJPanel = makeControlPanel(); @@ -280,7 +271,7 @@ // ActionListeners mPrintModeMoreInfoJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - JOptionPane.showMessageDialog(mParentFrame, sPrinterModeHoverOverString, + JOptionPane.showMessageDialog(mThisPosPrintSetupDialog, sPrinterModeHoverOverString, "Info for \"Use Windows Print\"", JOptionPane.INFORMATION_MESSAGE); } }); @@ -288,30 +279,16 @@ mIsPclPrinterJCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (mIsPclPrinterJCheckBox.isSelected()) { - mShrinkLegalToFitOnLetterJCheckBox.setEnabled(true); + mAllOnLetterShrinkLegalJRadioButton.setEnabled(true); } else { - mShrinkLegalToFitOnLetterJCheckBox.setSelected(false); - mShrinkLegalToFitOnLetterJCheckBox.setEnabled(false); + if (mAllOnLetterShrinkLegalJRadioButton.isSelected()) { + mPrintOrderAsDisplayedOrSelectedJRadioButton.setSelected(true); + } + mAllOnLetterShrinkLegalJRadioButton.setEnabled(false); } } }); - mShrinkLegalToFitOnLetterJCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (mShrinkLegalToFitOnLetterJCheckBox.isSelected()) { - mPrintAllOnLegalSizeJCheckBox.setSelected(false); - } - } - }); - - mPrintAllOnLegalSizeJCheckBox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - if (mPrintAllOnLegalSizeJCheckBox.isSelected()) { - mShrinkLegalToFitOnLetterJCheckBox.setSelected(false); - } - } - }); - // mFontSizeDinkyJButton.addActionListener(new ActionListener() { // public void actionPerformed(ActionEvent e) { // mFontSizeDinkyJButton.setText("*D*"); @@ -415,12 +392,22 @@ adjustFontOnDialogItems(mAdjustToSmallFont); putPrintChoicesOnScreen(); setHoverHelpOnItems(); - grayOutItemsNotImplemented(); - grayOutShrinkToLetterOrForceLegalCheckBoxes(); + checkforGrayOutShrinkToLetter(); // Make dialog box outer frame width and height exactly to be all item's preferred sizes pack(); } + private void checkforGrayOutShrinkToLetter() { + if (mIsPclPrinterJCheckBox.isSelected()) { + mAllOnLetterShrinkLegalJRadioButton.setEnabled(true); + } else { + if (mAllOnLetterShrinkLegalJRadioButton.isSelected()) { + mPrintOrderAsDisplayedOrSelectedJRadioButton.setSelected(true); + } + mAllOnLetterShrinkLegalJRadioButton.setEnabled(false); + } + } + private JPanel makeListOfPrintersPanel() { JPanel panel = new JPanel(); double tloGridSpec[][] = new double[][] {{mTloHgap, mTloFill, mTloHgap }, {mTloFill, mTloVgap }}; @@ -462,57 +449,59 @@ return panel; } - private JPanel makePrintBarCodesPanel() { + private JPanel makePaperSizePanel() { JPanel panel = new JPanel(); - double tloGridSpec[][] = new double[][] {{ mTloHgap, mTloPref, mTloFill }, { mTloPref, mTloVgap, mTloPref }}; + int tTextHeight = mPrintOrderAsDisplayedOrSelectedJRadioButton.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(mPrintBarCodesYesJRadioButton); - buttonGroup.add(mPrintBarCodesNoJRadioButton); - panel.add(mPrintBarCodesYesJRadioButton, "1, 0"); - panel.add(mPrintBarCodesNoJRadioButton, "1, 2"); - return panel; - } - - private JPanel makePrintOrderPanel() { - JPanel panel = new JPanel(); - double tloGridSpec[][] = new double[][] {{ mTloHgap, mTloPref, mTloFill }, { mTloPref, mTloPref, mTloPref }}; - TableLayout tloLayout = new TableLayout(tloGridSpec); - panel.setLayout(tloLayout); - ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(mPrintOrderAsDisplayedOrSelectedJRadioButton); buttonGroup.add(mPrintOrderLegalFirstThenLetterJRadioButton); buttonGroup.add(mPrintOrderLetterFirstThenLegalJRadioButton); - panel.add(mPrintOrderAsDisplayedOrSelectedJRadioButton, "1, 0"); - panel.add(mPrintOrderLegalFirstThenLetterJRadioButton, "1, 1"); - panel.add(mPrintOrderLetterFirstThenLegalJRadioButton, "1, 2"); + buttonGroup.add(mAllOnLegalJRadioButton); + buttonGroup.add(mAllOnLetterShrinkLegalJRadioButton); + + 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"); + return panel; } private JPanel makePrintFormNamesPanel() { JPanel panel = new JPanel(); - double tloGridSpec[][] = new double[][] {{ mTloHgap, mTloPref, mTloFill }, { mTloPref, mTloVgap, mTloPref }}; + int tTextHeight = mPrintOrderAsDisplayedOrSelectedJRadioButton.getPreferredSize().height - 6; + double tloGridSpec[][] = new double[][] {{ mTloPref }, { tTextHeight, tTextHeight }}; TableLayout tloLayout = new TableLayout(tloGridSpec); panel.setLayout(tloLayout); + ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(mPrintFormNamesYesJRadioButton); buttonGroup.add(mPrintFormNamesNoJRadioButton); - panel.add(mPrintFormNamesYesJRadioButton, "1, 0"); - panel.add(mPrintFormNamesNoJRadioButton, "1, 2"); + + panel.add(makeFillerOnRightPanel(mPrintFormNamesYesJRadioButton), "0, 0"); + panel.add(makeFillerOnRightPanel(mPrintFormNamesNoJRadioButton), "0, 1"); return panel; } private JPanel makeDuplexPanel() { JPanel panel = new JPanel(); - double tloGridSpec[][] = new double[][] {{ mTloHgap, mTloPref, mTloFill }, { mTloPref, mTloVgap, mTloPref }}; + int tTextHeight = mPrintOrderAsDisplayedOrSelectedJRadioButton.getPreferredSize().height - 6; + double tloGridSpec[][] = new double[][] {{ mTloPref }, { tTextHeight, tTextHeight }}; TableLayout tloLayout = new TableLayout(tloGridSpec); panel.setLayout(tloLayout); + ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(mDuplexYesJRadioButton); buttonGroup.add(mDuplexNoJRadioButton); - panel.add(mDuplexYesJRadioButton, "1, 0"); - panel.add(mDuplexNoJRadioButton, "1, 2"); + + panel.add(makeFillerOnRightPanel(mDuplexYesJRadioButton), "0, 0"); + panel.add(makeFillerOnRightPanel(mDuplexNoJRadioButton), "0, 1"); return panel; } @@ -547,36 +536,20 @@ } private JPanel makeFillerOnRightPanel(JComponent pJc) { - JPanel panel = new JPanel(); - double tloGridSpec[][] = new double[][] {{mTloPref, mTloFill}, { mTloPref }}; - TableLayout tloLayout = new TableLayout(tloGridSpec); - panel.setLayout(tloLayout); - panel.add(pJc,"0,0"); - return panel; + JPanel panel1 = new JPanel(); + JPanel panel2 = new JPanel(); + panel1.setBorder(BorderFactory.createEmptyBorder()); + panel2.setBorder(BorderFactory.createEmptyBorder()); + panel2.setPreferredSize(new Dimension(0,0)); + panel1.setLayout(new BorderLayout(0,0)); + panel1.add(pJc, BorderLayout.WEST); + panel1.add(panel2, BorderLayout.CENTER); + return panel1; } - - private void grayOutShrinkToLetterOrForceLegalCheckBoxes() { - if (mIsPclPrinterJCheckBox.isSelected()) { - mShrinkLegalToFitOnLetterJCheckBox.setEnabled(true); - } else { - mShrinkLegalToFitOnLetterJCheckBox.setSelected(false); - mShrinkLegalToFitOnLetterJCheckBox.setEnabled(false); - } - - if (mShrinkLegalToFitOnLetterJCheckBox.isSelected()) { - mPrintAllOnLegalSizeJCheckBox.setSelected(false); - } - - if (mPrintAllOnLegalSizeJCheckBox.isSelected()) { - mShrinkLegalToFitOnLetterJCheckBox.setSelected(false); - } - } private void putPrintChoicesOnScreen() { mAddlCopiesJTextField.setText(Integer.toString(mPrintChoices.getNumAdditionalCopies())); mIsPclPrinterJCheckBox.setSelected(!(mPrintChoices.isPrintFormatPclDirect())); - mPrintBarCodesYesJRadioButton.setSelected(mPrintChoices.shouldPrintBarCodes()); - mPrintBarCodesNoJRadioButton.setSelected( !(mPrintChoices.shouldPrintBarCodes()) ); mPrintOrderAsDisplayedOrSelectedJRadioButton.setSelected(mPrintChoices.isPrintOrderAsDisplayedOrSelected()); mPrintOrderLegalFirstThenLetterJRadioButton.setSelected(mPrintChoices.isPrintOrderLegalFirstThenLetter()); mPrintOrderLetterFirstThenLegalJRadioButton.setSelected(mPrintChoices.isPrintOrderLetterFirstThenLegal()); @@ -584,8 +557,8 @@ mPrintFormNamesNoJRadioButton.setSelected( !(mPrintChoices.shouldPrintFormNames()) ); mDuplexYesJRadioButton.setSelected(mPrintChoices.shouldDuplex()); mDuplexNoJRadioButton.setSelected( !(mPrintChoices.shouldDuplex()) ); - mShrinkLegalToFitOnLetterJCheckBox.setSelected(mPrintChoices.shouldShrinkLegalToFitOnLetter()); - mPrintAllOnLegalSizeJCheckBox.setSelected(mPrintChoices.shouldPrintAllOnLegalSize()); + mAllOnLetterShrinkLegalJRadioButton.setSelected(mPrintChoices.shouldShrinkLegalToFitOnLetter()); + mAllOnLegalJRadioButton.setSelected(mPrintChoices.shouldPrintAllOnLegalSize()); } private void getPrintChoicesFromScreen() { @@ -610,9 +583,6 @@ mPrintChoices.setPrintFormatIsPclDirect(); } - // Print bar codes - mPrintChoices.setShouldPrintBarCodes(mPrintBarCodesYesJRadioButton.isSelected()); - // Print order if (mPrintOrderAsDisplayedOrSelectedJRadioButton.isSelected()) { mPrintChoices.setPrintOrderAsDisplayedOrSelected(); @@ -622,28 +592,27 @@ mPrintChoices.setPrintOrderLetterFirstThenLegal(); } + // 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()); // Duplex mPrintChoices.setShouldDuplex(mDuplexYesJRadioButton.isSelected()); - // Shrink All Legal Pages to Fit On Letter - mPrintChoices.setShouldShrinkLegalToFitOnLetter(mShrinkLegalToFitOnLetterJCheckBox.isSelected()); - - // Print all on legal size - mPrintChoices.setShouldPrintAllOnLegalSize(mPrintAllOnLegalSizeJCheckBox.isSelected()); } private void makeArrayListOfDialogItems() { mItemsOnDialogBox.add(mListOfPrintersJList); mItemsOnDialogBox.add(mIsPclPrinterJCheckBox); - mItemsOnDialogBox.add(mShrinkLegalToFitOnLetterJCheckBox); - mItemsOnDialogBox.add(mPrintAllOnLegalSizeJCheckBox); + mItemsOnDialogBox.add(mAllOnLetterShrinkLegalJRadioButton); + mItemsOnDialogBox.add(mAllOnLegalJRadioButton); mItemsOnDialogBox.add(mAddlCopiesJLabel); mItemsOnDialogBox.add(mAddlCopiesJTextField); - mItemsOnDialogBox.add(mPrintBarCodesYesJRadioButton); - mItemsOnDialogBox.add(mPrintBarCodesNoJRadioButton); mItemsOnDialogBox.add(mPrintOrderAsDisplayedOrSelectedJRadioButton); mItemsOnDialogBox.add(mPrintOrderLegalFirstThenLetterJRadioButton); mItemsOnDialogBox.add(mPrintOrderLetterFirstThenLegalJRadioButton); @@ -691,8 +660,7 @@ mListOfPrintersJPanel.setBorder(generateTitledBorder("Printers")); mWindowsPrintOrPclPrintJPanel.setBorder(BorderFactory.createEmptyBorder()); mAddlCopiesJPanel.setBorder(BorderFactory.createEmptyBorder()); - mPrintBarCodesJPanel.setBorder(generateTitledBorder("Print Bar Codes")); - mPrintOrderJPanel.setBorder(generateTitledBorder("Print Order")); + mPaperSizeJPanel.setBorder(generateTitledBorder("Paper Size")); mPrintFormNamesJPanel.setBorder(generateTitledBorder("Print Form Names")); mDuplexJPanel.setBorder(generateTitledBorder("Duplex")); } @@ -770,28 +738,21 @@ private void setHoverHelpOnItems() { mIsPclPrinterJCheckBox.setToolTipText(sPrinterModeHoverOverString); - mShrinkLegalToFitOnLetterJCheckBox.setToolTipText( - "Shrink Legal pages to Letter not available if \"Use Windows Print\" is unchecked"); mAddlCopiesJTextField.setToolTipText("Allowed values are 0 to 3 additional copies"); - mPrintAllOnLegalSizeJCheckBox.setToolTipText("Make all pages print on Legal paper"); - mPrintBarCodesYesJRadioButton.setToolTipText(sBarCodeHoverString); - mPrintBarCodesNoJRadioButton.setToolTipText(sBarCodeHoverString); + mAllOnLegalJRadioButton.setToolTipText("Print all pages on Legal paper"); + mAllOnLetterShrinkLegalJRadioButton.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(sNotImplementedString + "Print Legal first then Letter"); - mPrintOrderLetterFirstThenLegalJRadioButton.setToolTipText(sNotImplementedString + "Print Letter first then Legal"); - mPrintFormNamesYesJRadioButton.setToolTipText(sNotImplementedString + "Print form names"); + 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"); - mDuplexYesJRadioButton.setToolTipText(sNotImplementedString + "Duplex pages"); + mDuplexYesJRadioButton.setToolTipText("Duplex pages"); mDuplexNoJRadioButton.setToolTipText("Don't duplex pages"); } - private void grayOutItemsNotImplemented() { - mPrintBarCodesYesJRadioButton.setEnabled(false); - mPrintFormNamesYesJRadioButton.setEnabled(false); - mDuplexYesJRadioButton.setEnabled(false); - } - public class DialogWindowListener implements WindowListener { public void windowOpened(WindowEvent e) { } @@ -826,14 +787,14 @@ try { tAddlCopiesInt = Integer.parseInt(tAddlCopiesString); } catch (NumberFormatException nfe) { - JOptionPane.showMessageDialog(mParentFrame, tUserInputNumberRequiredString, + JOptionPane.showMessageDialog(mThisPosPrintSetupDialog, tUserInputNumberRequiredString, tUserInputTitleString, JOptionPane.INFORMATION_MESSAGE); // returning true means the screen didn't pass user input validation return true; } if (tAddlCopiesInt < 0 || tAddlCopiesInt > 3) { - JOptionPane.showMessageDialog(mParentFrame, tUserInputValidRange0to3String, + JOptionPane.showMessageDialog(mThisPosPrintSetupDialog, tUserInputValidRange0to3String, tUserInputTitleString, JOptionPane.INFORMATION_MESSAGE); // returning true means the screen didn't pass user input validation return true; Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java 2007-07-16 21:46:41 UTC (rev 108) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialogChoices.java 2007-07-17 01:53:21 UTC (rev 109) @@ -8,18 +8,17 @@ */ public class PosPrintSetupDialogChoices { - private final int mPrintFormatIsPclDirect = 1; - private final int mPrintFormatIsGdiDriver = 2; + public static final int mPrintFormatIsPclDirect = 1; + public static final int mPrintFormatIsGdiDriver = 2; - private final int mPrintOrderAsDisplayedOrSelected = 1; - private final int mPrintOrderLegalFirstThenLetter = 2; - private final int mPrintOrderLetterFirstThenLegal = 3; + public static final int mPrintOrderAsDisplayedOrSelected = 1; + public static final int mPrintOrderLegalFirstThenLetter = 2; + public static final int mPrintOrderLetterFirstThenLegal = 3; // 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 boolean mShouldPrintBarCodes = false; private int mPrintOrder = mPrintOrderAsDisplayedOrSelected; private boolean mShouldPrintFormNames = false; private boolean mShouldDuplex = false; @@ -45,9 +44,6 @@ public boolean isPrintFormatGdiDriver() { return (mPrintFormat == mPrintFormatIsGdiDriver); } - public boolean shouldPrintBarCodes() { - return mShouldPrintBarCodes; - } public boolean isPrintOrderAsDisplayedOrSelected() { return (mPrintOrder == mPrintOrderAsDisplayedOrSelected); } @@ -86,9 +82,6 @@ public void setPrintFormatIsGdiDriver() { mPrintFormat = mPrintFormatIsGdiDriver; } - public void setShouldPrintBarCodes(boolean yesOrNo) { - mShouldPrintBarCodes = yesOrNo; - } public void setPrintOrderAsDisplayedOrSelected() { mPrintOrder = mPrintOrderAsDisplayedOrSelected; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |