branch feature/1182-translation updated (d732a50 -> 98ca966)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1182-translation in repository lima. See http://git.chorem.org/lima.git discards d732a50 refs #1182 Traduction des dates pickers discards 599a742 refs #1182 Ajout de traductions adds 0112481 refs #1290 A la création d'une transaction si aucune n'a été créée lors de la même session est qu'une transaction est sélectionnée alors la nouvelle trasaction prend la date de celle-ci adds d100451 refs #1289 calcul de la colonne Solde dans l'onglet recherche des entrées adds acefd82 refs #1289refactoring adds 32aa3f8 refs #1289 Le solde est positif si le solde est débiteur adds 13b9893 Merge branch 'feature/1289-SearchEntriescomputeSold' into develop adds 26111c4 refs #1293 "Onglet Saisie des écritures" La saisie dans le champ jour est dirrectement prise en compte adds 54e25dd refs #1293 Auto selection du compte si un seul compte correspond à la recherche adds 785fc80 refs #1295 Même objet sélectionné entre la combobox et le model adds c51843f Merge branch 'feature/1295-improveEditEntryView' into develop adds 2d2c8a4 refs #1241 ordonne les entrée par date adds 8ef9bf6 refs #1286 Regrouppement des entrées par pièces comptable dans la saisie d'écriture adds bce1075 refs #1286 La solution adopter n'est pas idéale, il faudra revoir le model pour ordonnée les entrée d'une transaction voir ref #1207 adds 4bbfd4d Merge branch 'feature/1286-ordered-entries' into develop adds 636a5ba refs #1242 verifivation que l'on filtre bien sur un compte adds ae8502c fixes #1243 la sortie du champ date ou le clic sur une autre action entraine bien la prise en compte des dates saisies adds 2dc6345 refs #1242 Modification pour plus de lisibilité suite à revue de code Kevin adds 79ebf7d refs #1242 Refactoring pour plus de lisibilité adds 4d8ac91 refs #1242 correction de merge adds 7288ae1 Merge branch 'feature/1242-no-account-research-exception' into develop adds 9fd0c2f refs #1297correction pour ne pas remonter les entitées ayant une date > à celle indiquée dans la période adds bde8128 refs #1298 corrige NPE dans le cas ou aucune donnée existe adds e3d95f9 refs #1242 ordre des traductions revu adds d9b4a7d Merge branch 'feature/1298-FixNPE' into develop adds 959bbc3 refs #1268 l'interface de saisie d'un plan de TVA est de nouveau fonctionnelle adds 6b2e99c refs #1268 utilisation de JXTreeTable à la place de VatChartTreeTable adds 73a9813 refs #1268 déplacement du ListSelectionModel dans le handler adds b44dada Merge branch 'feature/1268-vat-statement-usable' into develop adds 635828d refs #1242 correction sur refactoring adds a0857b1 Mise à jour de la déclaration de licences adds d5f467a refs #1295 Le tableau de la saisie des écritures n'est pas éditable si la période est cloturé pour le journal sélectionné adds 4a1b1d5 refs #1158 Ajout de commentaires + désactivation du boutton de création d'une transaction adds 253998b refs #1158 Sur l'onglet lettrage il n'est pas possible de modifier une selection comportant une entrée vérouillée. Ajout d'une colonne 'clos' indiquant les entrées vérouillées. adds 9957610 Merge branch 'feature/1158-NotEditableTableForClose' into develop adds b4b645f refs #1158 : recupération du ClosedPeriodEntryBook et stockage dans un map pour le cache. adds b119160 import manquant adds 7cd3ef3 correction suite au merge adds fd35125 Merge branch 'feature/1158' into develop adds f0e4f29 refs #1241 gérération des rapport de compte avec Jasper adds 03e84c6 refs #1241 gérération des rapport de compte avec Jasper adds 4c16fcb refs #1241 ne pas afficher les lignes ne comportant aucun montant de renseigné adds e9c8126 refs #1241 modification de l'affichage des infos adds ce734ff refs #1241 factorisation du code source Jasper, utilisation de style adds 643e3a5 refs #1241 correction sur nom de police adds 9afd18d refs #1241 refactoring adds b019126 refs #1241 refactoring général sur les rapports, renommage variable, utilisation de style dans les rapports adds 8b18d5e refs #1241 réactivation de l'impression de la TVA, avec mise à jour des données adds dedb5b9 refs #1241 mise à jour du plan de TVA adds 9a297ab refs #1268 permet la saisie des informations concernant le trésor public et affichage de ses infos lors de l'export TVA adds f56fee1 refs #1241 placement correcte des champs dans la fenêtre de saisie de l'identité adds cfd3f21 refs #1241 correction sur le formulaire concernant le trésor public. Renommage du boutton OK en Valider adds 797522f refs #1241 pas de changement dans l'interface de configuration du premier lancement adds 9c2a471 refs #1241 modificaction des écans de 1er configuration afin de prendre en compte les changements sur l'identité. adds 6c63783 refs #1241 ajout de l'icon de sauvegarde présente sur le 1er écran au 1er lancement de lima adds 7cc39ee refs #1241 progression sur internationalisation des rapports, ajout de l'entête avec l'identité sur tous les rapports adds b4373cd refs #1241mise à jour du plan de tva adds 21cbf77 refs #1241 minor adds e8e622e refs #1241 internationalisation sur le rapport de compte adds 5a144b5 refs #1241 internationalisation sur le rapport de compte adds 887373c refs #1241 ajout possibilité de créer des rapports de balance globale ou générale (le dernier par défaut centralise les comptes 401 avec ses sous comptes idem pour 411) adds b8a6ceb refs #1241 monté de version je Jasper report adds 6f487bf refs #1241 refactoring de code adds 1179c09 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. adds 4e94d24 refs #1241 modification sur en tête du rapport et correction pour appeler la bonne méthode. adds 0919fa5 refs #1241 Ajout de traductions adds 7f54c9e refs #1298 corrige la génération de rapport pour les comptes si aucun compte n'existe adds 5655683 correction suite au merge adds 3d5a336 Merge branch 'feature/1241-account-report' into develop adds a200c71 refs #1287 ajout du montant total pour à l'onglet Lettrage adds 746e8ce refs #1287 import manquant adds 07988ba Merge branch 'feature/1287-compute-summary-on-lettering' into develop adds 1977c6c refs #686 Redémarrage complet de lima pour que l'internationalisation soit complète new a47f485 refs #1182 Ajout de traductions new 98ca966 refs #1182 Traduction des dates pickers This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (d732a50) \ N -- N -- N refs/heads/feature/1182-translation (98ca966) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 98ca966ad5b67da03225bf9e495590e410c5faec Author: dcosse <cosse@codelutin.com> Date: Wed Sep 16 21:57:35 2015 +0200 refs #1182 Traduction des dates pickers commit a47f485086c2bb8b83edb61018601a5c12bf8917 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 16:26:12 2015 +0200 refs #1182 Ajout de traductions Summary of changes: .../org/chorem/lima/business/ServiceListener.java | 2 +- .../chorem/lima/business/api/AccountService.java | 6 + .../api/ClosedPeriodicEntryBookService.java | 3 + .../chorem/lima/business/api/EntryBookService.java | 6 + .../business/api/FinancialTransactionService.java | 7 + .../chorem/lima/business/api/ImportService.java | 11 + .../chorem/lima/business/api/OptionsService.java | 3 + .../chorem/lima/business/api/TreasuryService.java | 13 + .../lima/business/api/VatStatementService.java | 5 +- ...eportService.java => AccountReportService.java} | 14 +- .../business/api/report/BalanceReportService.java | 19 +- ...on.java => AlreadyAffectedVatBoxException.java} | 14 +- ...lException.java => RequiredFieldException.java} | 14 +- .../chorem/lima/business/LimaBusinessConfig.java | 22 +- .../lima/business/ejb/AccountServiceImpl.java | 16 +- .../ejb/ClosedPeriodicEntryBookServiceImpl.java | 11 + .../lima/business/ejb/EntryBookServiceImpl.java | 7 + .../ejb/FinancialTransactionServiceImpl.java | 14 +- .../lima/business/ejb/ImportServiceImpl.java | 34 +- .../lima/business/ejb/OptionsServiceImpl.java | 6 + .../lima/business/ejb/TreasuryServiceImpl.java | 69 +++ .../lima/business/ejb/VatStatementServiceImpl.java | 74 +++- .../business/ejb/csv/FiscalControlExportModel.java | 2 +- .../lima/business/ejb/csv/IdentityModel.java | 4 +- .../ejb/report/AccountReportServiceImpl.java | 125 ++++++ .../ejb/report/BalanceReportServiceImpl.java | 325 ++++++++++---- .../business/ejb/report/CommonsDocumentReport.java | 57 +++ .../report/GeneralEntryBookReportServiceImpl.java | 43 +- .../ejb/report/LedgerReportServiceImpl.java | 41 +- .../ProvisionalEntryBookReportServiceImpl.java | 64 +-- .../entity/ClosedPeriodicEntryBookTopiaDao.java | 29 +- .../java/org/chorem/lima/entity/EntryTopiaDao.java | 43 +- .../resources/i18n/lima-business_en_GB.properties | 56 +++ .../resources/i18n/lima-business_fr_FR.properties | 56 +++ .../org/chorem/lima/beans/BalanceAccountImpl.java | 23 +- ...ql => V0_8_6_0__1241_create_table_TREASURY.sql} | 52 ++- .../src/main/xmi/lima-callao-model.properties | 2 +- lima-callao/src/main/xmi/lima-callao-model.zargo | Bin 57316 -> 61665 bytes lima-report/pom.xml | 10 +- .../chorem/lima/report/DocumentReportTypes.java | 1 + .../java/org/chorem/lima/report/DocumentsEnum.java | 4 +- .../org/chorem/lima/report/LimaReportConfig.java | 60 ++- .../lima/report/service/DocumentService.java | 321 ++++++-------- .../chorem/lima/report/service/JasperReports.java | 10 + .../AccountEntry.jrxml} | 170 ++++---- .../jasperreports/account/DocumentReport.jrxml | 266 ++++++++++++ .../balance/BalanceReportAccountReport.jrxml | 18 +- .../balance/BalanceSubAccountsReport.jrxml | 54 ++- .../jasperreports/balance/DocumentReport.jrxml | 387 ++++++++++------- .../jasperreports/entryBook/DocumentReport.jrxml | 394 ++++++++--------- .../jasperreports/entryBook/EntryBookReport.jrxml | 77 +--- .../entryBook/FinancialPeriodReport.jrxml | 191 ++------ .../entryBook/TransactionReport.jrxml | 222 +++------- .../generalEntryBook/DocumentReport.jrxml | 478 ++++++++++----------- .../generalEntryBook/EntryBookPeriodReport.jrxml | 54 +-- .../GeneralEntryBookEntryReport.jrxml | 11 +- .../generalLedger/DocumentReport.jrxml | 406 +++++++++-------- .../generalLedger/GeneralLedgerEntryReport.jrxml | 204 +++------ .../generalLedger/GeneralLedgerReport.jrxml | 113 ++--- .../src/main/resources/reports/vat_form_fr.pdf | Bin 222623 -> 244238 bytes .../org/chorem/lima/report/action/ReportTest.java | 2 +- .../org/chorem/lima/server/HttpServerService.java | 41 +- lima-swing/src/license/THIRD-PARTY.properties | 1 + .../main/java/org/chorem/lima/LimaSwingConfig.java | 1 + .../chorem/lima/enums/VatStatementsChartEnum.java | 5 +- .../AccountCondition/AccountConditionHandler.java | 6 +- .../DateIntervalConditionView.jaxx | 5 +- .../java/org/chorem/lima/ui/MainViewHandler.java | 28 +- .../chorem/lima/ui/account/AccountViewHandler.java | 3 +- .../lima/ui/celleditor/AccountTableCellEditor.java | 28 +- .../lima/ui/celleditor/DayTableCellEditor.java | 30 +- .../lima/ui/combobox/EntryBookComboBoxModel.java | 4 +- .../ui/combobox/FiscalPeriodComboBoxModel.java | 4 +- .../ui/common/FinancialTransactionTableModel.java | 111 ++++- .../lima/ui/entrybook/EntryBookViewHandler.java | 8 +- .../ui/financialtransaction/AccountColumn.java | 48 ++- .../ui/financialtransaction/BalanceColumn.java | 35 +- .../lima/ui/financialtransaction/DayColumn.java | 6 +- .../FinancialTransactionView.css | 15 +- .../FinancialTransactionView.jaxx | 2 +- .../FinancialTransactionViewHandler.java | 109 +++-- .../FinancialTransactionSearchTableModel.java | 12 +- .../FiscalControlExportViewHandler.java | 2 +- .../ui/fiscalperiod/FiscalPeriodViewHandler.java | 4 +- .../java/org/chorem/lima/ui/home/AccountsPane.java | 6 +- .../org/chorem/lima/ui/home/EntryBooksPane.java | 8 +- .../lima/ui/home/FinancialTransactionsPane.java | 6 +- .../org/chorem/lima/ui/home/FiscalYearsPane.java | 10 +- .../org/chorem/lima/ui/identity/IdentityForm.css | 161 +++++-- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 281 +++++++----- .../chorem/lima/ui/identity/IdentityHandler.java | 45 +- .../chorem/lima/ui/importexport/ImportExport.java | 8 + .../lima/ui/lettering/LetteringEditModel.java | 105 +++-- ...tionModel.java => LetteringSelectionModel.java} | 31 +- .../lima/ui/lettering/LetteringTableModel.java | 38 ++ .../org/chorem/lima/ui/lettering/LetteringView.css | 6 +- .../chorem/lima/ui/lettering/LetteringView.jaxx | 2 +- .../lima/ui/lettering/LetteringViewHandler.java | 123 ++++-- .../BackupPanel.css} | 10 +- ...{CreateEntryBookPanel.jaxx => BackupPanel.jaxx} | 8 +- .../{OpeningView.css => BackupPanelHandler.java} | 42 +- .../chorem/lima/ui/opening/CreateIdentityPanel.css | 10 +- .../lima/ui/opening/CreateIdentityPanel.jaxx | 64 ++- .../ui/opening/CreateIdentityPanelHandler.java | 1 - .../org/chorem/lima/ui/opening/OpeningView.css | 11 +- .../org/chorem/lima/ui/opening/OpeningView.jaxx | 28 +- .../chorem/lima/ui/opening/OpeningViewHandler.java | 195 ++++++--- .../lima/ui/vatchart/VatChartMovementForm.css | 2 + .../lima/ui/vatchart/VatChartMovementForm.jaxx | 19 +- .../chorem/lima/ui/vatchart/VatChartTreeTable.java | 134 ------ .../lima/ui/vatchart/VatChartTreeTableModel.java | 226 ---------- .../org/chorem/lima/ui/vatchart/VatChartView.jaxx | 26 +- .../lima/ui/vatchart/VatChartViewHandler.java | 401 ++++++++++------- .../chorem/lima/ui/vatchart/VatChartViewModel.java | 191 ++++++++ .../resources/i18n/lima-swing_en_GB.properties | 68 ++- .../resources/i18n/lima-swing_fr_FR.properties | 53 ++- .../icons/action-financialPeriod-close.png | Bin 715 -> 452 bytes lima-swing/src/main/resources/icons/backup.png | Bin 0 -> 4803 bytes lima-swing/src/main/resources/import/vat_base.csv | 114 ++--- .../src/main/resources/import/vat_default.csv | 111 ++--- .../src/main/resources/import/vat_developed.csv | 56 --- .../src/main/resources/import/vat_shortened.csv | 56 --- lima-swing/src/main/resources/log4j.properties | 2 +- pom.xml | 10 +- 124 files changed, 4538 insertions(+), 3383 deletions(-) create mode 100644 lima-business-api/src/main/java/org/chorem/lima/business/api/TreasuryService.java copy lima-business-api/src/main/java/org/chorem/lima/business/api/report/{BalanceReportService.java => AccountReportService.java} (63%) copy lima-business-api/src/main/java/org/chorem/lima/business/exceptions/{NotAllowedLabelException.java => AlreadyAffectedVatBoxException.java} (74%) copy lima-business-api/src/main/java/org/chorem/lima/business/exceptions/{NotAllowedLabelException.java => RequiredFieldException.java} (74%) create mode 100644 lima-business/src/main/java/org/chorem/lima/business/ejb/TreasuryServiceImpl.java create mode 100644 lima-business/src/main/java/org/chorem/lima/business/ejb/report/AccountReportServiceImpl.java create mode 100644 lima-business/src/main/java/org/chorem/lima/business/ejb/report/CommonsDocumentReport.java copy lima-callao/src/main/resources/db/migration/{V0_6_0_0__migration2.sql => V0_8_6_0__1241_create_table_TREASURY.sql} (50%) copy lima-report/src/main/resources/jasperreports/{generalLedger/GeneralLedgerEntryReport.jrxml => account/AccountEntry.jrxml} (69%) create mode 100644 lima-report/src/main/resources/jasperreports/account/DocumentReport.jrxml copy lima-business-api/src/main/java/org/chorem/lima/LimaTechnicalException.java => lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DayTableCellEditor.java (64%) rename lima-swing/src/main/java/org/chorem/lima/ui/lettering/{LettringSelectionModel.java => LetteringSelectionModel.java} (82%) copy lima-swing/src/main/java/org/chorem/lima/ui/{fiscalperiod/RetainedEarningsWait.css => opening/BackupPanel.css} (88%) copy lima-swing/src/main/java/org/chorem/lima/ui/opening/{CreateEntryBookPanel.jaxx => BackupPanel.jaxx} (80%) copy lima-swing/src/main/java/org/chorem/lima/ui/opening/{OpeningView.css => BackupPanelHandler.java} (61%) delete mode 100644 lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTable.java delete mode 100644 lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java create mode 100644 lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewModel.java create mode 100644 lima-swing/src/main/resources/icons/backup.png delete mode 100644 lima-swing/src/main/resources/import/vat_developed.csv delete mode 100644 lima-swing/src/main/resources/import/vat_shortened.csv -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1182-translation in repository lima. See http://git.chorem.org/lima.git commit a47f485086c2bb8b83edb61018601a5c12bf8917 Author: dcosse <cosse@codelutin.com> Date: Fri Sep 11 16:26:12 2015 +0200 refs #1182 Ajout de traductions --- lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties index 8a40152..76d6b08 100644 --- a/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties +++ b/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties @@ -302,7 +302,7 @@ lima.financialTransaction.update.error.beforeFirstFiscalPeriod=Update financial lima.financialTransaction.update.error.lockedEntryBook=Update financial transaction failed, locked entry book. lima.financialTransaction.update.error.lockedFinancialPeriod=Update financial transaction failed, locked financial period. lima.financialTransaction.voucher=Voucher -lima.fiscalControlExport= +lima.fiscalControlExport=FEC(fr) export lima.fiscalControlExport.entryBookAtNew= lima.fiscalControlExport.entryBookAtNew.toolTip= lima.fiscalControlExport.export= -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1182-translation in repository lima. See http://git.chorem.org/lima.git commit 98ca966ad5b67da03225bf9e495590e410c5faec Author: dcosse <cosse@codelutin.com> Date: Wed Sep 16 21:57:35 2015 +0200 refs #1182 Traduction des dates pickers --- .../Filter/dateCondition/DateConditionHandler.java | 19 ++- .../ui/Filter/dateCondition/DateConditionView.jaxx | 5 +- .../DateIntervalConditionHandler.java | 19 ++- .../DateIntervalConditionView.jaxx | 8 +- .../ui/celleditor/DateLimaTableCellRenderer.java | 4 +- .../lima/ui/celleditor/DateTableCellEditor.java | 154 --------------------- .../chorem/lima/ui/common/AbstractLimaTable.java | 2 - .../chorem/lima/ui/lettering/LetteringView.jaxx | 7 +- .../lima/ui/lettering/LetteringViewHandler.java | 12 ++ 9 files changed, 54 insertions(+), 176 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java index 584919e..22adca0 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java @@ -22,6 +22,7 @@ package org.chorem.lima.ui.Filter.dateCondition; * #L% */ +import org.chorem.lima.LimaSwingConfig; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.DateCondition; import org.chorem.lima.ui.Filter.ConditionHandler; @@ -29,8 +30,8 @@ import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransact import java.awt.event.ItemEvent; import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com @@ -64,11 +65,6 @@ public class DateConditionHandler implements ConditionHandler { return condition.getOperand(); } - public DateFormat[] getFormats() { - DateFormat[] formats = {DateFormat.getDateInstance(DateFormat.SHORT), new SimpleDateFormat("dd/MM/yyyy")}; - return formats; - } - public void delete() { filterHandler.removeCondition(this); } @@ -91,4 +87,15 @@ public class DateConditionHandler implements ConditionHandler { public void setFilterHandler(FinancialTransactionConditionHandler filterHandler) { this.filterHandler = filterHandler; } + + protected DateFormat getDateFormat() { + Locale locale = LimaSwingConfig.getInstance().getLocale(); + DateFormat result = DateFormat.getDateInstance(DateFormat.SHORT, locale); + return result; + } + + protected Locale getLocale() { + Locale locale = LimaSwingConfig.getInstance().getLocale(); + return locale; + } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx index 7c7168f..340d13e 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionView.jaxx @@ -37,7 +37,8 @@ onItemStateChanged="handler.operandSelected(event)"/> <JAXXDatePicker id='datePicker' + constructorParams="handler.getLocale()" + formats="{handler.getDateFormat()}" date='{handler.getDate()}' - formats='{handler.getFormats()}' - onPropertyChange='handler.setDate(datePicker.getDate())'/> + onActionPerformed='handler.setDate(datePicker.getDate())'/> </JInternalFrame> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java index ef91994..329c785 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java @@ -22,14 +22,15 @@ package org.chorem.lima.ui.Filter.dateIntervalCondition; * #L% */ +import org.chorem.lima.LimaSwingConfig; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.DateIntervalCondition; import org.chorem.lima.ui.Filter.ConditionHandler; import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransactionConditionHandler; import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; /** * @author Sylvain Bavencoff - bavencoff@codelutin.com @@ -62,11 +63,6 @@ public class DateIntervalConditionHandler implements ConditionHandler { this.filterHandler = filterHandler; } - public DateFormat[] getFormats() { - DateFormat[] formats = {DateFormat.getDateInstance(DateFormat.SHORT), new SimpleDateFormat("dd/MM/yyyy")}; - return formats; - } - public void delete() { filterHandler.removeCondition(this); } @@ -86,4 +82,15 @@ public class DateIntervalConditionHandler implements ConditionHandler { public void setEndDate(Date endDate) { condition.setEndDate(endDate); } + + protected DateFormat getDateFormat() { + Locale locale = LimaSwingConfig.getInstance().getLocale(); + DateFormat result = DateFormat.getDateInstance(DateFormat.SHORT, locale); + return result; + } + + protected Locale getLocale() { + Locale locale = LimaSwingConfig.getInstance().getLocale(); + return locale; + } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx index bf261b6..ecf3a4f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionView.jaxx @@ -37,9 +37,10 @@ </cell> <cell> <JAXXDatePicker id='beginDatePicker' + constructorParams="handler.getLocale()" + formats="{handler.getDateFormat()}" date='{handler.getBeginDate()}' - formats='{handler.getFormats()}' - onPropertyChange='handler.setBeginDate(beginDatePicker.getDate())'/> + onActionPerformed='handler.setBeginDate(beginDatePicker.getDate())'/> </cell> </row> <row> @@ -48,8 +49,9 @@ </cell> <cell> <JAXXDatePicker id='endDatePicker' + constructorParams="handler.getLocale()" + formats="{handler.getDateFormat()}" date='{handler.getEndDate()}' - formats='{handler.getFormats()}' onPropertyChange='handler.setEndDate(endDatePicker.getDate())'/> </cell> </row> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateLimaTableCellRenderer.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateLimaTableCellRenderer.java index 01a81a1..37c5d9b 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateLimaTableCellRenderer.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateLimaTableCellRenderer.java @@ -22,6 +22,8 @@ package org.chorem.lima.ui.celleditor; * #L% */ +import org.chorem.lima.LimaSwingConfig; + import java.text.DateFormat; import java.util.Date; @@ -33,7 +35,7 @@ public class DateLimaTableCellRenderer extends DefaultLimaTableCellRenderer { @Override protected void setValue(Object value) { if (value instanceof Date) { - DateFormat format = DateFormat.getDateInstance(DateFormat.MEDIUM); + DateFormat format = DateFormat.getDateInstance(DateFormat.MEDIUM, LimaSwingConfig.getInstance().getLocale()); super.setValue(format.format((Date) value)); } else { super.setValue(value); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java deleted file mode 100644 index 7d1bb6f..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2008 - 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -package org.chorem.lima.ui.celleditor; - -import org.apache.commons.lang3.time.DateUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.lima.LimaSwingApplicationContext; -import org.chorem.lima.LimaSwingConfig; -import org.jdesktop.swingx.JXDatePicker; - -import javax.swing.AbstractCellEditor; -import javax.swing.JFormattedTextField; -import javax.swing.JTable; -import javax.swing.SwingUtilities; -import javax.swing.event.AncestorEvent; -import javax.swing.event.AncestorListener; -import javax.swing.table.TableCellEditor; -import java.awt.Component; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; - -/** @author ore */ -public class DateTableCellEditor extends AbstractCellEditor - implements TableCellEditor, FocusListener, AncestorListener { - - private static final Log log = LogFactory.getLog(DateTableCellEditor.class); - - private static final long serialVersionUID = 1L; - - private final JXDatePicker datePicker; - //protected String comportmentEditingCell; - - //used to tell if the user has pressed a key - private Date date; - - /** constructor */ - public DateTableCellEditor() { - datePicker = new JXDatePicker(LimaSwingApplicationContext.getContext().getConfig().getLocale()); - datePicker.getEditor().addFocusListener(this); - datePicker.getEditor().addAncestorListener(this); - datePicker.setFormats( - DateFormat.getDateInstance(DateFormat.SHORT), - new SimpleDateFormat("dd/MM/yyyy"), - new SimpleDateFormat("dd/MM") - ); - //comportmentEditingCell = LimaConfig.getInstance().getComportmentEditingCell(); - } - - @Override - public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { - if (value instanceof Date) { - datePicker.setDate((Date) value); - date = (Date) value; - } - return datePicker; - } - - @Override - public Object getCellEditorValue() { - if (log.isDebugEnabled()) { - log.debug("getDate : input Date : " + datePicker.getDate() + "; text : " + datePicker.getEditor().getText()); - } - try { - datePicker.commitEdit(); - } catch (ParseException e) { - if (log.isErrorEnabled()) { - log.error("Could not commit date editor value", e); - } - } - - Calendar calendar = Calendar.getInstance(); - calendar.setTime(datePicker.getDate()); - int year = calendar.get(Calendar.YEAR); - if (year == 1970) { - calendar.setTime(date); - year = calendar.get(Calendar.YEAR); - Date newDate = DateUtils.setYears(datePicker.getDate(), year); - datePicker.setDate(newDate); - } - - if (log.isDebugEnabled()) { - log.debug("getDate : output Date : " + datePicker.getDate()); - } - return datePicker.getDate(); - } - - /*@Override - public boolean isCellEditable(EventObject evt) { - return !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2; - } */ - - @Override - public void focusGained(FocusEvent e) { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - JFormattedTextField dateFormattedTextField = datePicker.getEditor(); - LimaSwingConfig config = LimaSwingConfig.getInstance(); - if (config.isSelectAllEditingCell()) { - dateFormattedTextField.selectAll(); - } else { - int textFieldSize = dateFormattedTextField.getText().length(); - dateFormattedTextField.select(textFieldSize, textFieldSize); - } - } - }); - } - - public void focusLost(FocusEvent e) { - } - - @Override - public void ancestorAdded(AncestorEvent e) { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - datePicker.requestFocus(); - } - }); - } - - @Override - public void ancestorRemoved(AncestorEvent e) { - } - - @Override - public void ancestorMoved(AncestorEvent e) { - } - -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java index 3a53520..9a36e58 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/AbstractLimaTable.java @@ -29,7 +29,6 @@ import org.chorem.lima.ui.celleditor.AccountTableCellRenderer; import org.chorem.lima.ui.celleditor.BigDecimalTableCellEditor; import org.chorem.lima.ui.celleditor.BigDecimalTableCellRenderer; import org.chorem.lima.ui.celleditor.DateLimaTableCellRenderer; -import org.chorem.lima.ui.celleditor.DateTableCellEditor; import org.chorem.lima.ui.celleditor.DefaultLimaTableCellRenderer; import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor; import org.chorem.lima.ui.celleditor.EntryBookTableCellRender; @@ -68,7 +67,6 @@ public abstract class AbstractLimaTable<H> extends JXTable { setDefaultRenderer(EntryBook.class, new EntryBookTableCellRender()); // editor - setDefaultEditor(Date.class, new DateTableCellEditor()); setDefaultEditor(BigDecimal.class, new BigDecimalTableCellEditor()); setDefaultEditor(Account.class, new AccountTableCellEditor()); setDefaultEditor(EntryBook.class, new EntryBookTableCellEditor()); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx index 9491b8f..cdb89e2 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringView.jaxx @@ -31,6 +31,7 @@ org.jdesktop.swingx.JXDatePicker static org.nuiton.i18n.I18n.t org.chorem.lima.ui.combobox.AccountComboBox + java.text.DateFormat; </import> <LetteringViewHandler id="handler" constructorParams="this"/> @@ -73,12 +74,14 @@ <JLabel id="beginPeriodLabel"/> <JAXXDatePicker id="beginPeriodPicker" - patternLayout="dd/MM/yyy" + constructorParams="handler.getLocale()" + formats="{handler.getDateFormat()}" onActionPerformed="handler.setDateStart(beginPeriodPicker.getDate())"/> <JLabel id="endPeriodLabel"/> <JAXXDatePicker id="endPeriodPicker" - patternLayout="dd/MM/yyy" + constructorParams="handler.getLocale()" + formats="{handler.getDateFormat()}" onActionPerformed="handler.setDateEnd(endPeriodPicker.getDate())"/> <JToolBar.Separator/> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java index 9ea521d..dedc44d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java @@ -60,9 +60,11 @@ import java.awt.event.KeyEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.math.BigDecimal; +import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.Locale; import static org.nuiton.i18n.I18n.t; @@ -654,4 +656,14 @@ public class LetteringViewHandler{ } } + protected DateFormat getDateFormat() { + Locale locale = LimaSwingConfig.getInstance().getLocale(); + DateFormat result = DateFormat.getDateInstance(DateFormat.SHORT, locale); + return result; + } + + protected Locale getLocale() { + Locale locale = LimaSwingConfig.getInstance().getLocale(); + return locale; + } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm