Author: vsalaun Date: 2011-05-20 16:26:33 +0200 (Fri, 20 May 2011) New Revision: 3137 Url: http://chorem.org/repositories/revision/lima/3137 Log: #395 correction du bug dans les JDialog lors de la fermeture Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2011-05-20 14:24:39 UTC (rev 3136) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2011-05-20 14:26:33 UTC (rev 3137) @@ -26,6 +26,8 @@ package org.chorem.lima.ui.account; import static org.nuiton.i18n.I18n._; + +import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.tree.TreePath; import org.apache.commons.logging.Log; @@ -87,6 +89,7 @@ // jaxx constructor don't call super() ? accountForm.setLocationRelativeTo(view); accountForm.setVisible(true); + accountForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); // null == cancel action newAccount = accountForm.getAccount(); @@ -133,6 +136,7 @@ // jaxx constructor don't call super() ? subledgerForm.setLocationRelativeTo(view); subledgerForm.setVisible(true); + subledgerForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); newAccount=subledgerForm.getAccount(); // null == cancel action @@ -189,6 +193,7 @@ // jaxx constructor don't call super() ? accountForm.setLocationRelativeTo(view); accountForm.setVisible(true); + accountForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); // null == cancel action selectedObject = accountForm.getAccount(); } @@ -199,6 +204,7 @@ // jaxx constructor don't call super() ? subLedgerForm.setLocationRelativeTo(view); subLedgerForm.setVisible(true); + subLedgerForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); // null == cancel action selectedObject = subLedgerForm.getAccount(); } @@ -276,6 +282,7 @@ // form.setLocationRelativeTo(view); form.setVisible(true); + form.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); ImportExport importExport = ImportExport.getInstance(view); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java 2011-05-20 14:24:39 UTC (rev 3136) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java 2011-05-20 14:26:33 UTC (rev 3137) @@ -171,7 +171,6 @@ public void refresh(){ datasCache = getDataList(); - System.out.println(datasCache); fireContentsChanged(this, 0, datasCache.size()); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2011-05-20 14:24:39 UTC (rev 3136) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2011-05-20 14:26:33 UTC (rev 3137) @@ -26,6 +26,8 @@ package org.chorem.lima.ui.financialstatementchart; import static org.nuiton.i18n.I18n._; + +import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.tree.TreePath; import org.apache.commons.logging.Log; @@ -92,6 +94,7 @@ // jaxx constructor don't call super() ? financialStatementHeaderForm.setLocationRelativeTo(view); financialStatementHeaderForm.setVisible(true); + financialStatementHeaderForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); // null == cancel action newFinancialStatementHeader = financialStatementHeaderForm.getFinancialStatement(); @@ -140,6 +143,7 @@ // jaxx constructor don't call super() ? financialStatementMovementForm.setLocationRelativeTo(view); financialStatementMovementForm.setVisible(true); + financialStatementMovementForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); newFinancialStatementMovement=financialStatementMovementForm.getFinancialStatement(); // null == cancel action @@ -200,6 +204,7 @@ // jaxx constructor don't call super() ? financialStatementHeaderForm.setLocationRelativeTo(view); financialStatementHeaderForm.setVisible(true); + financialStatementHeaderForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); // null == cancel action financialStatement = financialStatementHeaderForm.getFinancialStatement(); } @@ -211,6 +216,7 @@ // jaxx constructor don't call super() ? financialStatementMovementForm.setLocationRelativeTo(view); financialStatementMovementForm.setVisible(true); + financialStatementMovementForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); // null == cancel action financialStatement = financialStatementMovementForm.getFinancialStatement(); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2011-05-20 14:24:39 UTC (rev 3136) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2011-05-20 14:26:33 UTC (rev 3137) @@ -26,6 +26,8 @@ package org.chorem.lima.ui.fiscalperiod; import static org.nuiton.i18n.I18n._; + +import javax.swing.JDialog; import javax.swing.JOptionPane; import org.jdesktop.swingx.JXTable; import org.nuiton.util.DateUtil; @@ -65,6 +67,7 @@ // jaxx don't call super() ? addPeriodDialog.setLocationRelativeTo(getView()); addPeriodDialog.setVisible(true); + addPeriodDialog.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); FiscalPeriod fiscalPeriod = addPeriodDialog.getPeriod(); // null = cancel Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2011-05-20 14:24:39 UTC (rev 3136) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2011-05-20 14:26:33 UTC (rev 3137) @@ -27,6 +27,7 @@ import static org.nuiton.i18n.I18n._; import javax.swing.JComboBox; +import javax.swing.JDialog; import javax.swing.JTextField; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -99,6 +100,7 @@ addLetterForm.setLocationRelativeTo(view); addLetterForm.setVisible(true); + addLetterForm.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); //false = cancel Action if (addLetterForm.validOk){