From mallon@users.chorem.org Wed Aug 1 18:23:35 2012 From: mallon@users.chorem.org To: lima-commits@list.chorem.org Subject: [Lima-commits] r3560 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering Date: Wed, 01 Aug 2012 18:23:35 +0200 Message-ID: <20120801162335.C44CB162C4@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5722446228805055970==" --===============5722446228805055970== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: mallon Date: 2012-08-01 18:23:35 +0200 (Wed, 01 Aug 2012) New Revision: 3560 Url: http://chorem.org/repositories/revision/lima/3560 Log: fixes #711 Correction permettant de ne pas avoir de d?\195?\169s?\195?\169lec= tion lors du d?\195?\169 / lettrage. Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.= jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewH= andler.java Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/Letteri= ngView.jaxx =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView= .jaxx 2012-08-01 12:27:37 UTC (rev 3559) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView= .jaxx 2012-08-01 16:23:35 UTC (rev 3560) @@ -1,7 +1,7 @@ =20 - +
=20 - - org.chorem.lima.ui.common.AccountComboBoxModel - org.chorem.lima.ui.common.FinancialPeriodComboBoxModel - org.chorem.lima.entity.Account - javax.swing.ListSelectionModel - org.jdesktop.swingx.JXDatePicker - org.chorem.lima.beans.LetteringFilter - org.chorem.lima.beans.LetteringFilterImpl - + + org.chorem.lima.ui.common.AccountComboBoxModel + org.chorem.lima.ui.common.FinancialPeriodComboBoxModel + org.chorem.lima.entity.Account + javax.swing.ListSelectionModel + org.jdesktop.swingx.JXDatePicker + org.chorem.lima.beans.LetteringFilter + org.chorem.lima.beans.LetteringFilterImpl + =20 - - + + =20 - - + + =20 - + =20 - + =20 - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + \ No newline at end of file Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/Letteri= ngViewHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView= Handler.java 2012-08-01 12:27:37 UTC (rev 3559) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView= Handler.java 2012-08-01 16:23:35 UTC (rev 3560) @@ -117,9 +117,14 @@ //For U.I. buttons (Lettering and unlettering) onButtonModeChanged("delettrer"); } else { + if (log.isDebugEnabled()) { + log.debug("unlettred entries"); + } int[] selectedRows =3D view.getTable().getSelectedRows(); if (selectedRows.length =3D=3D 2) { - + if (log.isDebugEnabled()) { + log.debug("2 rows selected"); + } /*Treatment only if one of values contains decimals*/ LetteringTableModel tableModel =3D view.getTableModel(); Entry firstSelectedEntry =3D tableModel.getEntryAt(selectedR= ows[0]); @@ -132,6 +137,9 @@ onButtonModeChanged("equalized"); } }else { + if (log.isDebugEnabled()) { + log.debug("!2 rows selected"); + } onButtonModeChanged("all"); } =20 @@ -139,9 +147,15 @@ onBalanceChanged(null); //treatment unuseful if no rows are selected if (!view.getLettringSelectionModel().isSelectionEmpty()) { + if (log.isDebugEnabled()) { + log.debug("Rows selected"); + } setValuesForSelectedEntries(); onButtonModeChanged("lettrer"); } else { + if (log.isDebugEnabled()) { + log.debug("No Rows selected"); + } onButtonModeChanged("all"); } } @@ -288,7 +302,7 @@ view.getTableModel().updateEntries(entries, datesEntree, journal= Entrees); } onBalanceChanged(null); - view.getLettringSelectionModel().clearSelection(); + //view.getLettringSelectionModel().clearSelection(); } =20 /**To make the difference between two selected entries and @@ -436,13 +450,13 @@ public void addLetter() { String newLetters =3D financialTransactionService.getNextLetters(); changeLetter(newLetters); - onBalanceChanged(null); + //onBalanceChanged(null); } =20 /**Remove a group of three letters to n entries*/ public void removeLetter() { changeLetter(null); - onBalanceChanged(null); + //onBalanceChanged(null); } =20 /**Add or remove a group of three letters to n entries*/ @@ -453,6 +467,7 @@ =20 for (int indexEntry : entrieSelected){ financialTransactionService.updateEntry(view.getTableModel().get= EntryAt(indexEntry)); + view.getTable().addRowSelectionInterval(indexEntry, indexEntry); } editModel.setLettred(false); editModel.setUnLettred(false); --===============5722446228805055970==--