From: <doc...@us...> - 2007-08-06 17:43:29
|
Revision: 142 http://openpcl.svn.sourceforge.net/openpcl/?rev=142&view=rev Author: documentsystems Date: 2007-08-06 10:43:28 -0700 (Mon, 06 Aug 2007) Log Message: ----------- Howard Hoagland. In PosSimpleJFrame, in the addWindowListener on the JFrame, changed the call to mOpenPCLViewer.actionCloseAllFiles() to call actionAppIsExiting() instead, because that's where the save print setup dialog options is done, and it calls the actionCloseAllFiles(). Modified Paths: -------------- openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java Modified: openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java =================================================================== --- openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java 2007-08-06 17:38:00 UTC (rev 141) +++ openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java 2007-08-06 17:43:28 UTC (rev 142) @@ -82,8 +82,13 @@ addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { + // Call the OpenPCLViewer AppIsExiting + mOpenPCLViewer.actionAppIsExiting(); + + // Save the JFrame's location (x,y) and (width,height) and window state (maximized/minimized) savePersistedOuterFrameValues(); - mOpenPCLViewer.actionCloseAllFiles(); + + // Close the JFrame and the app System.exit(0); } public void windowIconified(WindowEvent we) { @@ -393,7 +398,6 @@ //************************************************************************************* // File, Exit - // File, Close menu item protected ActionListener createExitAppActionListener() { return new ActionListener() { public void actionPerformed(ActionEvent e) {exitAppActionPerformed(e);} @@ -406,6 +410,7 @@ // Save the JFrame's location (x,y) and (width,height) and window state (maximized/minimized) savePersistedOuterFrameValues(); + // Close the JFrame and the app System.exit(0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-08-21 21:03:27
|
Revision: 159 http://openpcl.svn.sourceforge.net/openpcl/?rev=159&view=rev Author: documentsystems Date: 2007-08-21 14:03:25 -0700 (Tue, 21 Aug 2007) Log Message: ----------- Howard Hoagland. If System.getProperty("os.name") has "WIN" anywhere (could be any version of Windows), then at app startup time, set the LookAndFeel to com.sun.java.swing.plaf.windows.WindowsLookAndFeel" so that it doesn't default to the Metal Ocean Theme look and feel like it was doing before. Else, let the running JVM set it's default look and feel (for when this app is run on a non Windows platform like a Macintosh, Unix, Linux. Modified Paths: -------------- openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java Modified: openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java =================================================================== --- openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java 2007-08-21 20:22:41 UTC (rev 158) +++ openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java 2007-08-21 21:03:25 UTC (rev 159) @@ -27,12 +27,23 @@ import javax.swing.JTextField; import javax.swing.JToolBar; import javax.swing.KeyStroke; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; import javax.swing.WindowConstants; import com.openpcl.viewer.OpenPCLViewer; import com.openpcl.viewer.options.PosStartupOptions; import com.openpcl.viewer.util.PosReadImageIcon; +/** + * PosSimpleJFrame is a JFrame that puts the OpenPCLViewer (a JPanel) on the screen in the JFrame's layout. + * The OpenPCLViewer panel sends PCL bytes to the PclRenderImage class that is in the .jar file of that name. + * PclRenderImage and its related classes parse the PCL bytes and then draws/renders the PCL image on a + * BufferedImage which OpenPCLViewer puts on the screen along with the JTree that has tree nodes for the + * possibly multi page PCL bytes. + * + * @author DocMagic, Document Systems Inc, HowardH. 9/20/06 + */ public class PosSimpleJFrame extends JFrame { private static final long serialVersionUID = 1L; @@ -54,15 +65,6 @@ protected JPanel mPclViewerOuterJPanel = null; protected int mModeToRun = PosStartupOptions.sModeToRunNotSelected; - /** - * Constructor - * PosSimpleJFrame is a JFrame that puts the OpenPCLViewer (a JPanel) on the screen in the JFrame's layout. - * The OpenPCLViewer panel sends PCL bytes to the PclRenderImage class that is in the .jar file of that name. - * PclRenderImage and its related classes parse the PCL bytes and then draws/renders the PCL image on a - * BufferedImage which OpenPCLViewer puts on the screen along with the JTree that has tree nodes for the - * possibly multi page PCL bytes. - * @author howard 9/20/06 - */ public PosSimpleJFrame(int pModeToRun) { mModeToRun = pModeToRun; @@ -104,18 +106,17 @@ // The above WindowListener.windowClosing() will be called setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); - // Uncomment the below code if you want to specify a specific LookAndFeel at program startup time - // instead of let the client's JVM (could be Macintosh or Unix for example) set it's default LookAndFeel -// try { -// UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); -// OR -// UIManager.setLookAndFeel("/* Any other full package path and LookAndFeel subclass */"); -// } catch (ClassNotFoundException e) {e.printStackTrace(); -// } catch (InstantiationException e) {e.printStackTrace(); -// } catch (IllegalAccessException e) {e.printStackTrace(); -// } catch (UnsupportedLookAndFeelException e) {e.printStackTrace(); -// } - + // Specify a specific LookAndFeel at program startup time instead of let the client's JVM set it's default LookAndFeel + // (could be Windows or Macintosh or Unix for example) + if ((OpenPCLViewer.sOsNameString).toUpperCase().contains("WIN")) { + try { + UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + } catch (ClassNotFoundException e) {e.printStackTrace(); + } catch (InstantiationException e) {e.printStackTrace(); + } catch (IllegalAccessException e) {e.printStackTrace(); + } catch (UnsupportedLookAndFeelException e) {e.printStackTrace(); + } + } // Build the UI elements buildSimpleUI(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <doc...@us...> - 2007-11-08 02:01:44
|
Revision: 188 http://openpcl.svn.sourceforge.net/openpcl/?rev=188&view=rev Author: documentsystems Date: 2007-11-07 18:01:46 -0800 (Wed, 07 Nov 2007) Log Message: ----------- Took off the app description and app version from the title bar, because those are in the Help About. Now the only thing on the title bar is "ViewMagic" Modified Paths: -------------- openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java Modified: openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java =================================================================== --- openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java 2007-11-05 20:10:30 UTC (rev 187) +++ openpcl/src/com/openpcl/viewer/jframe/PosSimpleJFrame.java 2007-11-08 02:01:46 UTC (rev 188) @@ -322,7 +322,7 @@ mAppName = mOpenPCLViewer.getAppName(); mAppDescription = mOpenPCLViewer.getAppDescription(); mAppVersion = mOpenPCLViewer.getAppVersion(); - setTitle(mAppName + mAppDescription + ". " + mAppVersion); + setTitle(mAppName); // The below add to the outer JPanel in its BorderLayout will update the JFrame's screen area mPclViewerOuterJPanel.add(mOpenPCLViewer, BorderLayout.CENTER); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |