r108 - in trunk: jmexico-editor/src/main/resources/icons jmexico-model jmexico-model/src/main/java/fr/reseaumexico/model jmexico-model/src/main/xmi
Author: tchemit Date: 2012-11-13 14:32:27 +0100 (Tue, 13 Nov 2012) New Revision: 108 Url: http://forge.codelutin.com/repositories/revision/jmexico/108 Log: use a common bean super class Added: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/AbstractMexicoBean.java Modified: trunk/jmexico-editor/src/main/resources/icons/action-help.png trunk/jmexico-model/pom.xml trunk/jmexico-model/src/main/xmi/mexico.properties Property changes on: trunk/jmexico-editor/src/main/resources/icons/action-help.png ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/jmexico-model/pom.xml =================================================================== --- trunk/jmexico-model/pom.xml 2012-11-13 13:31:26 UTC (rev 107) +++ trunk/jmexico-model/pom.xml 2012-11-13 13:32:27 UTC (rev 108) @@ -37,6 +37,11 @@ <artifactId>nuiton-utils</artifactId> </dependency> + <dependency> + <groupId>org.swinglabs.swingx</groupId> + <artifactId>swingx-common</artifactId> + </dependency> + <!-- xml parser --> <dependency> <groupId>xpp3</groupId> Added: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/AbstractMexicoBean.java =================================================================== --- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/AbstractMexicoBean.java (rev 0) +++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/AbstractMexicoBean.java 2012-11-13 13:32:27 UTC (rev 108) @@ -0,0 +1,50 @@ +package fr.reseaumexico.model; + +/* + * #%L + * JMexico :: Model + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin + * %% + * 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 org.jdesktop.beans.AbstractSerializableBean; +import org.nuiton.util.CollectionUtil; + +import java.util.Collection; +import java.util.List; + +/** + * Abstract bean class. + * + * @author tchemit <chemit@codelutin.com> + * @since 1.8 + */ +public abstract class AbstractMexicoBean extends AbstractSerializableBean { + + private static final long serialVersionUID = 1L; + + protected <T> T getChild(Collection<T> list, int index) { + return CollectionUtil.getOrNull(list, index); + } + + protected <T> T getChild(List<T> list, int index) { + return CollectionUtil.getOrNull(list, index); + } +} Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/AbstractMexicoBean.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/jmexico-model/src/main/xmi/mexico.properties =================================================================== --- trunk/jmexico-model/src/main/xmi/mexico.properties 2012-11-13 13:31:26 UTC (rev 107) +++ trunk/jmexico-model/src/main/xmi/mexico.properties 2012-11-13 13:32:27 UTC (rev 108) @@ -24,5 +24,6 @@ ### model.tagValue.constantPrefix=PROPERTY_ -model.tagValue.version=0.1 +model.tagValue.version=0.8 model.tagValue.doNotGenerateBooleanGetMethods=true +model.tagvalue.beanSuperClass=fr.reseaumexico.model.AbstractMexicoBean
participants (1)
-
tchemit@users.forge.codelutin.com