Author: tchemit Date: 2012-10-07 13:38:35 +0200 (Sun, 07 Oct 2012) New Revision: 84 Url: http://forge.codelutin.com/repositories/revision/jmexico/84 Log: add myself in copyright immrove factor decorator (fallback on id if no name found) Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioModel.java trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.css trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.jaxx trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.css trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorHandler.java trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorModel.java trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/MexicoDecoratorProvider.java Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioModel.java =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioModel.java 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioModel.java 2012-10-07 11:38:35 UTC (rev 84) @@ -6,7 +6,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin + * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.css =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.css 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.css 2012-10-07 11:38:35 UTC (rev 84) @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin + * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.jaxx =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.jaxx 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/CloneScenarioPanel.jaxx 2012-10-07 11:38:35 UTC (rev 84) @@ -4,7 +4,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin + Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin, Tony Chemit %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.css =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.css 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.css 2012-10-07 11:38:35 UTC (rev 84) @@ -4,7 +4,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin + * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx 2012-10-07 11:38:35 UTC (rev 84) @@ -5,7 +5,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 2011 Réseau Mexico, Codelutin + Copyright (C) 2011 Réseau Mexico, Codelutin, Tony Chemit %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorHandler.java =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorHandler.java 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorHandler.java 2012-10-07 11:38:35 UTC (rev 84) @@ -5,7 +5,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2011 Réseau Mexico, Codelutin + * Copyright (C) 2011 Réseau Mexico, Codelutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -47,6 +47,7 @@ /** * @author sletellier <letellier@codelutin.com> + * @author tchemit <chemit@codelutin.com> * @since 0.1 */ public class InputDesignEditorHandler { Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorModel.java =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorModel.java 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorModel.java 2012-10-07 11:38:35 UTC (rev 84) @@ -1,5 +1,29 @@ package fr.reseaumexico.editor; +/* + * #%L + * JMexico :: Swing Editor + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Lists; import fr.reseaumexico.model.Factor; import fr.reseaumexico.model.InputDesign; @@ -24,7 +48,7 @@ * Model of {@link InputDesignEditor} UI. * * @author tchemit <chemit@codelutin.com> - * @since 1.6 + * @since 0.7 */ public class InputDesignEditorModel extends AbstractSerializableBean implements InputDesignScenarioListener { Property changes on: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditorModel.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/MexicoDecoratorProvider.java =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/MexicoDecoratorProvider.java 2012-10-07 11:30:09 UTC (rev 83) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/MexicoDecoratorProvider.java 2012-10-07 11:38:35 UTC (rev 84) @@ -5,7 +5,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin + * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin, Tony Chemit * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -25,15 +25,39 @@ package fr.reseaumexico.editor; import fr.reseaumexico.model.Factor; +import org.apache.commons.lang3.StringUtils; +import org.nuiton.util.decorator.Decorator; import org.nuiton.util.decorator.DecoratorProvider; /** * @author sletellier <letellier@codelutin.com> + * @author tchemit <chemit@codelutin.com> + * @since 0.1 */ public class MexicoDecoratorProvider extends DecoratorProvider { @Override protected void loadDecorators() { - registerJXPathDecorator(Factor.class, "${" + Factor.PROPERTY_NAME + "}$s"); + registerDecorator(new Decorator<Factor>(Factor.class) { + private static final long serialVersionUID = 1L; + + @Override + public String toString(Object bean) { + String result = null; + if (bean != null) { + Factor f = (Factor) bean; + if (StringUtils.isNotEmpty(f.getName())) { + + // use name + result = f.getName(); + } else { + + // fallback on id + result = f.getId(); + } + } + return result; + } + }); } }