Index: topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToEntityUIModel.java diff -u topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToEntityUIModel.java:1.12 topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToEntityUIModel.java:1.13 --- topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToEntityUIModel.java:1.12 Mon Jun 21 09:51:17 2004 +++ topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToEntityUIModel.java Mon Jun 21 10:10:25 2004 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.12 $ + * @version $Revision: 1.13 $ * - * Mise a jour: $Date: 2004/06/21 09:51:17 $ + * Mise a jour: $Date: 2004/06/21 10:10:25 $ * par : $Author: bpoussin $ */ @@ -89,7 +89,7 @@ - <%=Util.toUpperCaseFirstLetter(clazz.getName())%> + <%=Util.capitalize(clazz.getName())%> @@ -137,7 +137,7 @@ - <%=Util.toUpperCaseFirstLetter(att.getName())%> + <%=Util.capitalize(att.getName())%> Index: topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToWidgetsXML.java diff -u topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToWidgetsXML.java:1.1 topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToWidgetsXML.java:1.2 --- topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToWidgetsXML.java:1.1 Thu Jun 17 16:37:53 2004 +++ topia/src/java/org/codelutin/topia/generators/ui/ObjectModelToWidgetsXML.java Mon Jun 21 10:10:25 2004 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin -* @version $Revision: 1.1 $ +* @version $Revision: 1.2 $ * -* Mise a jour: $Date: 2004/06/17 16:37:53 $ -* par : $Author: mazelier $ +* Mise a jour: $Date: 2004/06/21 10:10:25 $ +* par : $Author: bpoussin $ */ package org.codelutin.topia.generators.ui; @@ -36,7 +36,7 @@ import org.codelutin.generator.models.object.ObjectModelClass; import java.io.Writer; import java.io.IOException; -import org.codelutin.topia.Util; +import org.codelutin.topia.generators.Util; import java.util.Iterator; /** Index: topia/src/java/org/codelutin/topia/generators/ui/UIModelToUICallbackSwingGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ui/UIModelToUICallbackSwingGenerator.java:1.4 topia/src/java/org/codelutin/topia/generators/ui/UIModelToUICallbackSwingGenerator.java:1.5 --- topia/src/java/org/codelutin/topia/generators/ui/UIModelToUICallbackSwingGenerator.java:1.4 Fri Jun 11 15:37:37 2004 +++ topia/src/java/org/codelutin/topia/generators/ui/UIModelToUICallbackSwingGenerator.java Mon Jun 21 10:10:25 2004 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * - * Mise a jour: $Date: 2004/06/11 15:37:37 $ - * par : $Author: mazelier $ + * Mise a jour: $Date: 2004/06/21 10:10:25 $ + * par : $Author: bpoussin $ */ package org.codelutin.topia.generators.ui; @@ -40,7 +40,7 @@ import org.codelutin.generator.UIModelGenerator; import java.util.Iterator; -import org.codelutin.topia.Util; +import org.codelutin.topia.generators.Util; /** * Classe qui permet de generer une interface a partir d'un uimodel @@ -54,7 +54,7 @@ */ public String getFilenameForUIModel(UIModel model) { String name = model.getRoot().getName(); - return model.getPackage().replace('.', File.separatorChar) + File.separatorChar + Util.toUpperCaseFirstLetter(name) + "UICallback.java"; + return model.getPackage().replace('.', File.separatorChar) + File.separatorChar + Util.capitalize(name) + "UICallback.java"; } /** @@ -78,7 +78,7 @@ /*{ import org.codelutin.topia.TopiaException; - public interface <%=Util.toUpperCaseFirstLetter(model.getRoot().getName())%>UICallback { + public interface <%=Util.capitalize(model.getRoot().getName())%>UICallback { }*/ // generation des signatures des handlers de l'objet for(Iterator o = model.getObjects().iterator(); o.hasNext();) { Index: topia/src/java/org/codelutin/topia/generators/ui/UIModelToUISwingGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ui/UIModelToUISwingGenerator.java:1.5 topia/src/java/org/codelutin/topia/generators/ui/UIModelToUISwingGenerator.java:1.6 --- topia/src/java/org/codelutin/topia/generators/ui/UIModelToUISwingGenerator.java:1.5 Mon Jun 14 16:02:32 2004 +++ topia/src/java/org/codelutin/topia/generators/ui/UIModelToUISwingGenerator.java Mon Jun 21 10:10:25 2004 @@ -23,17 +23,17 @@ * * @author Benjamin Poussin * Copyright Code Lutin -* @version $Revision: 1.5 $ +* @version $Revision: 1.6 $ * -* Mise a jour: $Date: 2004/06/14 16:02:32 $ -* par : $Author: mazelier $ +* Mise a jour: $Date: 2004/06/21 10:10:25 $ +* par : $Author: bpoussin $ */ package org.codelutin.topia.generators.ui; import org.codelutin.generator.models.ui.*; import org.codelutin.generator.UIModelGenerator; -import org.codelutin.topia.Util; +import org.codelutin.topia.generators.Util; import java.io.Writer; import java.io.IOException; @@ -59,7 +59,7 @@ public String getFilenameForUIModel(UIModel model) { String name = model.getRoot().getName(); return model.getPackage().replace('.', File.separatorChar) - + File.separatorChar + Util.toUpperCaseFirstLetter(name) + "UI.java"; + + File.separatorChar + Util.capitalize(name) + "UI.java"; } /** @@ -110,21 +110,21 @@ import java.beans.EventHandler; import java.awt.Container; -public abstract class <%=Util.toUpperCaseFirstLetter(object.getName())%>UI extends <%=object.getType()%> implements <%=Util.toUpperCaseFirstLetter(object.getName())%>UICallback { +public abstract class <%=Util.capitalize(object.getName())%>UI extends <%=object.getType()%> implements <%=Util.capitalize(object.getName())%>UICallback { }*/ //creation des constructeurs selon le type de l'objet if (object.getType().equals("javax.swing.JDialog")){ /*{ - public <%=Util.toUpperCaseFirstLetter(object.getName())%>UI(){ + public <%=Util.capitalize(object.getName())%>UI(){ this((Frame)null); } - public <%=Util.toUpperCaseFirstLetter(object.getName())%>UI(Dialog owner){ + public <%=Util.capitalize(object.getName())%>UI(Dialog owner){ super(owner, i18n._("<%=object.getProperty("title").getStringValue()%>"), <%=object.getProperty("modal").getBooleanValue()%>); } - public <%=Util.toUpperCaseFirstLetter(object.getName())%>UI(Frame owner){ + public <%=Util.capitalize(object.getName())%>UI(Frame owner){ super(owner, i18n._("<%=object.getProperty("title").getStringValue()%>"), <%=object.getProperty("modal").getBooleanValue()%>); } }*/ @@ -132,7 +132,7 @@ }else if (object.getType().equals("javax.swing.JFrame")){ /*{ - public <%=Util.toUpperCaseFirstLetter(object.getName())%>UI(){ + public <%=Util.capitalize(object.getName())%>UI(){ super(i18n._("<%=object.getProperty("title").getStringValue()%>")); } }*/ @@ -142,7 +142,7 @@ /*{ public void init() { - <%=Util.toUpperCaseFirstLetter(object.getName())%>UI result = this; + <%=Util.capitalize(object.getName())%>UI result = this; }*/ generateAllStatement(output, object); @@ -175,7 +175,7 @@ // declaration de l'objet private <%=object.getType()%> <%=objectName%> = null; - public <%=object.getType()%> get<%=Util.toUpperCaseFirstLetter(object.getName())%>() { + public <%=object.getType()%> get<%=Util.capitalize(object.getName())%>() { // test si deja instancier if(<%=objectName%> == null){ @@ -248,7 +248,7 @@ if (args.size() == 0 ){ /*{ - public <%=Util.toUpperCaseFirstLetter(object.getName())%>UI(){ + public <%=Util.capitalize(object.getName())%>UI(){ super(); } @@ -256,7 +256,7 @@ }else{ /*{ - public <%=Util.toUpperCaseFirstLetter(object.getName())%>UI( }*/ + public <%=Util.capitalize(object.getName())%>UI( }*/ generateArgumentStatement(output, object); /*{ ){ super(}*/generateArgumentStatement(output, object);/*{); @@ -316,22 +316,22 @@ UIModelObject objectArg = (UIModelObject)arg; /*{ - result.set<%=Util.toUpperCaseFirstLetter(propertyName)%>(<%=index%>get<%=Util.toUpperCaseFirstLetter(objectArg.getName())%>()); + result.set<%=Util.capitalize(propertyName)%>(<%=index%>get<%=Util.capitalize(objectArg.getName())%>()); }*/ // cas ou la propriete est de type string }else if (arg instanceof String){ /*{ - result.set<%=Util.toUpperCaseFirstLetter(propertyName)%>(<%=index%>"<%=property.getStringValue()%>"); + result.set<%=Util.capitalize(propertyName)%>(<%=index%>"<%=property.getStringValue()%>"); }*/ // cas ou la propriete est de type char }else if (arg instanceof Character){ /*{ - result.set<%=Util.toUpperCaseFirstLetter(propertyName)%>(<%=index%>'<%=property.getCharValue()%>'); + result.set<%=Util.capitalize(propertyName)%>(<%=index%>'<%=property.getCharValue()%>'); }*/ }else{ /*{ - result.set<%=Util.toUpperCaseFirstLetter(propertyName)%>(<%=index%><%=property.getValue().toString()%>); + result.set<%=Util.capitalize(propertyName)%>(<%=index%><%=property.getValue().toString()%>); }*/ } }catch(Exception eee){ @@ -377,14 +377,14 @@ /*{ - public ArrayList get<%=Util.toUpperCaseFirstLetter(object.getName())%>Childs() { + public ArrayList get<%=Util.capitalize(object.getName())%>Childs() { ArrayList children = new ArrayList(); }*/ for(Iterator i=object.getChildren().iterator(); i.hasNext();){ UIModelObject objectChild = (UIModelObject) i.next(); /*{ - children.add(get<%=Util.toUpperCaseFirstLetter(objectChild.getName())%>()); + children.add(get<%=Util.capitalize(objectChild.getName())%>()); }*/ } /*{ @@ -403,7 +403,7 @@ /*{ - public ArrayList get<%=Util.toUpperCaseFirstLetter(object.getName())%>Constraints() { + public ArrayList get<%=Util.capitalize(object.getName())%>Constraints() { ArrayList constraints = new ArrayList(); }*/ for(Iterator i=object.getChildren().iterator(); i.hasNext();){ @@ -448,8 +448,8 @@ /*{ // recuperation des differentes donnees concernant l'objet - ArrayList childs = get<%=Util.toUpperCaseFirstLetter(object.getName())%>Childs(); - ArrayList constraints = get<%=Util.toUpperCaseFirstLetter(object.getName())%>Constraints(); + ArrayList childs = get<%=Util.capitalize(object.getName())%>Childs(); + ArrayList constraints = get<%=Util.capitalize(object.getName())%>Constraints(); // ajout des enfants avec leur contrainte Iterator iConstraints = constraints.iterator();