From: <doc...@us...> - 2007-06-21 19:38:33
|
Revision: 92 http://openpcl.svn.sourceforge.net/openpcl/?rev=92&view=rev Author: documentsystems Date: 2007-06-21 12:38:33 -0700 (Thu, 21 Jun 2007) Log Message: ----------- Howard Hoagland. Added a "More Info" button to the right of the "Use Windows Print (recommended)" check box. When the user clicks the "More Info" button, a popup dialog has the info text. For now, this same info text is also the hover help text over the checkbox but can be removed from hover help if that is decided to do. 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-06-21 18:43:40 UTC (rev 91) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-06-21 19:38:33 UTC (rev 92) @@ -49,6 +49,7 @@ import javax.swing.event.ListSelectionListener; import com.openpcl.pclrenderimage.util.PriDebug; +import com.openpcl.viewer.dialogs.PosHtmlViewerButtonChoicesDialog; import com.openpcl.viewer.options.PosStartupOptions; import com.openpcl.viewer.panels.PosView; @@ -67,7 +68,7 @@ private double mTloVgap = 5; private String mSelectedPageNumbers = null; private JDialog mAdvancedOptionsJDialog = null; - private JButton mAdvancedOptionsOkJButton = null; + private PosHtmlViewerButtonChoicesDialog mPrintModeMoreInfoDialog = null; // Adjust to fonts private final Font mAdjustToSmallFont = getFont(); @@ -141,6 +142,8 @@ private JButton mCancelJButton = new JButton("Cancel"); private JButton mOpenJDKPrintDialogJButton = new JButton("Open JDK Print Dialog"); private JButton mAdvancedOptionsJButton = new JButton("Advanced Options"); + private JButton mAdvancedOptionsOkJButton = null; + private JButton mPrintModeMoreInfoJButton = new JButton("More Info"); // JCheckBoxes private JCheckBox mIsPclPrinterJCheckBox = new JCheckBox("Use Windows Print (recommended)"); @@ -262,11 +265,6 @@ tJPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); tJPanel.add("1, 1, 2, 1", mPageNumbersThatWillPrintJScrollPane); mAdvancedOptionsOkJButton = new JButton("OK"); - mAdvancedOptionsOkJButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent pE) { - mAdvancedOptionsJDialog.setVisible(false); - } - }); tJPanel.add("2, 3", mAdvancedOptionsOkJButton); mAdvancedOptionsJDialog.setContentPane(tJPanel); mAdvancedOptionsJDialog.setSize(400, 280); @@ -299,6 +297,12 @@ add(mTab1, "1, 2"); add(mBottomButtonsJPanel, "1, 4"); + mPrintModeMoreInfoDialog = new PosHtmlViewerButtonChoicesDialog(mPosView.getOpenPCLViewer().getAppFrame(), + "More Info Windows Print check box", true); + mPrintModeMoreInfoDialog.setHtmlPanelAndButtons(sPrinterSupportsNotesString, new String[] {"OK"}); + mPrintModeMoreInfoDialog.pack(); + mPrintModeMoreInfoDialog.setSize(620, 360); + // ActionListeners mFontSizeDinkyJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -355,6 +359,19 @@ } }); + mAdvancedOptionsOkJButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent pE) { + mAdvancedOptionsJDialog.setVisible(false); + } + }); + + mPrintModeMoreInfoJButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent pE) { + mPrintModeMoreInfoDialog.setLocationRelativeTo(mPosView.getOpenPCLViewer().getAppFrame()); + mPrintModeMoreInfoDialog.setVisible(true); + } + }); + mOKJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { getPrintChoicesFromScreen(); @@ -430,11 +447,12 @@ private JPanel makePrintAsPclPanel() { JPanel panel = new JPanel(); - double tloGridSpec[][] = new double[][] {{ mTloHgap, 20, mTloPref, mTloFill, mTloHgap }, - { mTloPref, mTloPref, mTloVgap }}; + double tloGridSpec[][] = new double[][] {{ mTloPref, 5, mTloPref, mTloFill}, + { mTloPref}}; TableLayout tloLayout = new TableLayout(tloGridSpec); panel.setLayout(tloLayout); - panel.add(mIsPclPrinterJCheckBox," 1, 0, 2, 0"); + panel.add(mIsPclPrinterJCheckBox, " 0, 0"); + panel.add(mPrintModeMoreInfoJButton, "2,0"); // panel.add(mPrinterSupportsPclJScrollPane," 2, 1"); return panel; } @@ -587,6 +605,7 @@ mItemsOnDialogBox.add(mFontSizeJLabel); mItemsOnDialogBox.add(mAddlCopiesJTextField); mItemsOnDialogBox.add(mIsPclPrinterJCheckBox); + mItemsOnDialogBox.add(mPrintModeMoreInfoJButton); mItemsOnDialogBox.add(mPrintBarCodesYesJRadioButton); mItemsOnDialogBox.add(mPrintBarCodesNoJRadioButton); mItemsOnDialogBox.add(mPrintOrderAsDisplayedOrSelectedJRadioButton); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |