branch feature/1208 updated (565f06b -> f60f3ab)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1208 in repository lima. See http://git.chorem.org/lima.git from 565f06b fixes #1208 : ajouter le moi en toutes lettres + afficher la période dans la bar de statut new f60f3ab fixes #1225 : si l'exercice est sur deux années afficher les deux années (ex : "2015 - 2016") The 1 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 f60f3ab6f704c290aae3ba34630fd7c9f372e21a Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu May 28 16:11:15 2015 +0200 fixes #1225 : si l'exercice est sur deux années afficher les deux années (ex : "2015 - 2016") Summary of changes: .../lima/ui/common/FiscalPeriodListRenderer.java | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) -- 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/1208 in repository lima. See http://git.chorem.org/lima.git commit f60f3ab6f704c290aae3ba34630fd7c9f372e21a Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu May 28 16:11:15 2015 +0200 fixes #1225 : si l'exercice est sur deux années afficher les deux années (ex : "2015 - 2016") --- .../lima/ui/common/FiscalPeriodListRenderer.java | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java index 5e103d1..edc7789 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java @@ -24,8 +24,9 @@ package org.chorem.lima.ui.common; import org.chorem.lima.entity.FiscalPeriod; -import javax.swing.*; -import java.awt.*; +import javax.swing.DefaultListCellRenderer; +import javax.swing.JList; +import java.awt.Component; import java.text.SimpleDateFormat; /** @@ -50,9 +51,23 @@ public class FiscalPeriodListRenderer extends DefaultListCellRenderer { FiscalPeriod fiscalPeriod = (FiscalPeriod)value; Object newValue = fiscalPeriod; + if (fiscalPeriod != null) { - newValue = df.format(fiscalPeriod.getBeginDate()); + + String begin = df.format(fiscalPeriod.getBeginDate()); + String end = df.format(fiscalPeriod.getEndDate()); + + if (begin.equals(end)) { + + newValue = begin; + + } else { + + newValue = begin + " - " + end; + + } } + return super.getListCellRendererComponent(list, newValue, index, isSelected, cellHasFocus); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm