r53 - in trunk: faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util faxtomail-ui-swing/src/main/resources/i18n
Author: kmorin Date: 2014-04-28 19:59:52 +0200 (Mon, 28 Apr 2014) New Revision: 53 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/53 Log: refs #4659 [ECRAN] Recherche possibilit?\195?\169 de rechercher plusieurs ?\195?\169tats attente, ou aucun (idem pour statut, gamme, type de demande) Added: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxComboBoxModel.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxListCellRenderer.java Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java trunk/faxtomail-ui-swing/pom.xml trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-04-28 17:59:52 UTC (rev 53) @@ -25,6 +25,7 @@ */ import java.util.Date; +import java.util.List; import org.jdesktop.beans.AbstractSerializableBean; @@ -79,15 +80,15 @@ protected String body; - protected EtatAttente etatAttente; + protected List<EtatAttente> etatAttente; - protected Priority priority; + protected List<Priority> priority; - protected DemandType demandType; + protected List<DemandType> demandType; - protected DemandStatus demandStatus; + protected List<DemandStatus> demandStatus; - protected Range gamme; + protected List<Range> gamme; protected String ediCodeNumber; @@ -159,14 +160,13 @@ firePropertyChange(PROPERTY_SUBJECT, oldValue, subject); } - public EtatAttente getEtatAttente() { + public List<EtatAttente> getEtatAttente() { return etatAttente; } - public void setEtatAttente(EtatAttente etatAttente) { - EtatAttente oldValue = this.etatAttente; + public void setEtatAttente(List<EtatAttente> etatAttente) { this.etatAttente = etatAttente; - firePropertyChange(PROPERTY_ETAT_ATTENTE, oldValue, etatAttente); + firePropertyChange(PROPERTY_ETAT_ATTENTE, null, etatAttente); } public FaxToMailUser getTakenBy() { @@ -179,34 +179,31 @@ firePropertyChange(PROPERTY_TAKEN_BY, oldValue, takenBy); } - public Priority getPriority() { + public List<Priority> getPriority() { return priority; } - public void setPriority(Priority priority) { - Priority oldValue = this.priority; + public void setPriority(List<Priority> priority) { this.priority = priority; - firePropertyChange(PROPERTY_PRIORITY, oldValue, priority); + firePropertyChange(PROPERTY_PRIORITY, null, priority); } - public DemandType getDemandType() { + public List<DemandType> getDemandType() { return demandType; } - public void setDemandType(DemandType demandType) { - DemandType oldValue = this.demandType; + public void setDemandType(List<DemandType> demandType) { this.demandType = demandType; - firePropertyChange(PROPERTY_DEMAND_TYPE, oldValue, demandType); + firePropertyChange(PROPERTY_DEMAND_TYPE, null, demandType); } - public DemandStatus getDemandStatus() { + public List<DemandStatus> getDemandStatus() { return demandStatus; } - public void setDemandStatus(DemandStatus demandStatus) { - DemandStatus oldValue = this.demandStatus; + public void setDemandStatus(List<DemandStatus> demandStatus) { this.demandStatus = demandStatus; - firePropertyChange(PROPERTY_DEMAND_STATUS, oldValue, demandStatus); + firePropertyChange(PROPERTY_DEMAND_STATUS, null, demandStatus); } public String getEdiCodeNumber() { @@ -329,14 +326,13 @@ firePropertyChange(PROPERTY_BODY, oldValue, body); } - public Range getGamme() { + public List<Range> getGamme() { return gamme; } - public void setGamme(Range gamme) { - Range oldValue = this.gamme; + public void setGamme(List<Range> gamme) { this.gamme = gamme; - firePropertyChange(PROPERTY_GAMME, oldValue, gamme); + firePropertyChange(PROPERTY_GAMME, null, gamme); } public String getCommandNumber() { Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-04-28 17:59:52 UTC (rev 53) @@ -28,6 +28,7 @@ import java.util.List; import java.util.Map; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; public class EmailTopiaDao extends AbstractEmailTopiaDao<Email> { @@ -261,9 +262,15 @@ } // email demand type - if (emailFilter.getDemandType() != null) { - query.append(" AND E." + Email.PROPERTY_DEMAND_TYPE + " = :" + EmailFilter.PROPERTY_DEMAND_TYPE); - args.put(EmailFilter.PROPERTY_DEMAND_TYPE, emailFilter.getDemandType()); + List<DemandType> demandType = emailFilter.getDemandType(); + if (CollectionUtils.isNotEmpty(demandType)) { + query.append(" AND (E." + Email.PROPERTY_DEMAND_TYPE + " IN (:" + EmailFilter.PROPERTY_DEMAND_TYPE + ")"); + args.put(EmailFilter.PROPERTY_DEMAND_TYPE, demandType); + + if (demandType.contains(null)) { + query.append(" OR E." + Email.PROPERTY_DEMAND_TYPE + " IS NULL"); + } + query.append(")"); } // email ediCodeNumber @@ -285,15 +292,27 @@ } // email priority - if (emailFilter.getPriority() != null) { - query.append(" AND E." + Email.PROPERTY_PRIORITY + " = :" + EmailFilter.PROPERTY_PRIORITY); - args.put(EmailFilter.PROPERTY_PRIORITY, emailFilter.getPriority()); + List<Priority> priority = emailFilter.getPriority(); + if (CollectionUtils.isNotEmpty(priority)) { + query.append(" AND (E." + Email.PROPERTY_PRIORITY + " IN (:" + EmailFilter.PROPERTY_PRIORITY + ")"); + args.put(EmailFilter.PROPERTY_PRIORITY, priority); + + if (priority.contains(null)) { + query.append(" OR E." + Email.PROPERTY_PRIORITY + " IS NULL"); + } + query.append(")"); } // email demand status - if (emailFilter.getDemandStatus() != null) { - query.append(" AND E." + Email.PROPERTY_DEMAND_STATUS + " = :" + EmailFilter.PROPERTY_DEMAND_STATUS); - args.put(EmailFilter.PROPERTY_DEMAND_STATUS, emailFilter.getDemandStatus()); + List<DemandStatus> demandStatus = emailFilter.getDemandStatus(); + if (CollectionUtils.isNotEmpty(demandStatus)) { + query.append(" AND (E." + Email.PROPERTY_DEMAND_STATUS + " IN (:" + EmailFilter.PROPERTY_DEMAND_STATUS + ")"); + args.put(EmailFilter.PROPERTY_DEMAND_STATUS, demandStatus); + + if (demandStatus.contains(null)) { + query.append(" OR E." + Email.PROPERTY_DEMAND_STATUS + " IS NULL"); + } + query.append(")"); } // email recipient @@ -303,9 +322,15 @@ }*/ // email etat attente - if (emailFilter.getEtatAttente() != null) { - query.append(" AND E." + Email.PROPERTY_ETAT_ATTENTE + " = :" + EmailFilter.PROPERTY_ETAT_ATTENTE); - args.put(EmailFilter.PROPERTY_ETAT_ATTENTE, emailFilter.getEtatAttente()); + List<EtatAttente> etatAttente = emailFilter.getEtatAttente(); + if (CollectionUtils.isNotEmpty(etatAttente)) { + query.append(" AND (E." + Email.PROPERTY_ETAT_ATTENTE + " IN (:" + EmailFilter.PROPERTY_ETAT_ATTENTE + ")"); + args.put(EmailFilter.PROPERTY_ETAT_ATTENTE, etatAttente); + + if (etatAttente.contains(null)) { + query.append(" OR E." + Email.PROPERTY_ETAT_ATTENTE + " IS NULL"); + } + query.append(")"); } // email comment @@ -315,11 +340,16 @@ } // email gamme - if (emailFilter.getGamme() != null) { - query.append(" AND EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")"); - query.append(" AND RR." + RangeRow.PROPERTY_RANGE + " = :" + EmailFilter.PROPERTY_GAMME); - args.put(EmailFilter.PROPERTY_GAMME, emailFilter.getGamme()); - query.append(")"); + List<Range> gamme = emailFilter.getGamme(); + if (CollectionUtils.isNotEmpty(gamme)) { + query.append(" AND ((EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")"); + query.append(" AND RR." + RangeRow.PROPERTY_RANGE + " IN (:" + EmailFilter.PROPERTY_GAMME + "))"); + args.put(EmailFilter.PROPERTY_GAMME, gamme); + + if (gamme.contains(null)) { + query.append(" OR NOT EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + "))"); + } + query.append("))"); } // email comment Modified: trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java =================================================================== --- trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-04-28 17:59:52 UTC (rev 53) @@ -24,6 +24,8 @@ * #L% */ +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.apache.commons.logging.Log; @@ -97,11 +99,11 @@ filter.setSender("test"); filter.setBody("test"); - filter.setDemandStatus(DemandStatus.ARCHIVED); - filter.setGamme(referentielService.getAllRange().get(0)); - filter.setPriority(referentielService.getAllPriority().get(0)); + filter.setDemandStatus(Collections.singletonList(DemandStatus.ARCHIVED)); + filter.setGamme(Collections.singletonList(referentielService.getAllRange().get(0))); + filter.setPriority(referentielService.getAllPriority()); filter.setCommandNumber("test"); - filter.setEtatAttente(referentielService.getAllEtatAttente().get(0)); + filter.setEtatAttente(Collections.singletonList(referentielService.getAllEtatAttente().get(0))); filter.setEdiCodeNumber("test"); filter.setLocalReference("test"); filter.setMessage("test"); Modified: trunk/faxtomail-ui-swing/pom.xml =================================================================== --- trunk/faxtomail-ui-swing/pom.xml 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/pom.xml 2014-04-28 17:59:52 UTC (rev 53) @@ -85,7 +85,6 @@ <dependencies> - <dependency> <groupId>${project.groupId}</groupId> <artifactId>faxtomail-persistence</artifactId> Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-04-28 17:59:52 UTC (rev 53) @@ -172,11 +172,6 @@ text: "faxtomail.demande.docType.label"; } -#docTypeComboBox { - property: demandType; - selectedItem: { model.getDemandType() }; -} - #ediCodeNumberLabel { text: "faxtomail.demande.ediCodeNumber.label"; } @@ -190,29 +185,14 @@ text: "faxtomail.demande.priority.label"; } -#priorityComboBox { - property: priority; - selectedItem: { model.getPriority() }; -} - #statusLabel { text: "faxtomail.demande.status.label"; } -#statusComboBox { - property: demandStatus; - selectedItem: { model.getDemandStatus() }; -} - #etatAttenteLabel { text: "faxtomail.demande.etatAttente.label"; } -#etatAttenteComboBox { - property: etatAttente; - selectedItem: { model.getEtatAttente() }; -} - #projectReferenceLabel { text: "faxtomail.demande.projectReference.label"; } @@ -257,11 +237,6 @@ text: "faxtomail.demande.gamme.label"; } -#gammeComboBox { - property: gamme; - selectedItem: { model.getGamme() }; -} - #searchButton { text: "faxtomail.search.button.label"; _applicationAction: { com.franciaflex.faxtomail.ui.swing.actions.SearchToGroupAction.class }; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-04-28 17:59:52 UTC (rev 53) @@ -223,9 +223,7 @@ <JLabel id='docTypeLabel'/> </cell> <cell columns='3' weightx='1'> - <BeanFilterableComboBox id='docTypeComboBox' - constructorParams='this' - genericType="DemandType"/> + <JComboBox id='docTypeComboBox'/> </cell> </row> @@ -260,27 +258,21 @@ <JLabel id='priorityLabel'/> </cell> <cell weightx='1'> - <BeanFilterableComboBox id='priorityComboBox' - constructorParams='this' - genericType="Priority"/> + <JComboBox id='priorityComboBox'/> </cell> <cell> <JLabel id='statusLabel'/> </cell> <cell weightx='1'> - <BeanFilterableComboBox id='statusComboBox' - constructorParams='this' - genericType="DemandStatus"/> + <JComboBox id='statusComboBox'/> </cell> <cell> <JLabel id='etatAttenteLabel'/> </cell> <cell columns='3' weightx='2'> - <BeanFilterableComboBox id='etatAttenteComboBox' - constructorParams='this' - genericType="EtatAttente"/> + <JComboBox id='etatAttenteComboBox'/> </cell> </row> @@ -297,9 +289,7 @@ <JLabel id='gammeLabel'/> </cell> <cell columns='3' weightx='1'> - <BeanFilterableComboBox id='gammeComboBox' - constructorParams='this' - genericType="Range"/> + <JComboBox id='gammeComboBox'/> </cell> </row> Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-04-28 17:59:52 UTC (rev 53) @@ -26,6 +26,7 @@ import com.franciaflex.faxtomail.persistence.entities.DemandStatus; import com.franciaflex.faxtomail.persistence.entities.Email; +import com.franciaflex.faxtomail.persistence.entities.EmailFilter; import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; import com.franciaflex.faxtomail.services.service.EmailService; import com.franciaflex.faxtomail.services.service.ReferentielService; @@ -126,21 +127,31 @@ initBeanFilterableComboBox(ui.getPrintedByComboBox(), getContext().getUserService().getAllUsers(), model.getPrintingBy()); - initBeanFilterableComboBox(ui.getDocTypeComboBox(), - referentielService.getAllDemandType(), - model.getDemandType()); - initBeanFilterableComboBox(ui.getPriorityComboBox(), - referentielService.getAllPriority(), - model.getPriority()); - initBeanFilterableComboBox(ui.getEtatAttenteComboBox(), - referentielService.getAllEtatAttente(), - model.getEtatAttente()); - initBeanFilterableComboBox(ui.getStatusComboBox(), - Arrays.asList(DemandStatus.values()), - model.getDemandStatus()); - initBeanFilterableComboBox(ui.getGammeComboBox(), - referentielService.getAllRange(), - model.getGamme()); + initCheckBoxComboBox(ui.getDocTypeComboBox(), + referentielService.getAllDemandType(), + model.getDemandType(), + EmailFilter.PROPERTY_DEMAND_TYPE, + true); + initCheckBoxComboBox(ui.getPriorityComboBox(), + referentielService.getAllPriority(), + model.getPriority(), + EmailFilter.PROPERTY_PRIORITY, + true); + initCheckBoxComboBox(ui.getEtatAttenteComboBox(), + referentielService.getAllEtatAttente(), + model.getEtatAttente(), + EmailFilter.PROPERTY_ETAT_ATTENTE, + true); + initCheckBoxComboBox(ui.getStatusComboBox(), + Arrays.asList(DemandStatus.values()), + model.getDemandStatus(), + EmailFilter.PROPERTY_DEMAND_STATUS, + false); + initCheckBoxComboBox(ui.getGammeComboBox(), + referentielService.getAllRange(), + model.getGamme(), + EmailFilter.PROPERTY_GAMME, + true); final JXTable dataTable = getUI().getDataTable(); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-04-28 17:59:52 UTC (rev 53) @@ -177,10 +177,12 @@ text: "faxtomail.demande.docType.label"; } +/* #docTypeComboBox { property: demandType; selectedItem: { model.getDemandType() }; } +*/ #ediCodeNumberLabel { text: "faxtomail.demande.ediCodeNumber.label"; @@ -195,28 +197,30 @@ text: "faxtomail.demande.priority.label"; } -#priorityComboBox { +/*#priorityComboBox { property: priority; selectedItem: { model.getPriority() }; -} +}*/ #statusLabel { text: "faxtomail.demande.status.label"; } +/* #statusComboBox { property: demandStatus; selectedItem: { model.getDemandStatus() }; } +*/ #etatAttenteLabel { text: "faxtomail.demande.etatAttente.label"; } -#etatAttenteComboBox { +/*#etatAttenteComboBox { property: etatAttente; selectedItem: { model.getEtatAttente() }; -} +}*/ #projectReferenceLabel { text: "faxtomail.demande.projectReference.label"; @@ -262,10 +266,12 @@ text: "faxtomail.demande.gamme.label"; } +/* #gammeComboBox { property: gamme; selectedItem: { model.getGamme() }; } +*/ #searchButton { text: "faxtomail.search.button.label"; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-04-28 17:59:52 UTC (rev 53) @@ -234,9 +234,7 @@ <JLabel id='docTypeLabel'/> </cell> <cell columns='3' weightx='1'> - <BeanFilterableComboBox id='docTypeComboBox' - constructorParams='this' - genericType="DemandType"/> + <JComboBox id='docTypeComboBox'/> </cell> </row> @@ -271,27 +269,21 @@ <JLabel id='priorityLabel'/> </cell> <cell weightx='1'> - <BeanFilterableComboBox id='priorityComboBox' - constructorParams='this' - genericType="Priority"/> + <JComboBox id='priorityComboBox'/> </cell> <cell> <JLabel id='statusLabel'/> </cell> <cell weightx='1'> - <BeanFilterableComboBox id='statusComboBox' - constructorParams='this' - genericType="DemandStatus"/> + <JComboBox id='statusComboBox'/> </cell> <cell> <JLabel id='etatAttenteLabel'/> </cell> <cell columns='3' weightx='2'> - <BeanFilterableComboBox id='etatAttenteComboBox' - constructorParams='this' - genericType="EtatAttente"/> + <JComboBox id='etatAttenteComboBox'/> </cell> </row> @@ -308,9 +300,7 @@ <JLabel id='gammeLabel'/> </cell> <cell columns='3' weightx='1'> - <BeanFilterableComboBox id='gammeComboBox' - constructorParams='this' - genericType="Range"/> + <JComboBox id='gammeComboBox'/> </cell> </row> Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-04-28 17:59:52 UTC (rev 53) @@ -24,26 +24,46 @@ import com.franciaflex.faxtomail.persistence.entities.DemandStatus; import com.franciaflex.faxtomail.persistence.entities.Email; +import com.franciaflex.faxtomail.persistence.entities.EmailFilter; +import com.franciaflex.faxtomail.persistence.entities.EtatAttente; +import com.franciaflex.faxtomail.persistence.entities.HasLabel; import com.franciaflex.faxtomail.services.service.ReferentielService; import com.franciaflex.faxtomail.ui.swing.actions.SearchAction; import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeListAction; import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel; import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailDemandListHandler; +import com.franciaflex.faxtomail.ui.swing.util.CheckBoxListCellRenderer; import com.franciaflex.faxtomail.ui.swing.util.CloseableUI; import com.franciaflex.faxtomail.ui.swing.util.DemandeTableModel; +import com.google.common.base.Function; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; +import jaxx.runtime.swing.editor.bean.BeanUIUtil; import jaxx.runtime.validator.swing.SwingValidator; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.JXTable; import org.nuiton.jaxx.application.swing.table.AbstractApplicationTableModel; import javax.swing.*; +import javax.swing.event.ListDataListener; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Date; +import java.util.HashSet; import java.util.List; +import java.util.Set; import static org.nuiton.i18n.I18n.t; @@ -89,7 +109,7 @@ initUI(ui); - ReferentielService referentielService = getContext().getReferentielService(); + final ReferentielService referentielService = getContext().getReferentielService(); SearchUIModel model = getModel(); initBeanFilterableComboBox(ui.getTakenByComboBox(), @@ -107,22 +127,33 @@ initBeanFilterableComboBox(ui.getPrintedByComboBox(), getContext().getUserService().getAllUsers(), model.getPrintingBy()); - initBeanFilterableComboBox(ui.getDocTypeComboBox(), - referentielService.getAllDemandType(), - model.getDemandType()); - initBeanFilterableComboBox(ui.getPriorityComboBox(), - referentielService.getAllPriority(), - model.getPriority()); - initBeanFilterableComboBox(ui.getEtatAttenteComboBox(), - referentielService.getAllEtatAttente(), - model.getEtatAttente()); - initBeanFilterableComboBox(ui.getStatusComboBox(), - Arrays.asList(DemandStatus.values()), - model.getDemandStatus()); - initBeanFilterableComboBox(ui.getGammeComboBox(), - referentielService.getAllRange(), - model.getGamme()); + initCheckBoxComboBox(ui.getDocTypeComboBox(), + referentielService.getAllDemandType(), + model.getDemandType(), + EmailFilter.PROPERTY_DEMAND_TYPE, + true); + initCheckBoxComboBox(ui.getPriorityComboBox(), + referentielService.getAllPriority(), + model.getPriority(), + EmailFilter.PROPERTY_PRIORITY, + true); + initCheckBoxComboBox(ui.getEtatAttenteComboBox(), + referentielService.getAllEtatAttente(), + model.getEtatAttente(), + EmailFilter.PROPERTY_ETAT_ATTENTE, + true); + initCheckBoxComboBox(ui.getStatusComboBox(), + Arrays.asList(DemandStatus.values()), + model.getDemandStatus(), + EmailFilter.PROPERTY_DEMAND_STATUS, + false); + initCheckBoxComboBox(ui.getGammeComboBox(), + referentielService.getAllRange(), + model.getGamme(), + EmailFilter.PROPERTY_GAMME, + true); + final JXTable dataTable = getUI().getDataTable(); dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); @@ -156,6 +187,9 @@ } } } + + + } @Override @@ -213,4 +247,5 @@ protected String[] getEditableTableProperties() { return new String[] { Email.PROPERTY_ATTACHMENT }; } + } Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-04-28 17:59:52 UTC (rev 53) @@ -141,13 +141,12 @@ return editObject.getCommandNumber(); } - public void setEtatAttente(EtatAttente etatAttente) { - Object oldValue = getEtatAttente(); + public void setEtatAttente(List<EtatAttente> etatAttente) { editObject.setEtatAttente(etatAttente); - firePropertyChanged(EmailFilter.PROPERTY_ETAT_ATTENTE, oldValue, etatAttente); + firePropertyChanged(EmailFilter.PROPERTY_ETAT_ATTENTE, null, etatAttente); } - public EtatAttente getEtatAttente() { + public List<EtatAttente> getEtatAttente() { return editObject.getEtatAttente(); } @@ -181,34 +180,31 @@ firePropertyChanged(EmailFilter.PROPERTY_ARCHIVED_BY, oldValue, faxToMailUser); } - public Priority getPriority() { + public List<Priority> getPriority() { return editObject.getPriority(); } - public void setPriority(Priority priority) { - Object oldValue = getPriority(); + public void setPriority(List<Priority> priority) { editObject.setPriority(priority); - firePropertyChanged(EmailFilter.PROPERTY_PRIORITY, oldValue, priority); + firePropertyChanged(EmailFilter.PROPERTY_PRIORITY, null, priority); } - public DemandType getDemandType() { + public List<DemandType> getDemandType() { return editObject.getDemandType(); } - public void setDemandType(DemandType demandType) { - Object oldValue = getDemandType(); + public void setDemandType(List<DemandType> demandType) { editObject.setDemandType(demandType); - firePropertyChanged(EmailFilter.PROPERTY_DEMAND_TYPE, oldValue, demandType); + firePropertyChanged(EmailFilter.PROPERTY_DEMAND_TYPE, null, demandType); } - public DemandStatus getDemandStatus() { + public List<DemandStatus> getDemandStatus() { return editObject.getDemandStatus(); } - public void setDemandStatus(DemandStatus demandStatus) { - Object oldValue = getDemandStatus(); + public void setDemandStatus(List<DemandStatus> demandStatus) { editObject.setDemandStatus(demandStatus); - firePropertyChanged(EmailFilter.PROPERTY_DEMAND_STATUS, oldValue, demandStatus); + firePropertyChanged(EmailFilter.PROPERTY_DEMAND_STATUS, null, demandStatus); } public void setEdiCodeNumber(String ediCodeNumber) { @@ -362,14 +358,13 @@ firePropertyChanged(EmailFilter.PROPERTY_MAX_TRANSFER_DATE, oldValue, maxTransferDate); } - public Range getGamme() { + public List<Range> getGamme() { return editObject.getGamme(); } - public void setGamme(Range gamme) { - Object oldValue = getGamme(); + public void setGamme(List<Range> gamme) { editObject.setGamme(gamme); - firePropertyChanged(EmailFilter.PROPERTY_GAMME, oldValue, gamme); + firePropertyChanged(EmailFilter.PROPERTY_GAMME, null, gamme); } public List<DemandeUIModel> getResults() { Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-04-28 17:59:52 UTC (rev 53) @@ -33,6 +33,7 @@ import com.google.common.collect.Sets; import jaxx.runtime.JAXXUtil; import jaxx.runtime.SwingUtil; +import jaxx.runtime.swing.editor.bean.BeanUIUtil; import jaxx.runtime.validator.swing.SwingValidator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -48,14 +49,17 @@ import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; import java.awt.*; +import java.awt.List; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.Serializable; -import java.util.Set; +import java.lang.reflect.Method; +import java.util.*; import static org.nuiton.i18n.I18n.t; @@ -244,4 +248,40 @@ getParentContainer(JFrame.class).setVisible(false); } + protected <HL extends HasLabel> void initCheckBoxComboBox(final JComboBox comboBox, + java.util.List<HL> values, + java.util.List<HL> selection, + String property, + boolean addNull) { + + java.util.List<HL> universe = new ArrayList<HL>(); + if (addNull) { + universe.add(null); + } + if (values != null) { + universe.addAll(values); + } + final ComboBoxModel comboModel = new CheckBoxComboBoxModel(universe, selection); + comboBox.setModel(comboModel); + comboBox.setRenderer(new CheckBoxListCellRenderer() { + @Override + protected boolean isCheckBoxSelected(Object value) { + return ((java.util.List<Object>) comboModel.getSelectedItem()).contains(value); + } + }); + final Method mutator = BeanUIUtil.getMutator(getModel(), property); + comboBox.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + comboBox.showPopup(); + + if (e.getStateChange() == ItemEvent.SELECTED) { + BeanUIUtil.invokeMethod(mutator, + getModel(), + e.getItem()); + } + } + }); + } + } Added: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxComboBoxModel.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxComboBoxModel.java (rev 0) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxComboBoxModel.java 2014-04-28 17:59:52 UTC (rev 53) @@ -0,0 +1,55 @@ +package com.franciaflex.faxtomail.ui.swing.util; + +import com.franciaflex.faxtomail.persistence.entities.HasLabel; +import com.google.common.collect.Iterables; + +import javax.swing.*; +import java.util.ArrayList; +import java.util.List; + +/** + * @author Kevin Morin (Code Lutin) + * @since x.x + */ +public class CheckBoxComboBoxModel<HL extends HasLabel> extends AbstractListModel<HL> implements ComboBoxModel<HL> { + + List<Object> selection; + List<HL> values; + + public CheckBoxComboBoxModel(List<HL> values, List<HL> selection) { + this.values = new ArrayList<HL>(); + if (values != null) { + this.values.addAll(values); + } + + this.selection = new ArrayList<Object>(); + if (selection != null) { + this.selection.addAll(selection); + } + } + + @Override + public void setSelectedItem(Object anItem) { + selection = new ArrayList<Object>(selection); + if (selection.contains(anItem)) { + selection.remove(anItem); + } else { + selection.add(anItem); + } + } + + @Override + public Object getSelectedItem() { + return selection; + } + + @Override + public int getSize() { + return values.size(); + } + + @Override + public HL getElementAt(int index) { + return Iterables.get(values, index); + } +} \ No newline at end of file Added: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxListCellRenderer.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxListCellRenderer.java (rev 0) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CheckBoxListCellRenderer.java 2014-04-28 17:59:52 UTC (rev 53) @@ -0,0 +1,519 @@ +package com.franciaflex.faxtomail.ui.swing.util; + +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.border.*; +import javax.swing.plaf.ComponentUI; +import javax.swing.text.JTextComponent; + +import java.awt.*; + +import java.awt.List; +import java.io.Serializable; +import java.util.*; + +import com.franciaflex.faxtomail.persistence.entities.EtatAttente; +import com.franciaflex.faxtomail.persistence.entities.HasLabel; +import com.google.common.base.Function; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import sun.swing.DefaultLookup; + +import static org.nuiton.i18n.I18n.t; + + +/** + * Renders an item in a list. + * <p> + * <strong><a name="override">Implementation Note:</a></strong> + * This class overrides + * <code>invalidate</code>, + * <code>validate</code>, + * <code>revalidate</code>, + * <code>repaint</code>, + * <code>isOpaque</code>, + * and + * <code>firePropertyChange</code> + * solely to improve performance. + * If not overridden, these frequently called methods would execute code paths + * that are unnecessary for the default list cell renderer. + * If you write your own renderer, + * take care to weigh the benefits and + * drawbacks of overriding these methods. + * + * <p> + * + * <strong>Warning:</strong> + * Serialized objects of this class will not be compatible with + * future Swing releases. The current serialization support is + * appropriate for short term storage or RMI between applications running + * the same version of Swing. As of 1.4, support for long term storage + * of all JavaBeans<sup><font size="-2">TM</font></sup> + * has been added to the <code>java.beans</code> package. + * Please see {@link java.beans.XMLEncoder}. + * + * @author Philip Milne + * @author Hans Muller + */ +public abstract class CheckBoxListCellRenderer<HL extends HasLabel> + implements ListCellRenderer<Object>, Serializable { + + private static final Log log = LogFactory.getLog(CheckBoxListCellRenderer.class); + /** + * An empty <code>Border</code>. This field might not be used. To change the + * <code>Border</code> used by this renderer override the + * <code>getListCellRendererComponent</code> method and set the border + * of the returned component directly. + */ + private static final Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); + private static final Border DEFAULT_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1); + protected static Border noFocusBorder = DEFAULT_NO_FOCUS_BORDER; + + protected CheckBoxListCellRendererLabel label = new CheckBoxListCellRendererLabel(); + protected CheckBoxListCellRendererCheckBox checkbox = new CheckBoxListCellRendererCheckBox(); + + /** + * Constructs a default renderer object for an item + * in a list. + */ + public CheckBoxListCellRenderer() { + super(); + label.setText(""); + label.setName("List.cellRenderer"); + checkbox.setName("List.cellRenderer"); + } + + private Border getNoFocusBorder(JComponent component, ComponentUI ui) { + Border border = DefaultLookup.getBorder(component, ui, "List.cellNoFocusBorder"); + if (System.getSecurityManager() != null) { + if (border != null) return border; + return SAFE_NO_FOCUS_BORDER; + } else { + if (border != null && + (noFocusBorder == null || + noFocusBorder == DEFAULT_NO_FOCUS_BORDER)) { + return border; + } + return noFocusBorder; + } + } + + protected abstract boolean isCheckBoxSelected(Object value); + + public Component getListCellRendererComponent( + JList<?> list, + Object value, + final int index, + boolean isSelected, + boolean cellHasFocus) { + + String decorate = ""; + JComponent component = label; + ComponentUI ui = label.getUI(); + + final String noneLabel = t("faxtomail.common.none.label"); + if (value == null || value != null && HasLabel.class.isAssignableFrom(value.getClass())) { + decorate = value != null ? ((HasLabel) value).getLabel() : noneLabel; + checkbox.setSelected(isCheckBoxSelected(value)); + checkbox.setText(decorate); + component = checkbox; + ui = checkbox.getUI(); + + + } else { + if (value != null && java.util.List.class.isAssignableFrom(value.getClass())) { + java.util.List<HL> etats = (java.util.List<HL>) value; + java.util.List<String> e = Lists.transform(etats, new Function<HL, String>() { + @Override + public String apply(HL input) { + return input != null ? input.getLabel() : noneLabel; + } + }); + decorate = StringUtils.join(e, ", "); + label.setText(decorate); + } + + Color bg = null; + Color fg = null; + + JList.DropLocation dropLocation = list.getDropLocation(); + if (dropLocation != null + && !dropLocation.isInsert() + && dropLocation.getIndex() == index) { + + bg = DefaultLookup.getColor(component, ui, "List.dropCellBackground"); + fg = DefaultLookup.getColor(component, ui, "List.dropCellForeground"); + + isSelected = true; + } + + if (isSelected) { + component.setBackground(bg == null ? list.getSelectionBackground() : bg); + component.setForeground(fg == null ? list.getSelectionForeground() : fg); + } else { + component.setBackground(list.getBackground()); + component.setForeground(list.getForeground()); + } + } + + component.setComponentOrientation(list.getComponentOrientation()); + + component.setEnabled(list.isEnabled()); + component.setFont(list.getFont()); + + Border border = null; + if (cellHasFocus) { + if (isSelected) { + border = DefaultLookup.getBorder(component, ui, "List.focusSelectedCellHighlightBorder"); + } + if (border == null) { + border = DefaultLookup.getBorder(component, ui, "List.focusCellHighlightBorder"); + } + } else { + border = getNoFocusBorder(component, ui); + } + component.setBorder(border); + + return component; + } + + protected class CheckBoxListCellRendererLabel extends JLabel { + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + * + * @since 1.5 + * @return <code>true</code> if the background is completely opaque + * and differs from the JList's background; + * <code>false</code> otherwise + */ + @Override + public boolean isOpaque() { + Color back = getBackground(); + Component p = getParent(); + if (p != null) { + p = p.getParent(); + } + // p should now be the JList. + boolean colorMatch = (back != null) && (p != null) && + back.equals(p.getBackground()) && + p.isOpaque(); + return !colorMatch && super.isOpaque(); + } + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void validate() {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + * + * @since 1.5 + */ + @Override + public void invalidate() {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + * + * @since 1.5 + */ + @Override + public void repaint() {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void revalidate() {} + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void repaint(long tm, int x, int y, int width, int height) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void repaint(Rectangle r) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) { + // Strings get interned... + if (propertyName == "text" + || ((propertyName == "font" || propertyName == "foreground") + && oldValue != newValue + && getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey) != null)) { + + super.firePropertyChange(propertyName, oldValue, newValue); + } + } + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, byte oldValue, byte newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, char oldValue, char newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, short oldValue, short newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, int oldValue, int newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, long oldValue, long newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, float oldValue, float newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, double oldValue, double newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {} + + } + + protected class CheckBoxListCellRendererCheckBox extends JCheckBox { + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + * + * @since 1.5 + * @return <code>true</code> if the background is completely opaque + * and differs from the JList's background; + * <code>false</code> otherwise + */ + @Override + public boolean isOpaque() { + Color back = getBackground(); + Component p = getParent(); + if (p != null) { + p = p.getParent(); + } + // p should now be the JList. + boolean colorMatch = (back != null) && (p != null) && + back.equals(p.getBackground()) && + p.isOpaque(); + return !colorMatch && super.isOpaque(); + } + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void validate() {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + * + * @since 1.5 + */ + @Override + public void invalidate() {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + * + * @since 1.5 + */ + @Override + public void repaint() {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void revalidate() {} + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void repaint(long tm, int x, int y, int width, int height) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void repaint(Rectangle r) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) { + // Strings get interned... + if (propertyName == "text" + || ((propertyName == "font" || propertyName == "foreground") + && oldValue != newValue + && getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey) != null)) { + + super.firePropertyChange(propertyName, oldValue, newValue); + } + } + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, byte oldValue, byte newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, char oldValue, char newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, short oldValue, short newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, int oldValue, int newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, long oldValue, long newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, float oldValue, float newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, double oldValue, double newValue) {} + + /** + * Overridden for performance reasons. + * See the <a href="#override">Implementation Note</a> + * for more information. + */ + @Override + public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {} + + } + + /** + * A subclass of DefaultListCellRenderer that implements UIResource. + * DefaultListCellRenderer doesn't implement UIResource + * directly so that applications can safely override the + * cellRenderer property with DefaultListCellRenderer subclasses. + * <p> + * <strong>Warning:</strong> + * Serialized objects of this class will not be compatible with + * future Swing releases. The current serialization support is + * appropriate for short term storage or RMI between applications running + * the same version of Swing. As of 1.4, support for long term storage + * of all JavaBeans<sup><font size="-2">TM</font></sup> + * has been added to the <code>java.beans</code> package. + * Please see {@link java.beans.XMLEncoder}. + */ + public static class UIResource extends DefaultListCellRenderer + implements javax.swing.plaf.UIResource + { + } +} Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties =================================================================== --- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-28 16:07:05 UTC (rev 52) +++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-04-28 17:59:52 UTC (rev 53) @@ -46,6 +46,7 @@ faxtomail.chooseMailFolder.message=Choisissez le dossier où transférer l'élément \: faxtomail.chooseMailFolder.title=Dossier de destination faxtomail.common.by.label=par +faxtomail.common.none.label=Aucun faxtomail.common.on.label=le faxtomail.config.application= faxtomail.config.title= @@ -243,3 +244,4 @@ faxtomail.validator.error.email.demandType.required=Type de demande requis faxtomail.validator.error.email.projectReference.required=Référence chantier requise swing.error.cannot.open.file= +test=
participants (1)
-
kmorin@users.forge.codelutin.com