You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(19) |
Jul
(39) |
Aug
(30) |
Sep
(14) |
Oct
(4) |
Nov
(12) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(2) |
2009 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <doc...@us...> - 2007-06-05 01:00:45
|
Revision: 80 http://openpcl.svn.sourceforge.net/openpcl/?rev=80&view=rev Author: documentsystems Date: 2007-06-04 18:00:47 -0700 (Mon, 04 Jun 2007) Log Message: ----------- Howard Hoagland. In applySelectedLookAndFeel(), made the redraw of tree node names happen to all open views instead of the currently selected view only. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java Modified: openpcl/src/com/openpcl/viewer/OpenPCLViewer.java =================================================================== --- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-06-04 23:42:37 UTC (rev 79) +++ openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-06-05 01:00:47 UTC (rev 80) @@ -936,8 +936,6 @@ * Subclass plugins override this method so do not delete or rename this method. */ public void applySelectedLookAndFeel() { SwingUtilities.updateComponentTreeUI(mParentFrame); - // Re-draw node names on the tree because sometimes node names have ... and the last 5 to 10 chars chopped off - SwingUtilities.updateComponentTreeUI(mPosViewSelected.getPosTree().getPagesJTree()); SwingUtilities.updateComponentTreeUI(mPosPrintChoicesPopupDialog); SwingUtilities.updateComponentTreeUI(mPosZoomPopupDialog); SwingUtilities.updateComponentTreeUI(mPosChangeTheLookPopupDialog); @@ -945,6 +943,15 @@ SwingUtilities.updateComponentTreeUI(mPosHelpChoicesPopupDialog); SwingUtilities.updateComponentTreeUI(mLicenseInfoDialog); SwingUtilities.updateComponentTreeUI(mHelpAboutDialog); + + if (mPosViewArray != null && mPosViewArray.length > 0) { + for (PosView tPosView : mPosViewArray) { + // Re-draw node names on all the opened file trees because sometimes node names have the last 5 to 10 chars chopped off + if (tPosView != null) { + SwingUtilities.updateComponentTreeUI(tPosView.getPosTree().getPagesJTree()); + } + } + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-06-04 23:42:36
|
Revision: 79 http://openpcl.svn.sourceforge.net/openpcl/?rev=79&view=rev Author: documentsystems Date: 2007-06-04 16:42:37 -0700 (Mon, 04 Jun 2007) Log Message: ----------- Howard Hoagland. 1. Re-draw node names on the tree because sometimes node names have ... and the last 5 to 10 chars chopped off. 2. Upon adding each node to the tree, set the PCL bytes paper size in the tree PosTreeNode. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java openpcl/src/com/openpcl/viewer/panels/PosView.java openpcl/src/com/openpcl/viewer/tree/PosTree.java openpcl/src/com/openpcl/viewer/tree/PosTreeNode.java Modified: openpcl/src/com/openpcl/viewer/OpenPCLViewer.java =================================================================== --- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-06-02 00:25:06 UTC (rev 78) +++ openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-06-04 23:42:37 UTC (rev 79) @@ -936,6 +936,8 @@ * Subclass plugins override this method so do not delete or rename this method. */ public void applySelectedLookAndFeel() { SwingUtilities.updateComponentTreeUI(mParentFrame); + // Re-draw node names on the tree because sometimes node names have ... and the last 5 to 10 chars chopped off + SwingUtilities.updateComponentTreeUI(mPosViewSelected.getPosTree().getPagesJTree()); SwingUtilities.updateComponentTreeUI(mPosPrintChoicesPopupDialog); SwingUtilities.updateComponentTreeUI(mPosZoomPopupDialog); SwingUtilities.updateComponentTreeUI(mPosChangeTheLookPopupDialog); @@ -1400,11 +1402,15 @@ for (int i = 0; i < tNumPages; i++) { // Add node to the tree for this viewable page. The page number is 1 based while the ArrayList is 0 based, so add 1 here - mPosViewSelected.getPosTree().makePclPageTreeNode(i + 1); + PosTreeNode tPosTreeNode =mPosViewSelected.getPosTree().makePclPageTreeNode(i + 1); + tPosTreeNode.setPaperSize(getPaperSizeForPage(i + 1)); } // Signal new view is shown so if it's the first view open then it ungrays out buttons in the toolbar mPosManageToolBar.setAViewIsOpen(); + + // Re-draw node names on the tree because sometimes node names have ... and the last 5 to 10 chars chopped off + SwingUtilities.updateComponentTreeUI(mPosViewSelected.getPosTree().getPagesJTree()); return null; // If no error then it returns a null String } Modified: openpcl/src/com/openpcl/viewer/panels/PosView.java =================================================================== --- openpcl/src/com/openpcl/viewer/panels/PosView.java 2007-06-02 00:25:06 UTC (rev 78) +++ openpcl/src/com/openpcl/viewer/panels/PosView.java 2007-06-04 23:42:37 UTC (rev 79) @@ -62,7 +62,7 @@ private MouseWheelListener[] mMouseWheelListeners = null; // Splitter divider default location - public static final int sDefaultSplitterLocPclFiles = 110; + public static final int sDefaultSplitterLocPclFiles = 150; public static final int sTreatSplitterAsClosedIfLessThan = 10; private int mPixelLocForSplitter = 0; Modified: openpcl/src/com/openpcl/viewer/tree/PosTree.java =================================================================== --- openpcl/src/com/openpcl/viewer/tree/PosTree.java 2007-06-02 00:25:06 UTC (rev 78) +++ openpcl/src/com/openpcl/viewer/tree/PosTree.java 2007-06-04 23:42:37 UTC (rev 79) @@ -16,6 +16,7 @@ import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.JTree; +import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; @@ -196,8 +197,8 @@ * If a 1 page PCL file, then there will end up 1 node saying "Page 1". * else, if a multi page PCL file, then there will be several nodes saying "Page 1", then "Page 2", "Page 3" */ - public void makePclPageTreeNode(int pPageNumber) { - if (mPagesJTree == null) { return; } + public PosTreeNode makePclPageTreeNode(int pPageNumber) { + if (mPagesJTree == null) { return null; } // Put the PCL page as the user object in the tree node PosTreeNode tPosTreeNode = new PosTreeNode(null, pPageNumber, null); tPosTreeNode.setPclBytes(null); // If the Pcl bytes of this pages is needed later, they can be gotten later @@ -206,6 +207,7 @@ // Add to tree under the root node addChildNodeToTree(child, getTreeNodeRoot(), true); + return tPosTreeNode; } /** Modified: openpcl/src/com/openpcl/viewer/tree/PosTreeNode.java =================================================================== --- openpcl/src/com/openpcl/viewer/tree/PosTreeNode.java 2007-06-02 00:25:06 UTC (rev 78) +++ openpcl/src/com/openpcl/viewer/tree/PosTreeNode.java 2007-06-04 23:42:37 UTC (rev 79) @@ -64,7 +64,13 @@ // toString() here is used to show on the screen the name of the node public String toString() { // This is a Pcl file page node - return mNodeName; + if (mRootNodeName == null) { + String tPaperSize = "Legal"; + if (getPaperSize().equalsIgnoreCase("LTR")) { tPaperSize = "Letter"; } + return mNodeName + " (" + tPaperSize + ")"; + } else { + return mNodeName; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-06-02 00:25:04
|
Revision: 78 http://openpcl.svn.sourceforge.net/openpcl/?rev=78&view=rev Author: documentsystems Date: 2007-06-01 17:25:06 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Howard Hoagland. 1. Improved error dialog messages for Print All, Selected, Changed, Remaining for when the user didn't left click on any tree nodes to select one or more pages, and for when no changed nodes were found. 2. Changed wording on Print Setup Dialog to say "Index numbers that will print" instead of "Page numbers that wll print" because some tree structures where the page numbers are not the same as the index numbers of the selected tree nodes to print. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java 2007-06-01 22:02:30 UTC (rev 77) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java 2007-06-02 00:25:06 UTC (rev 78) @@ -4,6 +4,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Font; +import java.awt.Frame; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; import java.io.ByteArrayInputStream; @@ -44,6 +45,7 @@ public class PosPrintPages { private PosView mPosView = null; + private Frame mParentFrame = null; private PosPrintBufferedImage mPosPrintBufferedImage = null; private PosPrintPageableInterface mPosPrintPageableInterface = null; private PrinterJob mPrinterJob = null; @@ -74,6 +76,7 @@ public PosPrintPages(PosView pPosView) { super(); mPosView = pPosView; + mParentFrame = mPosView.getOpenPCLViewer().getAppFrame(); mPosPrintBufferedImage = new PosPrintBufferedImage(mPosView); mPosPrintPageableInterface = new PosPrintPageableInterface(mPosView); mAttributes = new HashPrintRequestAttributeSet(); @@ -90,7 +93,7 @@ tJPanel.setLayout(new BorderLayout()); tJPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); tJPanel.add(mPrintingProgressBar, BorderLayout.CENTER); - mPrintingProgressJDialog = new JDialog(mPosView.getOpenPCLViewer().getAppFrame(), "Print Progress", true); + mPrintingProgressJDialog = new JDialog(mParentFrame, "Print Progress", true); mPrintingProgressJDialog.setLayout(new BorderLayout()); mPrintingProgressJDialog.add(tJPanel, BorderLayout.CENTER); mPrintingProgressJDialog.pack(); @@ -143,10 +146,33 @@ } if (mPagesToPrintArrayList == null || mPagesToPrintArrayList.size() < 1) { - JOptionPane.showMessageDialog(mPosView.getOpenPCLViewer().getAppFrame(), - "No pages matched for \"" + mTitleBarTextForPrintDialog[pProcessPrintType] + "\".", - "No pages matched", JOptionPane.INFORMATION_MESSAGE); + // Set not in printing mode mPosView.getOpenPCLViewer().setIsDrawingForPrinting(false); + + // Show error dialog depending on if print all, print selected, print changed, print remaining. + switch (pProcessPrintType) { + case sProcessPrintAll: + JOptionPane.showMessageDialog(mParentFrame, "Can't \"" + mTitleBarTextForPrintDialog[pProcessPrintType] + + "\" because no pages found to print", + "No pages to print", JOptionPane.INFORMATION_MESSAGE); + break; + case sProcessPrintSelected: + JOptionPane.showMessageDialog(mParentFrame, "Can't \"" + mTitleBarTextForPrintDialog[pProcessPrintType] + + "\" because you need to Left Click on the tree to select one or more pages.", + "No pages to print", JOptionPane.INFORMATION_MESSAGE); + break; + case sProcessPrintChanged: + JOptionPane.showMessageDialog(mParentFrame, "Can't \"" + mTitleBarTextForPrintDialog[pProcessPrintType] + + "\" because no changed pages were found.", + "No pages to print", JOptionPane.INFORMATION_MESSAGE); + break; + case sProcessPrintRemaining: + JOptionPane.showMessageDialog(mParentFrame, "Can't \"" + mTitleBarTextForPrintDialog[pProcessPrintType] + + "\" because you need to Left Click on the tree to select one or more pages.", + "No pages to print", JOptionPane.INFORMATION_MESSAGE); + break; + } + return false; } @@ -155,9 +181,9 @@ // Append all the selected page numbers to the StringBuffer tStringBuffer.append(" " + tNumberOfPagesThatWillPrint + " page"); if (tNumberOfPagesThatWillPrint == 1) { - tStringBuffer.append(". Page number: "); + tStringBuffer.append(". Index number: "); } else { - tStringBuffer.append("s. Page numbers are: "); + tStringBuffer.append("s. Index numbers are: "); } for (int i = 0; i < tNumberOfPagesThatWillPrint; i++) { @@ -178,7 +204,7 @@ mPosPrintSetupDialog = new PosPrintSetupDialog(mPosView, tDialogTitleBarString, mPosPrintSetupDialogChoices, mAttributes, mPrinterJob, tStringBuffer.toString()); - mPosPrintSetupDialog.setLocationRelativeTo(mPosView.getOpenPCLViewer().getAppFrame()); + mPosPrintSetupDialog.setLocationRelativeTo(mParentFrame); mPosPrintSetupDialog.setVisible(true); if ( !(mPosPrintSetupDialogChoices.getDidUserHitOk()) ) { @@ -190,7 +216,7 @@ // If user didn't pick a printer then put up dialog and return mPrintService = mPosPrintSetupDialogChoices.getSelectedPrintService(); if ( mPrintService == null) { - JOptionPane.showMessageDialog(mPosView.getOpenPCLViewer().getAppFrame(), "A printer was not selected.\n" + + JOptionPane.showMessageDialog(mParentFrame, "A printer was not selected.\n" + "Try again and click on a printer.", "Printer not selected", JOptionPane.ERROR_MESSAGE); @@ -201,7 +227,7 @@ mPrintingProgressBar.setMaximum(tNumberOfPagesThatWillPrint); mPrintingProgressBar.setString("Initializing..."); mPrintingProgressBar.setValue(0); - mPrintingProgressJDialog.setLocationRelativeTo(mPosView.getOpenPCLViewer().getAppFrame()); + mPrintingProgressJDialog.setLocationRelativeTo(mParentFrame); final SwingWorker threadShowProgressBar = new SwingWorker() { public Object construct() { @@ -231,7 +257,7 @@ mPosView.getOpenPCLViewer().setIsDrawingForPrinting(false); mPosView.getOpenPCLViewer().renderImageCurrentPageAndZoom(); JOptionPane.showMessageDialog(mPrintingProgressJDialog, - mPosView.getOpenPCLViewer().getAppName() + "\nFinished printing " + + mParentFrame + "\nFinished printing " + mPagesToPrintArrayList.size() + " page" + (mPagesToPrintArrayList.size() > 1 ? "s." : "."), "Finished Printing", JOptionPane.INFORMATION_MESSAGE); mPrintingProgressJDialog.setVisible(false); @@ -406,7 +432,7 @@ mPosPrintSetupDialogChoices, mAttributes, mPrinterJob, "No pages will print at this time because this is Printer Setup options only. Make sure to hit OK to save your changes."); - mPosPrintSetupDialog.setLocationRelativeTo(mPosView.getOpenPCLViewer().getAppFrame()); + mPosPrintSetupDialog.setLocationRelativeTo(mParentFrame); mPosPrintSetupDialog.setVisible(true); boolean userHitOk = mPosPrintSetupDialogChoices.getDidUserHitOk(); Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-06-01 22:02:30 UTC (rev 77) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-06-02 00:25:06 UTC (rev 78) @@ -105,7 +105,7 @@ // JLabels private JLabel mAddlCopiesJLabel = new JLabel("Additional Copies: "); private JLabel mFontSizeJLabel = new JLabel("Font size: "); - private JLabel mPageNumbersThatWillPrintJLabel = new JLabel("Page numbers that will print:"); + private JLabel mPageNumbersThatWillPrintJLabel = new JLabel("Index numbers that will print:"); // JTextFields private JTextField mAddlCopiesJTextField = new JTextField(3); @@ -222,7 +222,7 @@ // Add the tab panels to the JTabbedPane mJTabbedPane.add(mTab1, "View Specific"); - mJTabbedPane.add(mTab2, "Page Numbers That Will Print"); + mJTabbedPane.add(mTab2, "Index Numbers That Will Print"); mJTabbedPane.add(mTab3, "Generic Properties"); // Add the Control Panel, JTabbedPane, and buttons panel to the contentPane This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-06-01 22:02:29
|
Revision: 77 http://openpcl.svn.sourceforge.net/openpcl/?rev=77&view=rev Author: documentsystems Date: 2007-06-01 15:02:30 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Howard Hoagland. Fixed bug: If the tree root node is the one currently selected, then "Print Remaining" would include the tree root node in the list of pages to print. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/printing/PosBuildListOfPagesToPrint.java Modified: openpcl/src/com/openpcl/viewer/printing/PosBuildListOfPagesToPrint.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosBuildListOfPagesToPrint.java 2007-05-31 23:58:49 UTC (rev 76) +++ openpcl/src/com/openpcl/viewer/printing/PosBuildListOfPagesToPrint.java 2007-06-01 22:02:30 UTC (rev 77) @@ -180,8 +180,11 @@ // that are in the same tree path branch causing nodes to be selected 2 or 3 times via the borrower // node was selected and the document node was selected and also the page node was selected. if ( !(pPagesToPrintArrayList.contains(eachPosTreeNode)) ) { - // then save this viewable page in the print ArrayList - pPagesToPrintArrayList.add(eachPosTreeNode); + // Don't include the root tree node + if (eachPosTreeNode.getNodeNumber() > 0) { + // then save this viewable page in the print ArrayList + pPagesToPrintArrayList.add(eachPosTreeNode); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-05-31 23:58:49
|
Revision: 76 http://openpcl.svn.sourceforge.net/openpcl/?rev=76&view=rev Author: documentsystems Date: 2007-05-31 16:58:49 -0700 (Thu, 31 May 2007) Log Message: ----------- Howrard Hoagland. 1. In the event listeners for the right click tree node pop up menu, added a call to the same code that the toolbar executes to do Print All/Selected/Remaining. 2. Added 5 methods and event handling code in PosTree for vmTree to get and clear the right clicked TreePath and node object. 3. Fixed a the bug where View Selected didn't view if one of the 3 prints were clicked on before that. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java openpcl/src/com/openpcl/viewer/tree/PosTree.java Modified: openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java =================================================================== --- openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java 2007-05-30 22:57:59 UTC (rev 75) +++ openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java 2007-05-31 23:58:49 UTC (rev 76) @@ -1,7 +1,10 @@ package com.openpcl.viewer.api; import javax.swing.JPopupMenu; +import javax.swing.tree.TreePath; +import com.openpcl.viewer.tree.PosTreeNode; + /** * The methods in this interface are designed to be overridden by a subclass of PosTree * that is a plugin that adds additional features. @@ -12,8 +15,23 @@ * @author DocMagic, Document Systems Inc, HowardH. 5/29/07 */ public interface IPluginHooksPosTree { - /** - * Build the JPopupMenu to show when the user right clicks on tree nodes.<br> + + /** Get the left clicked PosTreeNode. */ + public PosTreeNode getClickedNode(); + + /** Get the right clicked PosTreeNode. */ + public PosTreeNode getRightClickedNode(); + + /** Get the right clicked TreePath. */ + public TreePath getRightClickedTreePath(); + + /** Clear the right clicked PosTreeNode. */ + public void clearRightClickedNode(); + + /** Clear the right clicked TreePath. */ + public void clearRightClickedTreePath(); + + /** Build the JPopupMenu to show when the user right clicks on tree nodes.<br> * The items on this popup menu are in the String array mTreePopupMenuItems. */ public void buildTreePopupMenu(JPopupMenu pJPopupMenu); } Modified: openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java 2007-05-30 22:57:59 UTC (rev 75) +++ openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java 2007-05-31 23:58:49 UTC (rev 76) @@ -12,7 +12,6 @@ import info.clearthought.layout.TableLayout; import javax.swing.BorderFactory; -import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -28,7 +27,6 @@ import com.openpcl.viewer.OpenPCLViewer; import com.openpcl.viewer.panels.PosView; import com.openpcl.viewer.printing.PosPrintSetupDialogChoices; -import com.openpcl.viewer.printing.PosPrintSetupDialog.DialogWindowListener; import com.openpcl.viewer.util.PosReadImageIcon; public class PosUserOptionsDialog extends JDialog { Modified: openpcl/src/com/openpcl/viewer/tree/PosTree.java =================================================================== --- openpcl/src/com/openpcl/viewer/tree/PosTree.java 2007-05-30 22:57:59 UTC (rev 75) +++ openpcl/src/com/openpcl/viewer/tree/PosTree.java 2007-05-31 23:58:49 UTC (rev 76) @@ -38,8 +38,8 @@ private JTree mPagesJTree = null; private TreePath mLastSelectedTreePath = null; private PosTreeNode mClickedNode = null; - protected TreePath mRightClickedTreePath = null; - protected PosTreeNode mRightClickedNode = null; + private TreePath mRightClickedTreePath = null; + private PosTreeNode mRightClickedNode = null; private DefaultMutableTreeNode mTreeNodeRoot = null; private String mRootNodeName = null; private static String[] sTreePopupMenuItems = new String[] { @@ -115,8 +115,27 @@ } public TreePath getLastSelectedTreePath() { return mLastSelectedTreePath; } + + /** Get the left clicked PosTreeNode.<br> + * Subclass plugins override this method so do not delete or rename this method. */ public PosTreeNode getClickedNode() { return mClickedNode; } + /** Get the right clicked PosTreeNode.<br> + * Subclass plugins override this method so do not delete or rename this method. */ + public PosTreeNode getRightClickedNode() { return mRightClickedNode; } + + /** Get the right clicked TreePath.<br> + * Subclass plugins override this method so do not delete or rename this method. */ + public TreePath getRightClickedTreePath() { return mRightClickedTreePath; } + + /** Clear the right clicked PosTreeNode.<br> + * Subclass plugins override this method so do not delete or rename this method. */ + public void clearRightClickedNode() { mRightClickedNode = null; } + + /** Clear the right clicked TreePath.<br> + * Subclass plugins override this method so do not delete or rename this method. */ + public void clearRightClickedTreePath() { mRightClickedTreePath = null; } + public void setLastSelectedTreePath(TreePath pLastSelectedTreePath) { mLastSelectedTreePath = pLastSelectedTreePath; } public void setClickedNode(PosTreeNode pClickedNode) { mClickedNode = pClickedNode; } @@ -431,7 +450,9 @@ tJMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent pE) { // The user clicked "Print All" on the popup menu. - System.out.println("To do: Handle Print All"); + mPosView.getOpenPCLViewer().actionPrintAll(); + mRightClickedNode = null; + mRightClickedTreePath = null; }}); pJPopupMenu.add(tJMenuItem); @@ -439,7 +460,9 @@ tJMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent pE) { // The user clicked "Print Selected" on the popup menu. - System.out.println("To do: Handle Print Selected"); + mPosView.getOpenPCLViewer().actionPrintSelected(); + mRightClickedNode = null; + mRightClickedTreePath = null; }}); pJPopupMenu.add(tJMenuItem); @@ -447,7 +470,9 @@ tJMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent pE) { // The user clicked "Print Remaining" on the popup menu. - System.out.println("To do: Handle Print Remaining"); + mPosView.getOpenPCLViewer().actionPrintRemaining(); + mRightClickedNode = null; + mRightClickedTreePath = null; }}); pJPopupMenu.add(tJMenuItem); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-05-30 22:57:57
|
Revision: 75 http://openpcl.svn.sourceforge.net/openpcl/?rev=75&view=rev Author: documentsystems Date: 2007-05-30 15:57:59 -0700 (Wed, 30 May 2007) Log Message: ----------- Howard Hoagland. Added a right click on tree nodes popup menu that has "View Selected, Print All, Print Selected, Print Remaining. Implemented the View Selected from the right click menu choice to work with multiselected nodes, and with left clicking tree nodes to show pages. Made PosTree implement new interface IPluginHooksPosTree method buildTreePopupMenu that subclass plugins override to add more menu items. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/tree/PosTree.java Added Paths: ----------- openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java Added: openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java =================================================================== --- openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java (rev 0) +++ openpcl/src/com/openpcl/viewer/api/IPluginHooksPosTree.java 2007-05-30 22:57:59 UTC (rev 75) @@ -0,0 +1,19 @@ +package com.openpcl.viewer.api; + +import javax.swing.JPopupMenu; + +/** + * The methods in this interface are designed to be overridden by a subclass of PosTree + * that is a plugin that adds additional features. + * + * Therefore, it is mandatory to not delete or rename these methods or else you'll break the plugin support + * that adds additional features. + * + * @author DocMagic, Document Systems Inc, HowardH. 5/29/07 + */ +public interface IPluginHooksPosTree { + /** + * Build the JPopupMenu to show when the user right clicks on tree nodes.<br> + * The items on this popup menu are in the String array mTreePopupMenuItems. */ + public void buildTreePopupMenu(JPopupMenu pJPopupMenu); +} Modified: openpcl/src/com/openpcl/viewer/tree/PosTree.java =================================================================== --- openpcl/src/com/openpcl/viewer/tree/PosTree.java 2007-05-26 00:33:13 UTC (rev 74) +++ openpcl/src/com/openpcl/viewer/tree/PosTree.java 2007-05-30 22:57:59 UTC (rev 75) @@ -3,12 +3,18 @@ import java.awt.Color; import java.awt.Component; import java.awt.Rectangle; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; import java.security.InvalidParameterException; import java.util.NoSuchElementException; import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JLabel; +import javax.swing.JMenuItem; +import javax.swing.JPopupMenu; import javax.swing.JTree; import javax.swing.UIManager; import javax.swing.event.TreeSelectionEvent; @@ -23,16 +29,22 @@ import com.openpcl.pclrenderimage.util.PriDebug; import com.openpcl.viewer.OpenPCLViewer; +import com.openpcl.viewer.api.IPluginHooksPosTree; import com.openpcl.viewer.panels.PosView; import com.openpcl.viewer.util.PosReadImageIcon; -public class PosTree { +public class PosTree implements IPluginHooksPosTree { private PosView mPosView = null; private JTree mPagesJTree = null; private TreePath mLastSelectedTreePath = null; private PosTreeNode mClickedNode = null; + protected TreePath mRightClickedTreePath = null; + protected PosTreeNode mRightClickedNode = null; private DefaultMutableTreeNode mTreeNodeRoot = null; private String mRootNodeName = null; + private static String[] sTreePopupMenuItems = new String[] { + "View Selected", "Print All", "Print Selected", "Print Remaining"}; + private JPopupMenu mTreeJPopupMenu = null; protected static final String sPCL_ICON = "Eye.gif"; protected static final String sPAGE_ICON = "Page.gif"; @@ -71,6 +83,9 @@ mPagesJTree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); mPagesJTree.setShowsRootHandles(false); mPagesJTree.setExpandsSelectedPaths(true); + + // Add the right click mouse listener + mPagesJTree.addMouseListener(new RightclickTreeMouseListener()); } /** Get the JTree that is on the screen */ @@ -115,7 +130,7 @@ System.gc(); } - public TreeModel getTreeModel() { + public TreeModel getTreeModel() { if (mPagesJTree == null) { return null; } else { return mPagesJTree.getModel(); } @@ -315,15 +330,21 @@ if (mPagesJTree == null) { return; } - mLastSelectedTreePath = e.getPath(); + if (mRightClickedTreePath == null) { + // Handle left click on tree node + mLastSelectedTreePath = e.getPath(); + } else { + // Handle right click on tree node, then on the popup menu, pick "View Selected". Ignore muti selected nodes. + mLastSelectedTreePath = mRightClickedTreePath; + } + Object tSelectedNode = mLastSelectedTreePath.getLastPathComponent(); DefaultMutableTreeNode tFirstLeafNode = (DefaultMutableTreeNode) tSelectedNode; while (!tFirstLeafNode.isLeaf()) { try { - // If not a Leaf node, then this tree is not showing a normal PCL file because it has multi level tree nodes. - // In this case, this might be a DSI Blocument tree node that might be a Document or Borrower node, - // so keep looking indented to the right to find the first leaf page to view + // If not a Leaf node, then this tree has multi level tree nodes, so keep looking indented to the right + // to find the first leaf page to view tFirstLeafNode = (DefaultMutableTreeNode)tFirstLeafNode.getFirstChild(); } catch (NoSuchElementException nse) { break; // break out of the while, with it set to the last node assigned @@ -388,6 +409,100 @@ } /** + * Build the JPopupMenu to show when the user right clicks on tree nodes.<br> + * The items on this popup menu are in the String array sTreePopupMenuItems.<br> + * Subclass plugins override this method so do not delete or rename this method. */ + public void buildTreePopupMenu(JPopupMenu pJPopupMenu) { + JMenuItem tJMenuItem = new JMenuItem(sTreePopupMenuItems[0]); // View Selected + tJMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent pE) { + // The user clicked "View Selected" on the popup menu. + // The below line causes the right clicked on tree node to be rendered and viewed. + // The mRightClickedTreePath was saved when the JPopupMenu was put on the screen in showTreeNodeMenuPopup() + if (mRightClickedTreePath != null) { mPagesJTree.setSelectionPath(mRightClickedTreePath); } + // After setting the view to the right clicked tree node, set mRightClickedTreePath to null + mRightClickedTreePath = null; + mRightClickedNode = null; + }}); + pJPopupMenu.add(tJMenuItem); + pJPopupMenu.addSeparator(); + + tJMenuItem = new JMenuItem(sTreePopupMenuItems[1]); // Print All + tJMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent pE) { + // The user clicked "Print All" on the popup menu. + System.out.println("To do: Handle Print All"); + }}); + pJPopupMenu.add(tJMenuItem); + + tJMenuItem = new JMenuItem(sTreePopupMenuItems[2]); // Print Selected + tJMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent pE) { + // The user clicked "Print Selected" on the popup menu. + System.out.println("To do: Handle Print Selected"); + }}); + pJPopupMenu.add(tJMenuItem); + + tJMenuItem = new JMenuItem(sTreePopupMenuItems[3]); // Print Remaining + tJMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent pE) { + // The user clicked "Print Remaining" on the popup menu. + System.out.println("To do: Handle Print Remaining"); + }}); + pJPopupMenu.add(tJMenuItem); + } + + /** MouseAdapter class for when the user right clicks on a node in the tree.<br> + * This checks for mouse event for popup menu in both mouseReleased() and mousePressed() because:<br> + * <br> + * As stated at http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html + * "The exact gesture that should bring up a popup menu varies by look and feel. In Microsoft Windows, the user + * by convention brings up a popup menu by releasing the right mouse button while the cursor is over a component + * that is popup-enabled."<br> + * <br> + * In that case, the mouseReleased() method will be handling the event. But on other platforms + * and/or look and feel settings, the popup menu should show upon mousePressed() and not upon mouseReleased(). + */ + protected class RightclickTreeMouseListener extends MouseAdapter { + public void mouseReleased(MouseEvent pE) { + if ( pE.isPopupTrigger() ) { + showTreeNodeMenuPopup(pE.getX(), pE.getY()); + } + } + + public void mousePressed(MouseEvent pE) { + if ( pE.isPopupTrigger() ) { + showTreeNodeMenuPopup(pE.getX(), pE.getY()); + } + } + + private void showTreeNodeMenuPopup(int pMouseX, int pMouseY) { + // Get the TreePath at the right clicked mouse (x,y) position in the JTree coordinate space + mRightClickedTreePath = getPagesJTree().getPathForLocation(pMouseX, pMouseY); + if (mRightClickedTreePath == null) { return; } + + // Get the node at that TreePath + DefaultMutableTreeNode node = (DefaultMutableTreeNode)mRightClickedTreePath.getLastPathComponent(); + + // Save the PosTreeNode that was right clicked on, because all the menu items on the right click menu + // work with the right clicked node + mRightClickedNode = (PosTreeNode)node.getUserObject(); + + // Must make a new JPopupMenu each time the user right clicks in case the user changed the Look and Feel, + // so that the JPopupMenu's L&F is the same. + // TODO is track when the user changes the L&F and only make a new JPopupMenu if the user changed the L&F + mTreeJPopupMenu = new JPopupMenu(); + // Right click on tree nodes brings up the pop up menu. Pass in the JPopupMenu because it's passed to subclass plugins + // that can then add more JMenuItems with their action listeners + buildTreePopupMenu(mTreeJPopupMenu); + mTreeJPopupMenu.pack(); + + // Show the right click menu + mTreeJPopupMenu.show(mPagesJTree, pMouseX, pMouseY); + } + } + + /** * Tree cell renderer class specifies the icons to use for the different node types: * 1. Pcl page * 2. Blockument doc with pages under it (icon for open and another icon for closed) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-05-26 00:33:12
|
Revision: 74 http://openpcl.svn.sourceforge.net/openpcl/?rev=74&view=rev Author: documentsystems Date: 2007-05-25 17:33:13 -0700 (Fri, 25 May 2007) Log Message: ----------- Howard Hoagland. Added the options dialog, and a button on the toolbar to bring it up, and made the Printer Setup button on the options dialog bring up the Printer Setup dialog. Changed 6 source files and created the PosUserOptionsDialog and added the new icon Options.png. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java openpcl/src/com/openpcl/viewer/api/IOpenPCL.java openpcl/src/com/openpcl/viewer/options/PosStartupOptions.java openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java openpcl/src/com/openpcl/viewer/toolbar/PosManageToolBar.java openpcl/src/com/openpcl/viewer/toolbar/PosToolBar.java Added Paths: ----------- openpcl/src/com/openpcl/viewer/images/Options.png openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java Modified: openpcl/src/com/openpcl/viewer/OpenPCLViewer.java =================================================================== --- openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-05-23 04:27:08 UTC (rev 73) +++ openpcl/src/com/openpcl/viewer/OpenPCLViewer.java 2007-05-26 00:33:13 UTC (rev 74) @@ -55,6 +55,7 @@ import com.openpcl.viewer.dialogs.PosZoomPopupDialog; import com.openpcl.viewer.jframe.PosSimpleJFrame; import com.openpcl.viewer.options.PosStartupOptions; +import com.openpcl.viewer.options.PosUserOptionsDialog; import com.openpcl.viewer.panels.PosChangeTheLookList; import com.openpcl.viewer.panels.PosHelpChoicesList; import com.openpcl.viewer.panels.PosPrintChoicesList; @@ -62,6 +63,7 @@ import com.openpcl.viewer.panels.PosWindowControlList; import com.openpcl.viewer.panels.PosZoomSlider; import com.openpcl.viewer.printing.PosPrintPages; +import com.openpcl.viewer.printing.PosPrintSetupDialogChoices; import com.openpcl.viewer.statusbar.PosStatusBar; import com.openpcl.viewer.toolbar.PosManageToolBar; import com.openpcl.viewer.toolbar.PosToolBar; @@ -166,6 +168,8 @@ private PosWindowControlList mPosWindowControlList = null; private PosHtmlViewerButtonChoicesDialog mHelpAboutDialog = null; private PosHtmlViewerButtonChoicesDialog mLicenseInfoDialog = null; + private PosUserOptionsDialog mPosUserOptionsDialog = null; + private PosPrintSetupDialogChoices mPosUserOptionsPosPrintSetupDialogChoices = null; private ComponentListener mFrameComponentListener = null; private String mFilePathAndFileName = "C:\\"; private Preferences mPackagePreferences = null; @@ -2240,6 +2244,19 @@ } } + /** Show the Options dialog */ + public void actionShowOptionsDialog() { + if (mPosUserOptionsDialog == null) { + mPosUserOptionsPosPrintSetupDialogChoices = new PosPrintSetupDialogChoices(); + } + mPosUserOptionsDialog = new PosUserOptionsDialog( + mPosUserOptionsPosPrintSetupDialogChoices, this, "Options Dialog", true); + mPosUserOptionsDialog.setLocationRelativeTo(getAppFrame()); + mPosUserOptionsDialog.setVisible(true); + + // TODO read the values that were set in the user options dialog and handle the different settings + } + /** Toggle show/hide the help choices popup */ public void actionShowHideHelpChoicesPopup() { if (mIsHelpChoicesListShowing) { Modified: openpcl/src/com/openpcl/viewer/api/IOpenPCL.java =================================================================== --- openpcl/src/com/openpcl/viewer/api/IOpenPCL.java 2007-05-23 04:27:08 UTC (rev 73) +++ openpcl/src/com/openpcl/viewer/api/IOpenPCL.java 2007-05-26 00:33:13 UTC (rev 74) @@ -247,6 +247,9 @@ /** Cascade Windows */ public void actionCascadeWindows(); + /** Show the Options dialog */ + public void actionShowOptionsDialog(); + /** Toggle show/hide the print choices popup */ public void actionShowHideHelpChoicesPopup(); Added: openpcl/src/com/openpcl/viewer/images/Options.png =================================================================== (Binary files differ) Property changes on: openpcl/src/com/openpcl/viewer/images/Options.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: openpcl/src/com/openpcl/viewer/options/PosStartupOptions.java =================================================================== --- openpcl/src/com/openpcl/viewer/options/PosStartupOptions.java 2007-05-23 04:27:08 UTC (rev 73) +++ openpcl/src/com/openpcl/viewer/options/PosStartupOptions.java 2007-05-26 00:33:13 UTC (rev 74) @@ -97,6 +97,7 @@ private boolean mShowSaveToPclToolbarButton = true; private boolean mShowChangeLookToolbarButton = true; private boolean mShowWindowControlToolbarButton = true; + private boolean mShowOptionsToolbarButton = true; private boolean mShowHelpChoicesToolbarButton = true; // Booleans other than toolbar related @@ -158,6 +159,7 @@ {s1 + "-ShowSaveToPclToolbarButton" + s2, "Show or hide the \"Save one page to Pcl file\" toolbar button.", "yes"}, {s1 + "-ShowChangeLookToolbarButton" + s2, "Show or hide the Change Look toolbar button.", "yes"}, {s1 + "-ShowWindowControlToolbarButton" + s2, "Show or hide the Window Control toolbar button.", "yes"}, + {s1 + "-ShowOptionsToolbarButton" + s2, "Show or hide the Options toolbar button.", "yes"}, {s1 + "-ShowHelpChoicesToolbarButton" + s2, "Show or hide the Help Choices toolbar button.", "yes"}, {"Debug and demo mode:", "", ""}, {s1 + "-ShowEmbeddedDemo" + s2, "Show the viewer embedded in an external demo app.", "no"}, @@ -224,6 +226,7 @@ mShowSaveToPclToolbarButton = false; mShowChangeLookToolbarButton = false; mShowWindowControlToolbarButton = false; + mShowOptionsToolbarButton = false; mShowHelpChoicesToolbarButton = false; } @@ -257,6 +260,8 @@ mShowChangeLookToolbarButton = argTrueFalse; } else if (commandLineArg.startsWith("-showwindowcontroltoolbarbutton")) { mShowWindowControlToolbarButton = argTrueFalse; + } else if (commandLineArg.startsWith("-showoptionstoolbarbutton")) { + mShowOptionsToolbarButton = argTrueFalse; } else if (commandLineArg.startsWith("-showhelpchoicestoolbarbutton")) { mShowHelpChoicesToolbarButton = argTrueFalse; @@ -315,6 +320,7 @@ public boolean getShowSaveToPclToolbarButton() { return mShowSaveToPclToolbarButton; } public boolean getShowChangeLookToolbarButton() { return mShowChangeLookToolbarButton; } public boolean getShowWindowControlToolbarButton() { return mShowWindowControlToolbarButton; } + public boolean getShowOptionsToolbarButton() { return mShowOptionsToolbarButton; } public boolean getShowHelpChoicesToolbarButton() { return mShowHelpChoicesToolbarButton; } // Getters for Booleans other than toolbar related @@ -370,6 +376,8 @@ mShowChangeLookToolbarButton = pShowChangeLookToolbarButton; } public void setShowWindowControlToolbarButton(boolean pShowWindowControlToolbarButton) { mShowWindowControlToolbarButton = pShowWindowControlToolbarButton; } + public void setShowOptionsToolbarButton(boolean pShowOptionsToolbarButton) { + mShowOptionsToolbarButton = pShowOptionsToolbarButton; } public void setShowHelpChoicesToolbarButton(boolean pShowHelpChoicesToolbarButton) { mShowHelpChoicesToolbarButton = pShowHelpChoicesToolbarButton; } Added: openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java =================================================================== --- openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java (rev 0) +++ openpcl/src/com/openpcl/viewer/options/PosUserOptionsDialog.java 2007-05-26 00:33:13 UTC (rev 74) @@ -0,0 +1,421 @@ +package com.openpcl.viewer.options; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; + +import info.clearthought.layout.TableLayout; + +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.ButtonGroup; +import javax.swing.JButton; +import javax.swing.JCheckBox; +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.PosPrintSetupDialogChoices; +import com.openpcl.viewer.printing.PosPrintSetupDialog.DialogWindowListener; +import com.openpcl.viewer.util.PosReadImageIcon; + +public class PosUserOptionsDialog extends JDialog { + private static final long serialVersionUID = 1L; + + // Hold constructor passed in parameters + private PosPrintSetupDialogChoices mPosPrintSetupDialogChoices = null; + private OpenPCLViewer mOpenPCLViewer = null; + private Frame mParentFrame = null; + + // Values for laying out panels, buttons, labels, textfields + private double mTloPref = TableLayout.PREFERRED; + private double mTloFill = TableLayout.FILL; + private double mTloHgap = 5; + private double mTloVgap = 5; + + // Fonts + private final Font mUseFont = getFont(); + private final float mFontPointSize = mUseFont.getSize2D(); + private final Font mTitledBorderFont = mUseFont.deriveFont(Font.BOLD, mFontPointSize + 2.0f); + + // Panels + private JPanel mOuterJPanel = null; + private JPanel mTopButtonsJPanel = null; + private JPanel mPrintingOptionsJPanel = null; + private JPanel mPrintingOptionsInsideTopJPanel = null; + private JPanel mPrintingOptionsInsideMiddleJPanel = null; + private JPanel mPrintingOptionsInsideBottomJPanel = null; + private JPanel mEMailJPanel = null; + private JPanel mScanningJPanel = null; + private JPanel mUpdatesJPanel = null; + private JPanel mBottomButtonsJPanel = null; + + // Names of Group Boxes + private String mPrintingGroupBoxString = "Printing"; + private String mEMailGroupBoxString = "EMail"; + private String mScanningGroupBoxString = "Scanning"; + private String mUpdatesGroupBoxString = "Updates"; + + // Buttons + private JButton mCreateShortcutJButton = new JButton(PosReadImageIcon.read("pclIcon_32x32.png")); + private JButton mRegisterFileTypeJButton = new JButton(PosReadImageIcon.read("PageNewBig.gif")); + private JButton mPrinterSetupDefaultsJButton = new JButton("Printer Setup dialog"); + private JButton mEMailAdvancedSettingsJButton = new JButton("Advanced Settings for EMail"); + private JButton mScanningSetupJButton = new JButton("Scanning Setup"); + private JButton mCheckForUpdatesJButton = new JButton("Check for Updates Now"); + private JButton mOKJButton = new JButton("OK"); + private JButton mCancelJButton = new JButton("Cancel"); + + // Labels + private JLabel mCreateShortcutJLabel = new JLabel("Create shortcut on desktop"); + private JLabel mResgisterFileTypeJLabel = new JLabel("Register DSI file types with ViewMagic"); + private JLabel mWhenToShowPrinterSetupJLabel = new JLabel("When to show Printer Setup dialog"); + private JLabel mFormFillColorJLabel = new JLabel("Form's fill color (Courier text)"); + private JLabel mFooterForOriginalJLabel = new JLabel("Footer text for orginal: "); + private JLabel mFooterForFirstCopyJLabel = new JLabel("Footer text for first copy: "); + private JLabel mFooterForSecondCopyJLabel = new JLabel("Footer text for second copy: "); + private JLabel mFooterForThirdCopyJLabel = new JLabel("Footer text for third copy: "); + private JLabel mPclEscCodesJLabel = new JLabel("PCL Esc codes (used for manual tray switching)"); + private JLabel mLetterTrayJLabel = new JLabel("Letter tray: "); + private JLabel mLegalTrayJLabel = new JLabel("Legal tray: "); + private JLabel mEMailClientJLabel = new JLabel("EMail client: "); + private JLabel mScanningDescJLabel = new JLabel("For scanning the bar codes on a printed page."); + private JLabel mCheckForUpdatesEveryJLabel = new JLabel("Check for updates every "); + private JLabel mCheckForUpdatesDaysJLabel = new JLabel("days."); + private JLabel mDateLastUpdateCheckedJLabel = new JLabel("Date last checked: "); + private JLabel mFilledInDateLastCheckedJLabel = new JLabel("__/__/____"); + + // Text fields + private JTextField mFooterForOriginalJTextField = new JTextField(); + private JTextField mFooterForFirstCopyJTextField = new JTextField(); + private JTextField mFooterForSecondCopyJTextField = new JTextField(); + private JTextField mFooterForThirdCopyJTextField = new JTextField(); + private JTextField mLetterTrayJTextField = new JTextField(); + private JTextField mLegalTrayJTextField = new JTextField(); + + // Radio buttons + private JRadioButton mShowPrinterSetupEveryPrintJRadioButton = new JRadioButton("Every print"); + private JRadioButton mShowPrinterSetupFirstPrintOnlyJRadioButton = new JRadioButton("First print only"); + private JRadioButton mShowPrinterSetupFromOptionsDialogOnlyJRadioButton = new JRadioButton("Only clicking below button"); + private ButtonGroup mPrintSetupButtonGroup = new ButtonGroup(); + private JRadioButton mFormFillColorBlueJRadioButton = new JRadioButton("Blue"); + private JRadioButton mFormFillColorBlackJRadioButton = new JRadioButton("Black"); + private ButtonGroup mFormFillColorButtonGroup = new ButtonGroup(); + + // Check boxes + private JCheckBox mAntiAliasJCheckBox = new JCheckBox("Anti-alias image (highest quality)"); + + // ComboBoxes + private JComboBox mEMailClientJComboBox = new JComboBox(); + private JComboBox mCheckForUpdatesDaysJComboBox = new JComboBox(); + + // Strings + private static final String sNotImplementedString = "Not implemented: "; + + // Constructor + + public PosUserOptionsDialog(PosPrintSetupDialogChoices pPosPrintSetupDialogChoices, OpenPCLViewer pOpenPCLViewer, + String pTitleString, boolean pIsModal) { + + // Call JDialog superclass constructor passing the parent frame, title bar text, is modal + super(pOpenPCLViewer.getAppFrame(), pTitleString, pIsModal); + // Save the OpenPCLViewer + mOpenPCLViewer = pOpenPCLViewer; + // Save the parent Frame + mParentFrame = pOpenPCLViewer.getAppFrame(); + // Set the object that will hold the settings of the values from the dialog on the screen + mPosPrintSetupDialogChoices = pPosPrintSetupDialogChoices; + // Build the UI + buildUI(); + } + + private void buildUI() { + setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); + addWindowListener(new DialogWindowListener()); + + // Put the radio buttons in their button group so clicking one automatically unselects the other radio buttons + // that are in the same group + mPrintSetupButtonGroup.add(mShowPrinterSetupEveryPrintJRadioButton); + mPrintSetupButtonGroup.add(mShowPrinterSetupFirstPrintOnlyJRadioButton); + mPrintSetupButtonGroup.add(mShowPrinterSetupFromOptionsDialogOnlyJRadioButton); + mFormFillColorButtonGroup.add(mFormFillColorBlueJRadioButton); + mFormFillColorButtonGroup.add(mFormFillColorBlackJRadioButton); + + // Make the subpanels + mTopButtonsJPanel = makeTopButtonsJPanel(); + mPrintingOptionsInsideTopJPanel = makePrintingOptionsInsideTopJPanel(); + mPrintingOptionsInsideMiddleJPanel = makePrintingOptionsInsideMiddleJPanel(); + mPrintingOptionsInsideBottomJPanel = makePrintingOptionsInsideBottomJPanel(); + mPrintingOptionsJPanel = makePrintingOptionsJPanel(); + mEMailJPanel = makeEMailJPanel(); + mScanningJPanel = makeScanningJPanel(); + mUpdatesJPanel = makeUpdatesJPanel(); + mBottomButtonsJPanel = makeBottomButtonsJPanel(); + + // Make the outer panel + mOuterJPanel = makeOuterJPanel(); + + addActionListeners(); + makePanelTitledBorders(); + putOptionsOnScreen(); + setHoverHelpOnItems(); + setContentPane(mOuterJPanel); + pack(); + // setPreferredSize(new Dimension(200, 300)); + } + + private void addActionListeners() { + mPrinterSetupDefaultsJButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + PosView tPosView = mOpenPCLViewer.getPosViewSelected(); + if (tPosView != null) { + tPosView.getPosPrintPages().showPrintDialog(); + } else { + JOptionPane.showMessageDialog(mParentFrame, "To show the Print Setup dialog, a file needs to be opened", + "To show the Print Setup dialog", + JOptionPane.WARNING_MESSAGE); + } + } + }); + + mOKJButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + getOptionsFromScreen(); + mPosPrintSetupDialogChoices.setUserHitOk(true); + setVisible(false); + } + }); + + mCancelJButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + mPosPrintSetupDialogChoices.setUserHitOk(false); + setVisible(false); + } + }); + } + + private void makePanelTitledBorders() { + mPrintingOptionsJPanel.setBorder(generateTitledBorder(mPrintingGroupBoxString)); + mEMailJPanel.setBorder(generateTitledBorder(mEMailGroupBoxString)); + mScanningJPanel.setBorder(generateTitledBorder(mScanningGroupBoxString)); + mUpdatesJPanel.setBorder(generateTitledBorder(mUpdatesGroupBoxString)); + } + + private TitledBorder generateTitledBorder(String title) { + return(new TitledBorder(BorderFactory.createEtchedBorder(), title, + TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, mTitledBorderFont, Color.BLACK)); + } + + private JPanel makeTopButtonsJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] { + { mTloHgap, mTloPref, mTloHgap, mTloPref, 20, mTloFill, mTloPref, mTloHgap, mTloPref, mTloHgap }, + { mTloPref, mTloVgap }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + mCreateShortcutJButton.setIconTextGap(0); + mCreateShortcutJButton.setPreferredSize(new Dimension(44, 44)); + mRegisterFileTypeJButton.setIconTextGap(0); + mRegisterFileTypeJButton.setPreferredSize(new Dimension(44, 44)); + tPanel.add(mCreateShortcutJButton, "1, 0"); + tPanel.add(mCreateShortcutJLabel, "3, 0"); + tPanel.add(mRegisterFileTypeJButton, "6, 0"); + tPanel.add(mResgisterFileTypeJLabel, "8, 0"); + return tPanel; + } + + private JPanel makePrintingOptionsInsideTopJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] { + { mTloPref, 40, mTloFill, mTloHgap }, + { mTloPref, mTloPref, mTloPref, mTloPref, mTloPref, 10 }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mWhenToShowPrinterSetupJLabel, "0, 0"); + tPanel.add(mShowPrinterSetupEveryPrintJRadioButton, "0, 1"); + tPanel.add(mShowPrinterSetupFirstPrintOnlyJRadioButton, "0, 2"); + tPanel.add(mShowPrinterSetupFromOptionsDialogOnlyJRadioButton, "0, 3"); + mPrinterSetupDefaultsJButton.setMaximumSize(mPrinterSetupDefaultsJButton.getPreferredSize()); + tPanel.add(mPrinterSetupDefaultsJButton, "0, 4"); + tPanel.add(mFormFillColorJLabel, "2, 0"); + tPanel.add(mFormFillColorBlueJRadioButton, "2, 1"); + tPanel.add(mFormFillColorBlackJRadioButton, "2, 2"); + tPanel.add(mAntiAliasJCheckBox, "2, 4"); + return tPanel; + } + + private JPanel makePrintingOptionsInsideMiddleJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] { + { mTloPref, mTloFill, mTloHgap }, + { mTloPref, 2, mTloPref, 2, mTloPref, 2, mTloPref, 10 }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mFooterForOriginalJLabel, "0, 0"); + tPanel.add(mFooterForOriginalJTextField, "1, 0"); + tPanel.add(mFooterForFirstCopyJLabel, "0, 2"); + tPanel.add(mFooterForFirstCopyJTextField, "1, 2"); + tPanel.add(mFooterForSecondCopyJLabel, "0, 4"); + tPanel.add(mFooterForSecondCopyJTextField, "1, 4"); + tPanel.add(mFooterForThirdCopyJLabel, "0, 6"); + tPanel.add(mFooterForThirdCopyJTextField, "1, 6"); + return tPanel; + } + + private JPanel makePrintingOptionsInsideBottomJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] { + { mTloPref, 160, mTloFill, mTloHgap }, + { mTloPref, 2, mTloPref, mTloVgap }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mLetterTrayJLabel, "0, 0"); + tPanel.add(mLetterTrayJTextField, "1, 0"); + tPanel.add(mLegalTrayJLabel, "0, 2"); + tPanel.add(mLegalTrayJTextField, "1, 2"); + return tPanel; + } + + private JPanel makePrintingOptionsJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] {{ mTloHgap, mTloFill }, { mTloPref, mTloPref, mTloPref, mTloPref }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mPrintingOptionsInsideTopJPanel, "1, 0"); + tPanel.add(mPrintingOptionsInsideMiddleJPanel, "1, 1"); + tPanel.add(mPclEscCodesJLabel, "1, 2"); + tPanel.add(mPrintingOptionsInsideBottomJPanel, "1, 3"); + return tPanel; + } + + private JPanel makeEMailJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] { + { mTloHgap, 260, mTloHgap, mTloFill, mTloPref, mTloHgap }, + { mTloPref, mTloVgap, mTloPref, mTloVgap }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mEMailClientJLabel, "1, 0"); + tPanel.add(mEMailClientJComboBox, "1, 2"); + tPanel.add(mEMailAdvancedSettingsJButton, "4, 2"); + return tPanel; + } + + private JPanel makeScanningJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] { + { mTloHgap, mTloPref, mTloHgap, mTloFill, mTloPref, mTloHgap }, + { mTloPref, mTloVgap }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mScanningDescJLabel, "1, 0"); + tPanel.add(mScanningSetupJButton, "4, 0"); + return tPanel; + } + + private JPanel makeUpdatesJPanel() { + JPanel tPanel = new JPanel(); + double tloGridSpec[][] = new double[][] { + { mTloHgap, mTloPref, mTloHgap, 80, mTloHgap, mTloPref, mTloFill, mTloHgap, mTloPref, mTloHgap }, + { mTloPref, mTloVgap, mTloPref, mTloVgap }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mCheckForUpdatesEveryJLabel, "1, 0"); + tPanel.add(mCheckForUpdatesDaysJComboBox, "3, 0"); + tPanel.add(mCheckForUpdatesDaysJLabel, "5, 0"); + tPanel.add(mCheckForUpdatesJButton, "8, 0"); + tPanel.add(mDateLastUpdateCheckedJLabel, "1, 2"); + tPanel.add(mFilledInDateLastCheckedJLabel, "3, 2"); + return tPanel; + } + + private JPanel makeBottomButtonsJPanel() { + JPanel tPanel = new JPanel(); + tPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + double tloGridSpec[][] = new double[][] {{ mTloFill, 80, 10, 80 }, { mTloPref }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mOKJButton, "1, 0"); + tPanel.add(mCancelJButton, "3, 0"); + return tPanel; + } + + private JPanel makeOuterJPanel() { + JPanel tPanel = new JPanel(); + tPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + double tloGridSpec[][] = new double[][] {{ mTloFill }, + { mTloPref, mTloVgap, mTloPref, mTloVgap, mTloPref, mTloVgap, mTloPref, mTloVgap, mTloPref, + mTloVgap, mTloFill, mTloPref }}; + tPanel.setLayout(new TableLayout(tloGridSpec)); + tPanel.add(mTopButtonsJPanel, "0, 0"); + tPanel.add(mPrintingOptionsJPanel, "0, 2"); + tPanel.add(mEMailJPanel, "0, 4"); + tPanel.add(mScanningJPanel, "0, 6"); + tPanel.add(mUpdatesJPanel, "0, 8"); + tPanel.add(mBottomButtonsJPanel, "0, 11"); + return tPanel; + } + + private void setHoverHelpOnItems() { + // Buttons + mCreateShortcutJButton.setToolTipText(sNotImplementedString + "Create shortcut on desktop"); + mRegisterFileTypeJButton.setToolTipText(sNotImplementedString + "Register DSI file types with ViewMagic"); + mPrinterSetupDefaultsJButton.setToolTipText("Printer Setup dialog"); + mEMailAdvancedSettingsJButton.setToolTipText(sNotImplementedString + "Advanced settings for EMail"); + mScanningSetupJButton.setToolTipText(sNotImplementedString + "Scanning setup"); + mCheckForUpdatesJButton.setToolTipText(sNotImplementedString + "Checking for updates"); + + // Text fields + mFooterForOriginalJTextField.setToolTipText(sNotImplementedString + "Footer for original"); + mFooterForFirstCopyJTextField.setToolTipText(sNotImplementedString + "Footer for first copy"); + mFooterForSecondCopyJTextField.setToolTipText(sNotImplementedString + "Footer for second copy"); + mFooterForThirdCopyJTextField.setToolTipText(sNotImplementedString + "Footer for third copy"); + mLetterTrayJTextField.setToolTipText(sNotImplementedString + "PCL Esc codes for Letter tray"); + mLegalTrayJTextField.setToolTipText(sNotImplementedString + "PCL Esc codes for Legal tray"); + + // Radio buttons + mShowPrinterSetupEveryPrintJRadioButton.setToolTipText(sNotImplementedString + "Every print"); + mShowPrinterSetupFirstPrintOnlyJRadioButton.setToolTipText(sNotImplementedString + "First print only"); + mShowPrinterSetupFromOptionsDialogOnlyJRadioButton.setToolTipText("Only clicking below button"); + mFormFillColorBlueJRadioButton.setToolTipText("Form's fill color Blue"); + mFormFillColorBlackJRadioButton.setToolTipText(sNotImplementedString + "Form's fill color Black (it's always blue)"); + + // Check boxes + mAntiAliasJCheckBox.setToolTipText("Anti-alias is always on and can't be turned off"); + + // Combo boxes + mEMailClientJComboBox.setToolTipText(sNotImplementedString + "Combo box of EMail clients"); + mCheckForUpdatesDaysJComboBox.setToolTipText(sNotImplementedString + "Doing updates from here"); + } + + private void getOptionsFromScreen() { + // TODO + } + + private void putOptionsOnScreen() { + // TODO + } + + public class DialogWindowListener implements WindowListener { + public void windowOpened(WindowEvent e) { + } + public void windowClosing(WindowEvent e) { + mPosPrintSetupDialogChoices.setUserHitOk(false); + setVisible(false); + } + public void windowClosed(WindowEvent e) { + } + public void windowIconified(WindowEvent e) { + } + public void windowDeiconified(WindowEvent e) { + } + public void windowActivated(WindowEvent e) { + } + public void windowDeactivated(WindowEvent e) { + } + } + +} Modified: openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java =================================================================== --- openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java 2007-05-23 04:27:08 UTC (rev 73) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintPages.java 2007-05-26 00:33:13 UTC (rev 74) @@ -398,8 +398,19 @@ } public boolean showPrintDialog() { + // Get a new PrinterJob using its static method mPrinterJob = PrinterJob.getPrinterJob(); - boolean userHitOk = mPrinterJob.printDialog(mAttributes); + + // Put up our custom printer setup dialog + mPosPrintSetupDialog = new PosPrintSetupDialog(mPosView, "Printer Setup", + mPosPrintSetupDialogChoices, mAttributes, mPrinterJob, + "No pages will print at this time because this is Printer Setup options only. Make sure to hit OK to save your changes."); + + mPosPrintSetupDialog.setLocationRelativeTo(mPosView.getOpenPCLViewer().getAppFrame()); + mPosPrintSetupDialog.setVisible(true); + + boolean userHitOk = mPosPrintSetupDialogChoices.getDidUserHitOk(); + if (userHitOk) { return true; } else { Modified: openpcl/src/com/openpcl/viewer/toolbar/PosManageToolBar.java =================================================================== --- openpcl/src/com/openpcl/viewer/toolbar/PosManageToolBar.java 2007-05-23 04:27:08 UTC (rev 73) +++ openpcl/src/com/openpcl/viewer/toolbar/PosManageToolBar.java 2007-05-26 00:33:13 UTC (rev 74) @@ -35,6 +35,7 @@ private JButton mChangeTheLookButton = null; private JButton mCascadeWindowsButton = null; + private JButton mOptionsButton = null; private JButton mHelpButton = null; // Subclass plugins add their JButtons on the toolbar to this ArrayList to get grayed out along with the named JButtons here, @@ -63,7 +64,7 @@ mSaveOnePageToPclFileButton.setEnabled(false); // mChangeTheLookButton is not grayed out mCascadeWindowsButton.setEnabled(false); - + //mOptionsButton is not grayed out // mHelpButton is not grayed out mPosZoomSlider.setComponentsEnabled(false); @@ -99,7 +100,7 @@ mSaveOnePageToPclFileButton.setEnabled(true); // mChangeTheLookButton is not grayed out mCascadeWindowsButton.setEnabled(true); - + // mOptionsButton is not grayed out // mHelpButton is not grayed out mPosZoomSlider.setComponentsEnabled(true); @@ -131,6 +132,7 @@ public JButton getCascadeWindowsButton() {return mCascadeWindowsButton;} + public JButton getOptionsButton() { return mOptionsButton; } public JButton getHelpButton() {return mHelpButton;} // Setters @@ -159,6 +161,8 @@ public void setCascadeWindowsButton(JButton pCascadeWindowsButton) { mCascadeWindowsButton = pCascadeWindowsButton;} + public void setOptionsButton(JButton pOptionsButton) { + mOptionsButton = pOptionsButton; } public void setHelpAboutButton(JButton pHelpButton) { mHelpButton = pHelpButton;} Modified: openpcl/src/com/openpcl/viewer/toolbar/PosToolBar.java =================================================================== --- openpcl/src/com/openpcl/viewer/toolbar/PosToolBar.java 2007-05-23 04:27:08 UTC (rev 73) +++ openpcl/src/com/openpcl/viewer/toolbar/PosToolBar.java 2007-05-26 00:33:13 UTC (rev 74) @@ -123,6 +123,10 @@ if (mPosStartupOptions.getShowWindowControlToolbarButton()) { mJToolBar.add(tJButton); } mPosManageToolBar.setCascadeWindowsButton(tJButton); + tJButton = createOptionsButton(); + if (mPosStartupOptions.getShowOptionsToolbarButton()) { mJToolBar.add(tJButton); } + mPosManageToolBar.setOptionsButton(tJButton); + tJButton = createHelpAboutButton(); if (mPosStartupOptions.getShowHelpChoicesToolbarButton()) { mJToolBar.add(tJButton); } mPosManageToolBar.setHelpAboutButton(tJButton); @@ -260,6 +264,15 @@ return tJButton; } + /** Options toolbar button */ + protected JButton createOptionsButton() { + JButton tJButton = createToolBarButton("Options.png", "Options"); + tJButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) {mOpenPCLViewer.actionShowOptionsDialog();} + }); + return tJButton; + } + /** Help About toolbar button */ protected JButton createHelpAboutButton() { JButton tJButton = createToolBarButton("HelpAbout.jpg", "Help Choices (License Info and About)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-05-23 04:27:20
|
Revision: 73 http://openpcl.svn.sourceforge.net/openpcl/?rev=73&view=rev Author: documentsystems Date: 2007-05-22 21:27:08 -0700 (Tue, 22 May 2007) Log Message: ----------- A start at implementing OpenPCL SourceForge bug 1723909 "Implement Secondary Fonts independently of Primary Fonts". Added variables and methods and method calls to save the Secondary Font independent of the Primary Font, and to set whether the currently selected font mode is the Primary Font or the Secondary Font. Modified Paths: -------------- openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java Modified: openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java =================================================================== --- openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java 2007-05-18 01:55:15 UTC (rev 72) +++ openpcl/src/com/openpcl/pclrenderimage/PclRenderImage.java 2007-05-23 04:27:08 UTC (rev 73) @@ -496,6 +496,12 @@ mPriDrawText.drawBufferedUpCharsAs1String(); // Transfer soft font header data bytes mPriParseSoftFontBytes.transferSoftFontHeaderData(cmdValueInt, cmdData); + } else if (cmdCharArray[3] == 'T') { // )s,T Set Secondary Font typeface + if (mParsePclIs1stPass || mIsStateBuildingPclPages || mIsRecordingAMacro) {return;} + mPriDrawText.drawBufferedUpCharsAs1String(); + mIsSoftFontMode = false; + mPriFonts.setFontIsSecondary(); + mPriFonts.setJavaBuiltInFont(cmdValueInt); } } } @@ -514,10 +520,11 @@ if (mParsePclIs1stPass || mIsStateBuildingPclPages || mIsRecordingAMacro) {return;} mPriDrawText.drawBufferedUpCharsAs1String(); mPriFonts.setFontItalicOrCondensedStyle(cmdValueInt); - } else if (cmdCharArray[3] == 'T') { // (s,T + } else if (cmdCharArray[3] == 'T') { // (s,T Set Primary Font typeface if (mParsePclIs1stPass || mIsStateBuildingPclPages || mIsRecordingAMacro) {return;} mPriDrawText.drawBufferedUpCharsAs1String(); mIsSoftFontMode = false; + mPriFonts.setFontIsPrimary(); mPriFonts.setJavaBuiltInFont(cmdValueInt); } else if (cmdCharArray[3] == 'V') { // (s,V if (mParsePclIs1stPass || mIsStateBuildingPclPages || mIsRecordingAMacro) {return;} Modified: openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java =================================================================== --- openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java 2007-05-18 01:55:15 UTC (rev 72) +++ openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java 2007-05-23 04:27:08 UTC (rev 73) @@ -54,6 +54,12 @@ protected final static float sFontToPclUnitsConversion = 300.0F / 72.0F; + // PCL commands might define a Secondary Font, then flip to the Secondary Font using 15 shift out, + // then might flip to the Primary Font using 14 which is shift in. + public static final int sFontIsPrimary = 1; + public static final int sFontIsSecondary = 2; + protected int mFontIsPrimaryOrSecondary = sFontIsPrimary; + // (taken from Jim Gabriel's DocMaster Pascal source code) protected static final int[][] sFontSubstitutionArray = new int[][] { {0, sFontIsMonospaced}, // LinePrinter @@ -460,6 +466,20 @@ makeFontCurrent(); } + /** + * Set the font is the Primary Font + */ + public void setFontIsPrimary() { + mFontIsPrimaryOrSecondary = sFontIsPrimary; + } + + /** + * Set the font is the Secondary Font + */ + public void setFontIsSecondary() { + mFontIsPrimaryOrSecondary = sFontIsSecondary; + } + /** Pick which Java built in font from the font number read from the original PCL bytes * @param pFontTypefaceNumberFromPclFile */ @@ -557,6 +577,7 @@ public void setPrimaryFont(Font pPrimaryFont) { if (pPrimaryFont != null) { mPrimaryFont = pPrimaryFont; + mFontIsPrimaryOrSecondary = sFontIsPrimary; if (mGraphics2D != null) { mGraphics2D.setFont(mPrimaryFont); mFontRenderContext = mGraphics2D.getFontRenderContext(); @@ -570,5 +591,14 @@ } /** Set the secondary font */ - public void setSecondaryFont(Font pSecondaryFont) { mSecondaryFont = pSecondaryFont; } + public void setSecondaryFont(Font pSecondaryFont) { + if (pSecondaryFont != null) { + mSecondaryFont = pSecondaryFont; + mFontIsPrimaryOrSecondary = sFontIsSecondary; + if (mGraphics2D != null) { + mGraphics2D.setFont(mPrimaryFont); + mFontRenderContext = mGraphics2D.getFontRenderContext(); + } + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-05-18 01:55:14
|
Revision: 72 http://openpcl.svn.sourceforge.net/openpcl/?rev=72&view=rev Author: documentsystems Date: 2007-05-17 18:55:15 -0700 (Thu, 17 May 2007) Log Message: ----------- Howard-H. 3 changes: 1. Added Hover Help to screen items that shows the text string of the item, and optionally starts with "Not implemented:" if that item isn't implemented yet. 2. Fixed bug where clicking the D, S, M, L buttons to change the font and overall dialog size, changed the height OK but failed to change the overall dialog width. 3. Changed the group panel border color from blue to etched border. 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-05-16 02:21:13 UTC (rev 71) +++ openpcl/src/com/openpcl/viewer/printing/PosPrintSetupDialog.java 2007-05-18 01:55:15 UTC (rev 72) @@ -144,6 +144,11 @@ 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."; + public PosPrintSetupDialog(PosView pPosView, String pTitleBarText, PosPrintSetupDialogChoices pPrintChoices, PrintRequestAttributeSet pAttributes, PrinterJob pPrinterJob, String pSelectedPageNumbers) throws HeadlessException { @@ -320,6 +325,7 @@ mTitledBorderFont = mTitledBorderSmallFont; adjustFontOnDialogItems(mAdjustToSmallFont); putPrintChoicesOnScreen(); + setHoverHelpOnItems(); // Make dialog box outer frame width and height exactly to be all item's preferred sizes pack(); @@ -544,15 +550,21 @@ makePanelTitledBorders(); for (JComponent jc : mItemsOnDialogBox) { if (jc != null) { + // Set the passed in Font on each of the items on the screen jc.setFont(pFont); - } + // Set the preferred size as the minimum size because Window.pack() makes the window smaller height wise + // but not width wise, so here correct for that problem + jc.setPreferredSize(jc.getMinimumSize()); + if (jc == mListOfPrintersJList) { + // Adjust the width and height of the list of printers using the current set font + mListOfPrintersJPanel.setMinimumSize(new Dimension(pFont.getSize() * 35, pFont.getSize() * 12)); + } + } } } private void makePanelTitledBorders() { mListOfPrintersJPanel.setBorder(generateTitledBorder("Installed Printers")); - mListOfPrintersJPanel.setPreferredSize(new Dimension( - mTitledBorderFont.getSize() * 30, mTitledBorderFont.getSize() * 12)); mPrintFormatJPanel.setBorder(generateTitledBorder("Print Format")); mPrintBarCodesJPanel.setBorder(generateTitledBorder("Print Bar Codes")); mPrintOrderJPanel.setBorder(generateTitledBorder("Print Order")); @@ -563,8 +575,8 @@ private TitledBorder generateTitledBorder(String title) { // Conditional execution based on startup option if (mPosStartupOptions.getShowDSMLPrintDialogButtons()) { - return BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLUE), title, TitledBorder.LEFT, - TitledBorder.TOP, mTitledBorderFont, Color.BLACK); + return(new TitledBorder(BorderFactory.createEtchedBorder(), title, + TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, mTitledBorderFont, Color.BLACK)); } else { // RobD 1/4/07. Updated Border To be consistent with DMO/LM Titles Borders return(new TitledBorder(BorderFactory.createEtchedBorder(), title, @@ -631,6 +643,22 @@ } } + private void setHoverHelpOnItems() { + mAddlCopiesJTextField.setToolTipText(sNotImplementedString + "Additional copies"); + mPrintFormatIsPclDirectJRadioButton.setToolTipText("Print PCL direct"); + mPrintFormatIsGdiDriverJRadioButton.setToolTipText("Print GDI driver"); + mPrintBarCodesYesJRadioButton.setToolTipText(sBarCodeHoverString); + mPrintBarCodesNoJRadioButton.setToolTipText(sBarCodeHoverString); + 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"); + mPrintFormNamesNoJRadioButton.setToolTipText("Don't print form names"); + mDuplexYesJRadioButton.setToolTipText(sNotImplementedString + "Duplex pages"); + mDuplexNoJRadioButton.setToolTipText("Don't duplex pages"); + mPrintAllOnLegalSizeJCheckBox.setToolTipText(sNotImplementedString + "Print all on Legal size"); + } + public class DialogWindowListener implements WindowListener { public void windowOpened(WindowEvent e) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-05-16 02:21:23
|
Revision: 71 http://openpcl.svn.sourceforge.net/openpcl/?rev=71&view=rev Author: documentsystems Date: 2007-05-15 19:21:13 -0700 (Tue, 15 May 2007) Log Message: ----------- Howard-H. In the index.html file for the web site, on the "Contact" page, added an explanation about posting to the OpenPCL SourceForge forum. Modified Paths: -------------- openpcl/src/com/openpcl/install/website/index.html Modified: openpcl/src/com/openpcl/install/website/index.html =================================================================== --- openpcl/src/com/openpcl/install/website/index.html 2007-05-10 00:20:38 UTC (rev 70) +++ openpcl/src/com/openpcl/install/website/index.html 2007-05-16 02:21:13 UTC (rev 71) @@ -1,262 +1,277 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>OpenPCL Open Source PCL Viewer & Toolkit</title> - <style type="text/css"> - body, td { font-family:Tahoma,Arial; font-size:10pt; color:#808080; } - #mainDiv { margin-top:25px; margin-bottom:25px; } - /* #taglineDiv { position:relative; top:5px; text-align:right; } */ - #tabDiv { position:relative; top:25px; width:612px; align:right; } - table.header { width:800px; margin:0px; padding:0px; background-color:#ffffff } - table.tabBody { width:800px; background-color:#ffffff } - table.copyright { width:760px; background-color:#ffffff; border-top:1px solid #7C90B3; } - td.tabOn, td.tabOff { color:#808080; font-weight:bold; background-color:#ffffff; width:80px; text-align:center } - td.tabOff { color:#ffffff; background-image: url(images/tabOffBg.png) } - a.copyright, td.copyright { color:#808080; font-size:8pt; } - #homeDiv, #openpclviewerDiv , #projectsDiv, #developersDiv, #contactDiv { margin:20px 10px 20px 20px; width:520px } - #downloadDiv { margin:20px 20px 20px 10px; width:200px } - h1 { font-size:18pt; color:#FF0000; margin-bottom:10px; margin-top:0px } - h2 { font-size:11pt; color:#808080; margin-bottom:4px; margin-top:0px } - td.download { text-align:center; } - .downloadReq { font-size:8pt; } - .downloadLink { font-size:11pt; font-weight:bold; } - </style> - <script language="Javascript"> - function loadContent(aSection) { - var sectionArr = new Array('home','openpclviewer','projects','developers','contact'); - for(ii=0; ii<sectionArr.length; ii++ ) { - if( aSection!=sectionArr[ii] ) { - document.getElementById(sectionArr[ii]+"TabLeftImg").src="images/tabOffLeft.png"; - document.getElementById(sectionArr[ii]+"TabTD").className = "tabOff"; - document.getElementById(sectionArr[ii]+"TabRightImg").src="images/tabOffRight.png"; - document.getElementById(sectionArr[ii]+"Div").style.display = "none"; - } - } - document.getElementById(aSection+"TabLeftImg").src="images/tabOnLeft.png"; - document.getElementById(aSection+"TabTD").className = "tabOn"; - document.getElementById(aSection+"TabRightImg").src="images/tabOnRight.png"; - document.getElementById(aSection+"Div").style.display = ""; - } - function checkDownloadDiv() { - if( navigator.platform!="Win32" ) { - document.getElementById("downloadWin32Div").style.display = "none"; - document.getElementById("downloadOtherDiv").style.display = ""; - } +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <title>OpenPCL Open Source PCL Viewer & Toolkit</title> + <style type="text/css"> + body, td { font-family:Tahoma,Arial; font-size:10pt; color:#808080; } + #mainDiv { margin-top:25px; margin-bottom:25px; } + /* #taglineDiv { position:relative; top:5px; text-align:right; } */ + #tabDiv { position:relative; top:25px; width:612px; align:right; } + table.header { width:800px; margin:0px; padding:0px; background-color:#ffffff } + table.tabBody { width:800px; background-color:#ffffff } + table.copyright { width:760px; background-color:#ffffff; border-top:1px solid #7C90B3; } + td.tabOn, td.tabOff { color:#808080; font-weight:bold; background-color:#ffffff; width:80px; text-align:center } + td.tabOff { color:#ffffff; background-image: url(images/tabOffBg.png) } + a.copyright, td.copyright { color:#808080; font-size:8pt; } + #homeDiv, #openpclviewerDiv , #projectsDiv, #developersDiv, #contactDiv { margin:20px 10px 20px 20px; width:520px } + #downloadDiv { margin:20px 20px 20px 10px; width:200px } + h1 { font-size:18pt; color:#FF0000; margin-bottom:10px; margin-top:0px } + h2 { font-size:11pt; color:#808080; margin-bottom:4px; margin-top:0px } + td.download { text-align:center; } + .downloadReq { font-size:8pt; } + .downloadLink { font-size:11pt; font-weight:bold; } + </style> + <script language="Javascript"> + function loadContent(aSection) { + var sectionArr = new Array('home','openpclviewer','projects','developers','contact'); + for(ii=0; ii<sectionArr.length; ii++ ) { + if( aSection!=sectionArr[ii] ) { + document.getElementById(sectionArr[ii]+"TabLeftImg").src="images/tabOffLeft.png"; + document.getElementById(sectionArr[ii]+"TabTD").className = "tabOff"; + document.getElementById(sectionArr[ii]+"TabRightImg").src="images/tabOffRight.png"; + document.getElementById(sectionArr[ii]+"Div").style.display = "none"; + } + } + document.getElementById(aSection+"TabLeftImg").src="images/tabOnLeft.png"; + document.getElementById(aSection+"TabTD").className = "tabOn"; + document.getElementById(aSection+"TabRightImg").src="images/tabOnRight.png"; + document.getElementById(aSection+"Div").style.display = ""; } + function checkDownloadDiv() { + if( navigator.platform!="Win32" ) { + document.getElementById("downloadWin32Div").style.display = "none"; + document.getElementById("downloadOtherDiv").style.display = ""; + } + } function mouseTrigger(aElement, aOver) { if( aOver ) { aElement.style.cursor = "pointer"; } else { aElement.style.cursor = "default"; } - } - </script> -</head> - -<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" background="images/bg.png" onload="checkDownloadDiv()"> - -<center> - -<div id="mainDiv"> - <table class="header" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td><img src="images/headerLeft.png" width="20" height="75" border="0"/></td> - <td><img src="images/openPCL.png" width="148" height="75" border="0" alt="OpenPCL"/></td> - <td align="right" background="images/headerBg.png"> - <div id="tabDiv"> - <table border="0" cellpadding="0" cellspacing="0"> - <tr> - <td><img id="homeTabLeftImg" src="images/tabOnLeft.png" width="10" height="25"></td> - <td id="homeTabTD" class="tabOn" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('home')">Home</td> - <td><img id="homeTabRightImg" src="images/tabOnRight.png" width="10" height="25"></td> - <td><img src="images/shim.png" width="4" height="1" border="0"/></td> - <td><img id="openpclviewerTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> - <td id="openpclviewerTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('openpclviewer')">Viewer</td> - <td><img id="openpclviewerTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> - <td><img src="images/shim.png" width="4" height="1" border="0"/></td> - <td><img id="projectsTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> - <td id="projectsTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('projects')">Projects</td> - <td><img id="projectsTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> - <td><img src="images/shim.png" width="4" height="1" border="0"/></td> - <td><img id="developersTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> - <td id="developersTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('developers')">Developers</td> - <td><img id="developersTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> - <td><img src="images/shim.png" width="4" height="1" border="0"/></td> - <td><img id="contactTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> - <td id="contactTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('contact')">Contact</td> - <td><img id="contactTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> - </tr> - </table> - </div> - </td> - <td><img src="images/headerRight.png" width="20" height="75" border="0"/></td> - </tr> - </table> - <table class="tabBody"> - <tr> - <td valign="top"> - <div id="homeDiv" style="display:"> - <h1>Welcome</h1> - We are proud to launch OpenPCL. This is an effort to provide - the community with quality open source PCL tools including - a <b>free open source PCL viewer</b> (OpenPCLViewer) that can be used immediately - to view, paginate & print PCL Level 5 (HP LaserJet III 1990 standard) file. - <p/> - We have also provided an open source library that can be - integrated into your backend applications for processing PCL files - and converting them into different image outputs. - <p/> - <h2>What is PCL?</h2> - PCL is an acronym for <b>Printer Control Language</b> and is a - page description language developed by - <a href="http://www.hp.com" target="_blank">HP</a> as a printer protocol. - <a href="http://en.wikipedia.org/wiki/Printer_Command_Language" target="_blank">Read more at Wikipedia</a> - </div> - <div id="openpclviewerDiv" style="display:none"> - <h1>OpenPCLViewer</h1> - The first open source PCL Viewer released by OpenPCL. - <ul> - <li>Supports PCL Level 5 (HP LaserJet III, circa 1990).</li> - <li>Runs on Windows PCs, Macintosh, UNIX, Linux.</li> - <li>Open PCL files on any mapped drive, or from a URL that points to a PCL file.</li> - <li>You can open up to 9 PCL files in MDI frames that you can tile and cascade.</li> - <li>See on screen the different pages of a multi page PCL file by clicking on the - different page nodes in the tree on the left (or arrow up/down, or click the - next/previous toolbar buttons). A toolbar button shows/hides the tree. Each PCL file - you open has its own navigation tree.</li> - <li>Print All/Selected/Remaining pages to any of your current installed printers.</li> - <li>Zoom width is automatic upon file open, and tile/cascade, and when the view frame - width changes, and when you show or hide the pages tree, and if you click the - toolbar zoom width button.</li> - <li>You can zoom in/out by clicking the "Show/Hide Zoom Slider" button on the - toolbar, and on the popup zoom slider you can either click the direct zoom buttons, - or drag the zoom slider pointer left or right. Also there are zoom in/out buttons on - the toolbar.</li> - <li>Each PCL file on screen has its own zoom independent of the others, and the zoom - width button on the toolbar always shows the current zoom factor of the last clicked - on view</li> - </ul> - <h2>Other PCL Viewer Projects</h2> - <li><a href="http://www.pclreader.com/" target="_blank">PageTech PCLReader</a> - Free (but not open source), Windows Only</li> - <li><a href="http://www.swiftview.com/sview1.htm" target="_blank">SwiftView/eLynx Viewer</a> - Commercial (not free)</li> - <li><a href="http://www.verydoc.com/pcl-viewer.html" target="_blank">Verydoc PCL Toolkit</a> - Commercial (not free)</li> - <li><a href="http://www.lincolnco.com/pcl-viewer.htm" target="_blank">Lincoln & Co LDV & PageView</a> - Commercial (not free)</li> - </div> - <div id="projectsDiv" style="display:none"> - <h1>Projects</h1> - OpenPCL is composed of multiple projects. - Our projects are hosted at - <a href="http://sourceforge.net/projects/openpcl">http://sourceforge.net/projects/openpcl</a> - <p/> - <h2>OpenPCLViewer</h2> - The first open source PCL Viewer. - <a href="javascript:loadContent('openpclviewer')">Read more about it here.</a> - <p/> - <h2>PclRenderImage</h2> - This is the server component that is used by OpenPCLViewer. This component - can be embedded in your server backend to process and convert PCL - files into different types of image outputs. - </div> - <div id="developersDiv" style="display:none"> - <h1>Developers</h1> - OpenPCLViewer has been designed to be embedded into your external Java Swing - app anywhere you want to put it, or run as a Java Applet on your web page because - it's a subclass of a JPanel instead of a JFrame. - <p/> - Both the openpcl.jar and pclrenderimage.jar files have public API methods that - you can call to control everything it can do. - <p/> - Optionally the default toolbar can be hidden but this means your external app's UI - code needs to have the menu items and toolbar buttons that have action listeners - that call the API methods to control everything. - <p/> - If desired, instead of opening a PCL file, a byte array of PCL that came from a - database can be passed to an API method that returns the image to show on the - screen. - <p/> - You can directly use the non UI based pclrenderimage.jar file to render the image - from passed in PCL bytes and you can put the image that it returns on the screen in - your own JPanel without using the UI based openpcl.jar file at all. - <p/> - <h2>License</h2> - OpenPCL releases all projects under the - <a href="http://opensource.org/licenses/lgpl-license.php" target="_blank">GNU Lesser GNU General Public License</a> - <p/> - <h2>Sourceforge Project</h2> - <a href="http://sourceforge.net/projects/openpcl">http://sourceforge.net/projects/openpcl</a> - <p/> - <h2>Documentation</h2> - <a href="doc/api">API</a> - </div> - <div id="contactDiv" style="display:none"> - <h1>Contact</h1> - We are very excited to hear from you about this project and how you - are using it as an end user or as a developer. - <p/> - For questions, comments or to contribute, please send email to: - <br/> - <a href="mailto:op...@do...">op...@do...</a> - <p/> - <p/> - <p/> - <p/> - </div> - </td> - <td valign="top"> - <div id="downloadDiv"> - <table cellpadding="0" cellspacing="0" border="0"> - <tr> - <td><img src="images/downloadLeft.png" width="10" height="121" border="0"/></td> - <td background="images/downloadBg.png" class="download"> - <div id="downloadWin32Div"> - <a href="openpclviewer-setup.exe" class="downloadLink"> - Download OpenPCL Viewer Now!</a><br/> - v.0.6 (Alpha) for Windows<br/> - </div> - <div id="downloadOtherDiv" style="display:none"> - <a href="openpclviewer-installer.jar" class="downloadLink"> - Download OpenPCL Viewer Now!</a><br/> - v.0.6 (Alpha) for Mac/Linux<br/> - <span class="downloadReq"> - Requires Java JRE 1.5<br/> - </span> - </div> - <br style="font-size:5pt"/> - <a href="openpclviewer.jnlp" class="downloadLink">Run as WebStart</a><br/>(no local install)<br/> - <span class="downloadReq">Requires Java JRE 1.5</span> - </td> - <td><img src="images/downloadRight.png" width="10" height="121" border="0"/></td> - </tr> - </table> - <br/> - <li><a href="applet.html">Run Viewer in an Applet</a> in your default browser.</li> - <li><a href="openpclviewer-installer.jar">JAR Installer</a> (JDK 1.5)</li> - <li><a href="sample.pcl">Sample PCL File</a> (20 pages)</li> - <li><a href="openpcl.zip">Download source</a></li> - <p/> - <center> - <a href="http://www.sourceforge.net"><img src="images/sourceforge.png" width="88" height="31" alt="Sourceforge.net" border="0"></a> - <p/> - </center> - </div> - </td> - </tr> - </table> - <table class="copyright"> - <tr> - <td class="copyright"> - <a href="javascript:loadContent('home')" class="copyright">Home</a> | - <a href="javascript:loadContent('openpclviewer')" class="copyright">OpenPCLViewer</a> | - <a href="javascript:loadContent('projects')" class="copyright">Projects</a> | - <a href="javascript:loadContent('developers')" class="copyright">Developer</a> | - <a href="javascript:loadContent('contact')" class="copyright">Contact</a> - </td> - <td align="right" class="copyright">Copyright 2007 OpenPCL. Sponsored by <a href="http://www.docmagic.com" class="copyright">DocMagic, Inc.</a></td> - </tr> - </table> -</div> - -</center> - -</body> + } + </script> +</head> + +<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" background="images/bg.png" onload="checkDownloadDiv()"> + +<center> + +<div id="mainDiv"> + <table class="header" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><img src="images/headerLeft.png" width="20" height="75" border="0"/></td> + <td><img src="images/openPCL.png" width="148" height="75" border="0" alt="OpenPCL"/></td> + <td align="right" background="images/headerBg.png"> + <div id="tabDiv"> + <table border="0" cellpadding="0" cellspacing="0"> + <tr> + <td><img id="homeTabLeftImg" src="images/tabOnLeft.png" width="10" height="25"></td> + <td id="homeTabTD" class="tabOn" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('home')">Home</td> + <td><img id="homeTabRightImg" src="images/tabOnRight.png" width="10" height="25"></td> + <td><img src="images/shim.png" width="4" height="1" border="0"/></td> + <td><img id="openpclviewerTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> + <td id="openpclviewerTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('openpclviewer')">Viewer</td> + <td><img id="openpclviewerTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> + <td><img src="images/shim.png" width="4" height="1" border="0"/></td> + <td><img id="projectsTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> + <td id="projectsTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('projects')">Projects</td> + <td><img id="projectsTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> + <td><img src="images/shim.png" width="4" height="1" border="0"/></td> + <td><img id="developersTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> + <td id="developersTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('developers')">Developers</td> + <td><img id="developersTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> + <td><img src="images/shim.png" width="4" height="1" border="0"/></td> + <td><img id="contactTabLeftImg" src="images/tabOffLeft.png" width="10" height="25"></td> + <td id="contactTabTD" class="tabOff" onmouseover="mouseTrigger(this,true)" onmouseout="mouseTrigger(this,false)" onclick="loadContent('contact')">Contact</td> + <td><img id="contactTabRightImg" src="images/tabOffRight.png" width="10" height="25"></td> + </tr> + </table> + </div> + </td> + <td><img src="images/headerRight.png" width="20" height="75" border="0"/></td> + </tr> + </table> + <table class="tabBody"> + <tr> + <td valign="top"> + <div id="homeDiv" style="display:"> + <h1>Welcome</h1> + We are proud to launch OpenPCL. This is an effort to provide the community with quality open source + PCL tools including a <b>free open source PCL viewer</b> (OpenPCLViewer) that can be used immediately + to view, paginate & print PCL Level 5 (HP LaserJet III 1990 standard) file. + <p/> + <h2>What is PCL?</h2> + PCL is an acronym for <b>Printer Control Language</b> and is a + page description language developed by + <a href="http://www.hp.com" target="_blank">HP</a> as a printer protocol. + <a href="http://en.wikipedia.org/wiki/Printer_Command_Language" target="_blank">Read more at Wikipedia</a> + </div> + <div id="openpclviewerDiv" style="display:none"> + <h1>OpenPCLViewer</h1> + The first open source PCL Viewer released by OpenPCL. + <ul> + <li>Supports PCL Level 5 (HP LaserJet III, circa 1990).</li> + <li>Runs on Windows PCs, Macintosh, UNIX, Linux.</li> + <li>Open PCL files on any mapped drive, or from a URL that points to a PCL file.</li> + <li>You can open up to 9 PCL files in MDI frames that you can tile and cascade.</li> + <li>See on screen the different pages of a multi page PCL file by clicking on the + different page nodes in the tree on the left (or arrow up/down, or click the + next/previous toolbar buttons). A toolbar button shows/hides the tree. Each PCL file + you open has its own navigation tree.</li> + <li>Print All/Selected/Remaining pages to any of your current installed printers.</li> + <li>Zoom width is automatic upon file open, and tile/cascade, and when the view frame + width changes, and when you show or hide the pages tree, and if you click the + toolbar zoom width button.</li> + <li>You can zoom in/out by clicking the "Show/Hide Zoom Slider" button on the + toolbar, and on the popup zoom slider you can either click the direct zoom buttons, + or drag the zoom slider pointer left or right. Also there are zoom in/out buttons on + the toolbar.</li> + <li>Each PCL file on screen has its own zoom independent of the others, and the zoom + width button on the toolbar always shows the current zoom factor of the last clicked + on view</li> + </ul> + <h2>Other PCL Viewer Projects</h2> + <li><a href="http://www.pclreader.com/" target="_blank">PageTech PCLReader</a> - Free (but not open source), Windows Only</li> + <li><a href="http://www.swiftview.com/sview1.htm" target="_blank">SwiftView/eLynx Viewer</a> - Commercial (not free)</li> + <li><a href="http://www.verydoc.com/pcl-viewer.html" target="_blank">Verydoc PCL Toolkit</a> - Commercial (not free)</li> + <li><a href="http://www.lincolnco.com/pcl-viewer.htm" target="_blank">Lincoln & Co LDV & PageView</a> - Commercial (not free)</li> + </div> + <div id="projectsDiv" style="display:none"> + <h1>Projects</h1> + The OpenPCL project is hosted at + <a href="http://sourceforge.net/projects/openpcl">http://sourceforge.net/projects/openpcl</a> + <p/> + <h2>OpenPCLViewer</h2> + The first open source PCL Viewer. + <a href="javascript:loadContent('openpclviewer')">Read more about it here.</a> + <p/> + <h2>PclRenderImage</h2> + This is the non-UI component that parses and draws the PCL which OpenPCLViewer puts on the screen. + <br><br> + Alternately, PclRenderImage.jar can be on your server backend and called from your Java code as a + non-UI engine to convert PCL bytes that can come from a database or from files on the server, + into a java.awt.image.BufferedImage. The Java code that you write can save the image for viewing later, + or can subclass PclRenderImage to reuse the PCL parsing but get code control in your Java code to draw + to other image formats like JPG, PNG, TIFF, PDF instead of making the BufferedImage. + </div> + <div id="developersDiv" style="display:none"> + <h1>Developers</h1> + OpenPCLViewer has been designed to be embedded into your external Java Swing + app anywhere you want to put it, or run as a Java Applet on your web page because + it's a subclass of a JPanel instead of a JFrame. + <br><br> + Both the openpcl.jar and pclrenderimage.jar files have public API methods that + you can call to control everything it can do. + <br><br> + Optionally the default toolbar can be hidden but this means your external app's UI + code needs to have the menu items and toolbar buttons that have action listeners + that call the API methods to control everything. + <br><br> + If desired, instead of opening a PCL file, a byte array of PCL that came from a + database can be passed to an API method that returns the image to show on the + screen. + <br><br> + You can directly use the non UI based pclrenderimage.jar file to render the image + from passed in PCL bytes and you can put the image that it returns on the screen in + your own JPanel without using the UI based openpcl.jar file at all. + <p/> + <h2>License</h2> + OpenPCL releases all projects under the + <a href="http://opensource.org/licenses/lgpl-license.php" target="_blank">GNU Lesser GNU General Public License</a> + <p/> + <h2>Sourceforge Project</h2> + <a href="http://sourceforge.net/projects/openpcl">http://sourceforge.net/projects/openpcl</a> + <p/> + <h2>Documentation</h2> + <a href="doc/api">API</a> + </div> + <div id="contactDiv" style="display:none"> + <h1>Contact</h1> + We are very excited to hear from you about this project and how you + are using it as an end user or as a developer. + <br><br> + For questions, comments or to contribute, please send email to: + <br> + <a href="mailto:op...@do...">op...@do...</a> + <br><br> + Note that your questions and comments sent to op...@do..., and answers back to you, we may + post on the OpenPCL SourceForge forum as publicly readable so that everyone can benefit from the + information, or instead of eMailing to op...@do..., you can go to one of the below 3 links + and post your question directly on the OpenPCL SourceForge forum. This will require you to create a + SourceForge login using your eMail address and a password to post on the forum. + <h5><ol><li> + <a href="https://sourceforge.net/forum/forum.php?forum_id=680098" target="_blank"> + Developers: Discussions regarding extending/modifying the software.</a> + </li> + <br><br> + <li> + <a href="https://sourceforge.net/forum/forum.php?forum_id=680097" target="_blank"> + Help: Discussions regarding downloading/using the software.</a> + </li> + <br><br> + <li> + <a href="https://sourceforge.net/forum/forum.php?forum_id=680096" target="_blank"> + Open Discussion: Discussions regarding future directions/wishlists and more.</a> + </li></ol></h5> + <br> + </div> + </td> + <td valign="top"> + <div id="downloadDiv"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><img src="images/downloadLeft.png" width="10" height="121" border="0"/></td> + <td background="images/downloadBg.png" class="download"> + <div id="downloadWin32Div"> + <a href="openpclviewer-setup.exe" class="downloadLink"> + Download OpenPCL Viewer Now!</a><br/> + v.0.6 (Alpha) for Windows<br/> + </div> + <div id="downloadOtherDiv" style="display:none"> + <a href="openpclviewer-installer.jar" class="downloadLink"> + Download OpenPCL Viewer Now!</a><br/> + v.0.6 (Alpha) for Mac/Linux<br/> + <span class="downloadReq"> + Requires Java JRE 1.5<br/> + </span> + </div> + <br style="font-size:5pt"/> + <a href="openpclviewer.jnlp" class="downloadLink">Run as WebStart</a><br/>(no local install)<br/> + <span class="downloadReq">Requires Java JRE 1.5</span> + </td> + <td><img src="images/downloadRight.png" width="10" height="121" border="0"/></td> + </tr> + </table> + <br/> + <li><a href="applet.html">Run Viewer in an Applet</a> in your default browser.</li> + <li><a href="openpclviewer-installer.jar">JAR Installer</a> (JDK 1.5)</li> + <li><a href="sample.pcl">Sample PCL File</a> (20 pages)</li> + <li><a href="openpcl.zip">Download source</a></li> + <p/> + <center> + <a href="http://www.sourceforge.net"><img src="images/sourceforge.png" width="88" height="31" alt="Sourceforge.net" border="0"></a> + <p/> + </center> + </div> + </td> + </tr> + </table> + <table class="copyright"> + <tr> + <td class="copyright"> + <a href="javascript:loadContent('home')" class="copyright">Home</a> | + <a href="javascript:loadContent('openpclviewer')" class="copyright">OpenPCLViewer</a> | + <a href="javascript:loadContent('projects')" class="copyright">Projects</a> | + <a href="javascript:loadContent('developers')" class="copyright">Developer</a> | + <a href="javascript:loadContent('contact')" class="copyright">Contact</a> + </td> + <td align="right" class="copyright">Copyright 2007 OpenPCL. Sponsored by <a href="http://www.docmagic.com" class="copyright">DocMagic, Inc.</a></td> + </tr> + </table> +</div> + +</center> + +</body> </html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |