From: <bma...@us...> - 2017-06-06 15:29:36
|
Revision: 9626 http://sourceforge.net/p/fudaa/svn/9626 Author: bmarchan Date: 2017-06-06 15:29:33 +0000 (Tue, 06 Jun 2017) Log Message: ----------- LSPIV : Ouverture automatique du rapport de jaugeage Modified Paths: -------------- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java =================================================================== --- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2017-06-06 15:29:06 UTC (rev 9625) +++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2017-06-06 15:29:33 UTC (rev 9626) @@ -7,6 +7,7 @@ */ package org.fudaa.fudaa.piv.action; +import java.awt.Desktop; import java.awt.event.ActionEvent; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; @@ -330,7 +331,7 @@ } /** - * Sauve le rapport sur le fichier selectionn\xE9. + * Sauve le rapport sur le fichier selectionn\xE9, et l'ouvre automatiquement. * @param wb * @throws IOException */ @@ -359,6 +360,15 @@ } wb.write(new FileOutputStream(fcReport_.getSelectedFile())); + + // Ouverture directe de l'application associ\xE9e au fichier .xlsx + if (Desktop.isDesktopSupported()) { + try { + Desktop.getDesktop().open(fcReport_.getSelectedFile()); + } + catch (Exception _exc) { + } + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |