Buix-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
July 2009
- 3 participants
- 68 discussions
Author: kmorin
Date: 2009-07-24 17:18:31 +0200 (Fri, 24 Jul 2009)
New Revision: 1526
Modified:
trunk/pom.xml
Log:
upgrade GWT version to 1.6.0
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-07-24 08:57:21 UTC (rev 1525)
+++ trunk/pom.xml 2009-07-24 15:18:31 UTC (rev 1526)
@@ -205,7 +205,7 @@
<!-- libs version -->
<spring.version>2.0.5</spring.version>
<maven.version>2.0.10</maven.version>
- <gwt.version>1.5.3</gwt.version>
+ <gwt.version>1.6.0</gwt.version>
</properties>
1
0
r1525 - trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator
by kmorin@users.labs.libre-entreprise.org 24 Jul '09
by kmorin@users.labs.libre-entreprise.org 24 Jul '09
24 Jul '09
Author: kmorin
Date: 2009-07-24 10:57:21 +0200 (Fri, 24 Jul 2009)
New Revision: 1525
Modified:
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingImplementationGenerator.java
trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java
Log:
changed the return type of the generate method from void to JavaFile
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingAbstractClassGenerator.java 2009-07-24 08:57:21 UTC (rev 1525)
@@ -20,8 +20,6 @@
//~--- non-JDK imports --------------------------------------------------------
import java.beans.IntrospectionException;
-import java.io.File;
-import java.util.Map;
import org.nuiton.guix.tags.swing.MenuBarHandler;
;
import org.nuiton.guix.model.GuixModelObject;
@@ -82,8 +80,8 @@
script = sh.decomposeScript(gmo.getClassDescriptor().getScript());
}
- public JavaFile generates() {
- super.generate();
+ public JavaFile generate() {
+ super.addImports(gmo);
//add imports
for (String s : (List<String>) script.get(ScriptPart.IMPORTS)) {
@@ -625,11 +623,6 @@
gmo.getAttributeDescriptors().addAll(ads);
}
- @Override
- public void generate(File out) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
public Map<String, Map<String, String>> getBindings2Generate() {
return bindings2Generate;
}
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingGenerator.java 2009-07-24 08:57:21 UTC (rev 1525)
@@ -77,11 +77,11 @@
SwingAbstractClassGenerator sacg = new SwingAbstractClassGenerator(gmo, classes);
SwingImplementationGenerator simg = new SwingImplementationGenerator(gmo, classes);
- sing.generate(out);
+ sing.generate();
generators.put(sing, out);
- JavaFile jf = sacg.generates();
+ JavaFile jf = sacg.generate();
generators.put(sacg, outAbstract);
- simg.generate(outImpl);
+ simg.generate();
generators.put(simg, outImpl);
if (mainClass) {
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingImplementationGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingImplementationGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingImplementationGenerator.java 2009-07-24 08:57:21 UTC (rev 1525)
@@ -18,12 +18,7 @@
*/
package org.nuiton.guix.generator;
-//~--- non-JDK imports --------------------------------------------------------
-
import org.nuiton.guix.model.GuixModelObject;
-
-//~--- JDK imports ------------------------------------------------------------
-
import java.io.File;
import java.lang.reflect.Modifier;
import java.util.List;
@@ -52,14 +47,14 @@
}
@Override
- public void generate(File out) {
- super.generate();
+ public JavaFile generate() {
+ super.addImports(gmo);
//add the constructor
jf.addMethod(new JavaMethod(Modifier.PUBLIC, null, gmo.getClassDescriptor().getName() + "Impl",
null, null, "super();", "Constructor"));
- saveFile(out);
+ return jf;
}
}
Modified: trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java
===================================================================
--- trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
+++ trunk/guix-compiler-swing/src/main/java/org/nuiton/guix/generator/SwingInterfaceGenerator.java 2009-07-24 08:57:21 UTC (rev 1525)
@@ -52,8 +52,8 @@
}
@Override
- public void generate(File out) {
- super.generate();
+ public JavaFile generate() {
+ super.addImports(gmo);
addFields(gmo);
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "initialize", null, null, null, "initialization"));
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", getMethodName(Method.BEFORE_CREATION), null, null, null, ""));
@@ -64,7 +64,7 @@
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", getMethodName(Method.DATABINDING_INIT), null, null, null, "initilization of databinding"));
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", getMethodName(Method.IN_THE_END), null, null, null, ""));
- saveFile(out);
+ return jf;
}
/**
1
0
r1524 - trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator
by kmorin@users.labs.libre-entreprise.org 24 Jul '09
by kmorin@users.labs.libre-entreprise.org 24 Jul '09
24 Jul '09
Author: kmorin
Date: 2009-07-24 10:57:09 +0200 (Fri, 24 Jul 2009)
New Revision: 1524
Modified:
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator1.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtImplementationGenerator.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtInterfaceGenerator.java
Log:
changed the return type of the generate method from void to JavaFile
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java 2009-07-24 08:56:54 UTC (rev 1523)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
@@ -81,9 +81,9 @@
script = sh.decomposeScript(gmo.getClassDescriptor().getScript());
}
- //@Override
- public JavaFile generates() {
- super.generate();
+ @Override
+ public JavaFile generate() {
+ super.addImports(gmo);
//add imports
for (String s : (List<String>) script.get(ScriptPart.IMPORTS)) {
@@ -587,9 +587,5 @@
return bindings2Generate;
}
- @Override
- public void generate(File out) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
}
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java 2009-07-24 08:56:54 UTC (rev 1523)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
@@ -111,11 +111,11 @@
ghg.generate(outHtmlMain);
}
- ging.generate(out);
+ ging.generate();
generators.put(ging, out);
- JavaFile jf = gacg.generates();
+ JavaFile jf = gacg.generate();
generators.put(gacg, outAbstract);
- gimg.generate(outImpl);
+ gimg.generate();
generators.put(gimg, outImpl);
serializer.startTag("", "bean");
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator1.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator1.java 2009-07-24 08:56:54 UTC (rev 1523)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtGenerator1.java 2009-07-24 08:57:09 UTC (rev 1524)
@@ -87,11 +87,11 @@
ghg.generate(outHtmlMain);
}
- ging.generate(out);
+ ging.generate();
generators.put(ging, out);
- JavaFile jf = gacg.generates();
+ JavaFile jf = gacg.generate();
generators.put(gacg, outAbstract);
- gimg.generate(outImpl);
+ gimg.generate();
generators.put(gimg, outImpl);
serializer.startTag("", "bean");
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtImplementationGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtImplementationGenerator.java 2009-07-24 08:56:54 UTC (rev 1523)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtImplementationGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
@@ -52,19 +52,11 @@
}
@Override
- public void generate(File out) {
- super.generate();
-
- //if (!gmo.getJavadoc().equals("")) {
- //sb.append("\n/**\n * ");
- //sb.append(gmo.getJavadoc());
- //sb.append("\n */");
- //}
-
+ public JavaFile generate() {
+ super.addImports(gmo);
jf.addMethod(new JavaMethod(Modifier.PUBLIC, null, gmo.getClassDescriptor().getName() + "Impl",
null, null, "super();", "Constructor"));
-
- saveFile(out);
+ return jf;
}
public void addMainMethod() {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtInterfaceGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtInterfaceGenerator.java 2009-07-24 08:56:54 UTC (rev 1523)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtInterfaceGenerator.java 2009-07-24 08:57:09 UTC (rev 1524)
@@ -52,8 +52,8 @@
}
@Override
- public void generate(File out) {
- super.generate();
+ public JavaFile generate() {
+ super.addImports(gmo);
addFields(gmo);
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "initialize", null, null, null, "initialization"));
@@ -65,7 +65,7 @@
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", getMethodName(Method.DATABINDING_INIT), null, null, null, "initilization of databinding"));
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", getMethodName(Method.IN_THE_END), null, null, null, ""));
- saveFile(out);
+ return jf;
}
/**
1
0
r1523 - trunk/guix-compiler/src/main/java/org/nuiton/guix/generator
by kmorin@users.labs.libre-entreprise.org 24 Jul '09
by kmorin@users.labs.libre-entreprise.org 24 Jul '09
24 Jul '09
Author: kmorin
Date: 2009-07-24 10:56:54 +0200 (Fri, 24 Jul 2009)
New Revision: 1523
Modified:
trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java
Log:
changed the return type of the generate method from void to JavaFile
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java 2009-07-23 15:39:55 UTC (rev 1522)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFileGenerator.java 2009-07-24 08:56:54 UTC (rev 1523)
@@ -18,23 +18,16 @@
*/
package org.nuiton.guix.generator;
-//~--- non-JDK imports --------------------------------------------------------
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.guix.model.GuixModelObject;
-//~--- JDK imports ------------------------------------------------------------
-
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.nuiton.guix.tags.TagHandler;
-import org.nuiton.guix.tags.TagManager;
/**
* Abstract class of all the generator which generate java files
@@ -78,16 +71,9 @@
*
* @param out the file to generate
*/
- public abstract void generate(File out);
+ public abstract JavaFile generate();
/**
- * Generates the class described by the GuixModelObject gmo
- */
- protected void generate() {
- addImports(gmo);
- }
-
- /**
* Add imports to the generated file
*
* @param gmo GuixModelObject which represents the class to generate
1
0
r1509 - trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor
by tchemit@users.labs.libre-entreprise.org 24 Jul '09
by tchemit@users.labs.libre-entreprise.org 24 Jul '09
24 Jul '09
Author: tchemit
Date: 2009-07-24 10:00:05 +0200 (Fri, 24 Jul 2009)
New Revision: 1509
Added:
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java
Modified:
trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/LocaleEditor.java
Log:
add ClassEditor (from commndline), remove deprecated on LocaleEditor (can be used under other circonstancies than changing language of an application)
Added: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java (rev 0)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/ClassCellEditor.java 2009-07-24 08:00:05 UTC (rev 1509)
@@ -0,0 +1,119 @@
+/*
+* *##% ui
+ * Copyright (C) 2008 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>. ##%* */
+package jaxx.runtime.swing.editor;
+
+import org.apache.commons.beanutils.Converter;
+import org.nuiton.util.ConverterUtil;
+
+import javax.swing.DefaultCellEditor;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.event.CellEditorListener;
+import javax.swing.table.TableCellEditor;
+import java.awt.Component;
+import java.util.EventObject;
+
+/**
+ * A class cell editor (fork from comandline project).
+ *
+ * @author chemit
+ */
+public class ClassCellEditor implements TableCellEditor {
+
+ protected TableCellEditor delegate;
+
+ @Override
+ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
+
+ String valStr = (value + "").trim();
+ if (valStr.equals("null")) {
+ valStr = "";
+ } else if (valStr.startsWith("class ")) {
+ valStr = valStr.substring(6);
+ }
+ Component comp;
+ comp = getDelegate().getTableCellEditorComponent(table, valStr, isSelected, row, column);
+ return comp;
+ }
+
+ @Override
+ public Object getCellEditorValue() {
+ Object o = !hasDelegate() ? null : delegate.getCellEditorValue();
+ if (o == null) {
+ return null;
+ }
+ Converter converter = ConverterUtil.getConverter(Class.class);
+
+ try {
+ if (converter != null) {
+ return converter.convert(Class.class, o);
+ }
+ o = Class.forName(o + "");
+ } catch (Exception e) {
+ o = null;
+ }
+ return o;
+ }
+
+ @Override
+ public boolean isCellEditable(EventObject anEvent) {
+ return !hasDelegate() || delegate.isCellEditable(anEvent);
+ }
+
+ @Override
+ public boolean shouldSelectCell(EventObject anEvent) {
+ return hasDelegate() && delegate.shouldSelectCell(anEvent);
+ }
+
+ @Override
+ public boolean stopCellEditing() {
+ return !hasDelegate() || delegate.stopCellEditing();
+ }
+
+ @Override
+ public void cancelCellEditing() {
+ if (hasDelegate()) {
+ delegate.cancelCellEditing();
+ }
+ }
+
+ @Override
+ public void addCellEditorListener(CellEditorListener l) {
+ if (hasDelegate()) {
+ delegate.addCellEditorListener(l);
+ }
+ }
+
+ @Override
+ public void removeCellEditorListener(CellEditorListener l) {
+ if (hasDelegate()) {
+ delegate.removeCellEditorListener(l);
+ }
+ }
+
+ protected TableCellEditor getDelegate() {
+ if (delegate == null) {
+ delegate = new DefaultCellEditor(new JTextField());
+ }
+ return delegate;
+ }
+
+ protected boolean hasDelegate() {
+ return delegate != null;
+ }
+}
Modified: trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/LocaleEditor.java
===================================================================
--- trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/LocaleEditor.java 2009-07-15 13:13:01 UTC (rev 1508)
+++ trunk/jaxx-runtime-swing/src/main/java/jaxx/runtime/swing/editor/LocaleEditor.java 2009-07-24 08:00:05 UTC (rev 1509)
@@ -31,7 +31,6 @@
*
* @author chemit
* @since 1.6.0
- * @deprecated prefer use the more sotisticated editor in jaxx-runtime-swing-widget module.
*/
public class LocaleEditor extends JComboBox {
1
0
r1522 - in trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix: . generator tags/gwt
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
23 Jul '09
Author: kmorin
Date: 2009-07-23 17:39:55 +0200 (Thu, 23 Jul 2009)
New Revision: 1522
Modified:
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/GwtGuixInitializer.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ApplicationHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ButtonHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/LabelHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuBarHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuItemHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/PanelHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TabPanelHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java
trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/UIObjectHandler.java
Log:
Add javadoc + licences
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/GwtGuixInitializer.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/GwtGuixInitializer.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/GwtGuixInitializer.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,5 +1,5 @@
/**
- * *##% guix-compiler
+ * *##% guix-compiler-gwt
* Copyright (C) 2009 CodeLutin
*
* This program is free software: you can redistribute it and/or modify
@@ -39,7 +39,7 @@
/**
* Initialize the application
*
- * @author morin
+ * @author kmorin
*/
public class GwtGuixInitializer {
public static void initialize() {
@@ -59,5 +59,3 @@
}
}
-
-//~ Formatted by Jindent --- http://www.jindent.com
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/generator/GwtAbstractClassGenerator.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -47,7 +47,6 @@
import org.nuiton.guix.tags.gwt.MenuHandler;
import org.nuiton.guix.tags.gwt.MenuItemHandler;
import org.nuiton.guix.tags.gwt.RowHandler;
-import org.nuiton.guix.tags.gwt.TabPanelHandler;
import org.nuiton.guix.tags.gwt.TableHandler;
/**
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ApplicationHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ApplicationHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ApplicationHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
/**
+ * Handles the application tag
*
- * @author kevin
+ * @author kmorin
*/
public class ApplicationHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ButtonHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ButtonHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ButtonHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
/**
+ * Handles the Button tag
*
- * @author kevin
+ * @author kmorin
*/
public class ButtonHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,5 +1,5 @@
/**
- * *##% guix-compiler-swing
+ * *##% guix-compiler-gwt
* Copyright (C) 2009 CodeLutin
*
* This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
/**
* Represents a cell of a table
*
- * @author kevin
+ * @author kmorin
*/
public class CellHandler extends TableHandler {
/** id of the object contained by the cell */
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/LabelHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/LabelHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/LabelHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,14 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
-import com.google.gwt.user.client.EventListener;
/**
+ * Handles the Label tag
*
- * @author kevin
+ * @author kmorin
*/
public class LabelHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuBarHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuBarHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuBarHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,14 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
-import com.google.gwt.user.client.EventListener;
/**
+ * Handles the MenuBar tag
*
- * @author kevin
+ * @author kmorin
*/
public class MenuBarHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
/**
+ * Handles the Menu tag
*
- * @author kevin
+ * @author kmorin
*/
public class MenuHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuItemHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuItemHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/MenuItemHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
/**
+ * Handles the MenuItem tag
*
- * @author kevin
+ * @author kmorin
*/
public class MenuItemHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/PanelHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/PanelHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/PanelHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
/**
+ * Handles Panel tag
*
- * @author kevin
+ * @author kmorin
*/
public class PanelHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,5 +1,5 @@
/**
- * *##% guix-compiler-swing
+ * *##% guix-compiler-gwt
* Copyright (C) 2009 CodeLutin
*
* This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
/**
* Represents a row of a table
*
- * @author kevin
+ * @author kmorin
*/
public class RowHandler extends TableHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TabPanelHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TabPanelHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TabPanelHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags.gwt;
/**
+ * Handles TabPanel tags
*
- * @author kevin
+ * @author kmorin
*/
public class TabPanelHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,5 +1,5 @@
/**
- * *##% guix-compiler-swing
+ * *##% guix-compiler-gwt
* Copyright (C) 2009 CodeLutin
*
* This program is free software: you can redistribute it and/or modify
@@ -28,7 +28,7 @@
/**
* Represents a table
*
- * @author kevin
+ * @author kmorin
*/
public class TableHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,14 +1,29 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
+package org.nuiton.guix.tags.gwt;
-package org.nuiton.guix.tags.gwt;
import com.google.gwt.user.client.ui.KeyboardListener;
/**
+ * Handles the Textfield tag
*
- * @author kevin
+ * @author kmorin
*/
public class TextFieldHandler extends UIObjectHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,14 +1,29 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
+package org.nuiton.guix.tags.gwt;
-package org.nuiton.guix.tags.gwt;
import com.google.gwt.user.client.ui.ClickListener;
/**
+ * Handles the ToggleButton tags
*
- * @author kevin
+ * @author kmorin
*/
public class ToggleButtonHandler extends ButtonHandler {
Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/UIObjectHandler.java
===================================================================
--- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/UIObjectHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
+++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/UIObjectHandler.java 2009-07-23 15:39:55 UTC (rev 1522)
@@ -1,16 +1,29 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler-gwt
+ * Copyright (C) 2009 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>. ##%*
*/
+package org.nuiton.guix.tags.gwt;
-package org.nuiton.guix.tags.gwt;
-import com.google.gwt.user.client.EventListener;
-import com.google.gwt.user.client.ui.FocusListener;
import org.nuiton.guix.tags.DefaultTagHandler;
/**
+ * Contains the common parameters for all the GWT handlers
*
- * @author kevin
+ * @author kmorin
*/
public abstract class UIObjectHandler extends DefaultTagHandler {
1
0
r1521 - in trunk/guix-compiler/src/main/java/org/nuiton/guix: generator tags
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
23 Jul '09
Author: kmorin
Date: 2009-07-23 17:30:02 +0200 (Thu, 23 Jul 2009)
New Revision: 1521
Modified:
trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/GuixGenerator.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ApplicationHandler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/PanelHandler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java
Log:
Add javadoc + licences
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/GuixGenerator.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/GuixGenerator.java 2009-07-23 14:46:10 UTC (rev 1520)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/GuixGenerator.java 2009-07-23 15:30:02 UTC (rev 1521)
@@ -50,9 +50,14 @@
protected List<File> cssFiles = null;
/** Name to give to the generated launcher*/
protected String launcherName = null;
- /** */
+ /** Maps the field name with a map of the attribute and its value */
protected Map<String,Map<String, String>> bindings2Generate = new HashMap<String,Map<String, String>>();
+ /**
+ * Generates a JavaFile
+ *
+ * @return the JavaFile generated
+ */
public abstract JavaFile generate();
public File getDestDir() {
@@ -128,8 +133,26 @@
this.bindings2Generate = bindings2Generate;
}
+ /**
+ * Saves the generated files
+ */
public abstract void saveFiles();
+ /**
+ * Checks if the objects of the binding exist
+ *
+ * @param dbCreation the method code to apply the binding
+ * @param dbDeletion the method code to remove the binding
+ * @param prevTh the TagHandler of the parent of the object inspected
+ * @param jf the javaFile of the inspected object (null if it is not a generated object)
+ * @param clazz the clazz of the inspected object (null if it is a generated object)
+ * @param binding the array containing the name of the objects to check
+ * @param i the index of the being checked object
+ * @param alreadyChecked list of the already checked objects
+ * @param methodToInvoke the name of the method which will process the databinding
+ * @param generatedFiles maps the GuixGenerator with its JavaFile
+ * @return the list of the listeners to add to the objects for the databinding
+ */
public abstract List<Class> generateBindings(StringBuffer dbCreation, StringBuffer dbDeletion, TagHandler prevTh, JavaFile jf,
Class clazz, String[] binding, int i, List<String> alreadyChecked, String methodToInvoke, Map<GuixGenerator,JavaFile> generatedFiles);
}
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ApplicationHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ApplicationHandler.java 2009-07-23 14:46:10 UTC (rev 1520)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/ApplicationHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler
+ * Copyright (C) 2009 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>. ##%*
*/
package org.nuiton.guix.tags;
/**
- *
- * @author kevin
+ * Application Handler for the tests
+ * @author kmorin
*/
public abstract class ApplicationHandler extends DefaultTagHandler {
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java 2009-07-23 14:46:10 UTC (rev 1520)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/DefaultTagHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
@@ -1,14 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler
+ * Copyright (C) 2009 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>. ##%*
*/
+package org.nuiton.guix.tags;
-package org.nuiton.guix.tags;
import java.beans.BeanInfo;
import java.beans.EventSetDescriptor;
import java.beans.IntrospectionException;
import java.beans.Introspector;
-import java.beans.MethodDescriptor;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -18,11 +31,13 @@
import org.nuiton.guix.UnsupportedAttributeException;
/**
+ * Default TagHandler, containing common methods for all the tags
*
- * @author kevin
+ * @author kmorin
*/
public abstract class DefaultTagHandler implements TagHandler {
+ /** Maps the common name for an attribute with its real name for the class to generate */
protected Map<String,String> attrMap = new HashMap<String,String>();
/** Maps property names to their respective ProxyEventInfos. */
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/PanelHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/PanelHandler.java 2009-07-23 14:46:10 UTC (rev 1520)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/PanelHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
@@ -1,13 +1,27 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags;
/**
+ * Panel Handler for the tests
*
- * @author kevin
+ * @author kmorin
*/
public abstract class PanelHandler extends DefaultTagHandler {
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java 2009-07-23 14:46:10 UTC (rev 1520)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/tags/TagHandler.java 2009-07-23 15:30:02 UTC (rev 1521)
@@ -1,13 +1,29 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
+/**
+ * *##% guix-compiler
+ * Copyright (C) 2009 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>. ##%*
*/
-
package org.nuiton.guix.tags;
/**
+ * Interface of the tag handlers.
+ * It permits to get the right class or the right attribiute names to generate for the common tags.
+ * It also permits to know which listeners to add for the binding
*
- * @author kevin
+ * @author kmorin
*/
public interface TagHandler {
1
0
r1520 - in trunk/guix-compiler/src/main/java/org/nuiton/guix: . compiler generator
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
23 Jul '09
Author: kmorin
Date: 2009-07-23 16:46:10 +0200 (Thu, 23 Jul 2009)
New Revision: 1520
Modified:
trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/compiler/GuixCompiler.java
trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java
Log:
Add null conditions to avoid NPE
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java 2009-07-23 13:33:45 UTC (rev 1519)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java 2009-07-23 14:46:10 UTC (rev 1520)
@@ -420,7 +420,9 @@
}
return classDescriptor;
}
- classDescriptors.get(i).setPackageName(classDescriptor.getPackageName());
+ if(classDescriptor.getPackageName() != null) {
+ classDescriptors.get(i).setPackageName(classDescriptor.getPackageName());
+ }
if (classDescriptor.getScript() != null) {
if (classDescriptors.get(i).getScript() == null) {
classDescriptors.get(i).setScript(classDescriptor.getScript());
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/compiler/GuixCompiler.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/compiler/GuixCompiler.java 2009-07-23 13:33:45 UTC (rev 1519)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/compiler/GuixCompiler.java 2009-07-23 14:46:10 UTC (rev 1520)
@@ -118,7 +118,6 @@
public GuixModelObject compile() {
if ((src != null) && (launcher != null)) {
try {
-
// Creation of the Xml parser
XmlPullParserFactory factory =
XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null);
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java 2009-07-23 13:33:45 UTC (rev 1519)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/generator/JavaFile.java 2009-07-23 14:46:10 UTC (rev 1520)
@@ -189,7 +189,7 @@
public void addField(JavaField field, boolean javaBean) {
addSimpleField(field);
String id = field.getName();
- String capitalizedName = (id.length()>0)? Character.toUpperCase(id.charAt(0))+id.substring(1) : id;
+ String capitalizedName = (id != null && id.length()>0)? Character.toUpperCase(id.charAt(0))+id.substring(1) : id;
// add getter file
String content = (classType == INTERFACE) ? null : String.format(GETTER_PATTERN, id);
addMethod(new JavaMethod(Modifier.PUBLIC, field.getType(),
1
0
r1519 - in trunk: . guix-compiler/src/main/java/org/nuiton/guix guix-compiler/src/test guix-test-swing/src/main/java/org/nuiton/guix/demo
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
23 Jul '09
Author: kmorin
Date: 2009-07-23 15:33:45 +0200 (Thu, 23 Jul 2009)
New Revision: 1519
Removed:
trunk/guix-maven-plugin/
Modified:
trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java
trunk/guix-compiler/src/test/test.guix
trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.css
trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.script
trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo2.guix
trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo3.guix
trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/JButton.css
Log:
Modified: trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java
===================================================================
--- trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java 2009-07-23 11:51:40 UTC (rev 1518)
+++ trunk/guix-compiler/src/main/java/org/nuiton/guix/GuixLauncher.java 2009-07-23 13:33:45 UTC (rev 1519)
@@ -188,8 +188,10 @@
}
}
+ //if the compilation successed
if (success) {
int i = 0;
+ //check if all the objects have an existing clas or a class being generated
while (success && i < classDescriptors.size()) {
success = (classDescriptors.get(i).getPackageName() != null || TagManager.getGuixClassHandler(classDescriptors.get(i).getName()) != null);
i++;
@@ -220,6 +222,7 @@
for (GuixModelObject mo : rootModelObjects.keySet()) {
try {
+ //init generator
GuixGenerator gen = (GuixGenerator) generatorClass.newInstance();
gen.setDestDir(destDir);
gen.setGmo(mo);
@@ -229,6 +232,7 @@
gen.setClasses(Arrays.asList(classNames));
gen.setLauncherName(launcherName);
gen.setCSSFiles(mo.getCssFiles());
+ //generates the file without databinding
JavaFile generatedFile = gen.generate();
if(generatedFile != null) {
generatedFiles.put(gen, generatedFile);
@@ -245,25 +249,34 @@
}
}
}
+ //generation of the databinding
for (GuixGenerator gen : generatedFiles.keySet()) {
- int dataSourceNumber = 0;
+ //int dataSourceNumber = 0;
+ //databinding creation method
StringBuffer dbCreation = new StringBuffer();
+ //databinding deletion method
StringBuffer dbDeletion = new StringBuffer();
+ //databinding execution method
StringBuffer dbProcess = new StringBuffer();
JavaFile jf = generatedFiles.get(gen);
+ //for each field which binds the value of others objects
for (String field : gen.getBindingsToGenerate().keySet()) {
for (String attr : gen.getBindingsToGenerate().get(field).keySet()) {
dbCreation.append(dbCreation.length() != 0 ? "else if(\"" : "if(\"").append(field).append(".").append(attr).append("\".equals(_binding)) {\n");
dbDeletion.append(dbDeletion.length() != 0 ? "else if(\"" : "if(\"").append(field).append(".").append(attr).append("\".equals(_binding)) {\n");
dbProcess.append(dbProcess.length() != 0 ? "else if(\"" : "if(\"").append(field).append(".").append(attr).append("\".equals(_binding)) {\n").append(field).append(".set").append(Character.toUpperCase(attr.charAt(0))).append(attr.substring(1)).append("(");
List<String[]> bindings = new ArrayList<String[]>();
+ //the parser which decompose the binding into the different elements to bind
JavaParser p = new JavaParser(new StringReader(gen.getBindingsToGenerate().get(field).get(attr)));
- //start parsing
+ //start parsing the binding value
while (!p.Line()) {
SimpleNode node = p.popNode();
if (node != null) {
+ //get the different elements to bind
for (String s : browseNode(node)) {
+ //decompose the element s into attributes
List<String> l = new ArrayList<String>();
+ //number of open brackets
int parOuvertes = 0;
StringBuffer read = new StringBuffer();
for (char c : s.toCharArray()) {
@@ -293,24 +306,31 @@
}
}
}
+ //generates the code
List<Class> listeners = new ArrayList<Class>();
for (String[] binding : bindings) {
StringBuffer methodToInvoke = new StringBuffer();
+ //the binding value before the generator changes it
StringBuffer oldBinding = new StringBuffer();
+ //generates the method name for calling the databinding process method
for (String s : binding) {
methodToInvoke.append(s.replaceAll("\\W", ""));
oldBinding.append(s).append(".");
}
oldBinding.setLength(oldBinding.length() - 1);
+ //generates the code and modify the simple attribute name in the binding by the getter
listeners.addAll(gen.generateBindings(dbCreation, dbDeletion, null, jf, null, binding, 0, null, methodToInvoke.toString(), generatedFiles));
//JavaArgument[] args = new JavaArgument[]{new JavaArgument(parameterType.getName(), "event")};
+ //new value of the binding with the getters
StringBuffer newBinding = new StringBuffer();
for (String s : binding) {
newBinding.append(s).append(".");
}
newBinding.setLength(newBinding.length() - 1);
+ //replaces the old binding by the newer one
gen.getBindingsToGenerate().get(field).put(attr, gen.getBindingsToGenerate().get(field).get(attr).replace(oldBinding.toString(), newBinding.toString()));
+ //method called by the listener
if (jf.getMethod("onChangeFrom" + methodToInvoke, /*args*/ null) == null) {
jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "onChangeFrom" + methodToInvoke.toString(), /*args*/ null, null, /*"_DataSource" + dataSourceNumber + ".propertyChange(null);"*/ "processDataBinding(\"" + field + "." + attr + "\");", null));
}
@@ -321,17 +341,20 @@
dbCreation.append("}\n");
dbDeletion.append("}\n");
dbProcess.append(gen.getBindingsToGenerate().get(field).get(attr)).append(");\n}\n");
+ //if the binding got some elements to bind
if (listeners != null) {
//jf.addField(new JavaField(Modifier.PRIVATE, "java.beans.PropertyChangeListener", "_DataSource" + dataSourceNumber, "new org.nuiton.guix.runtime.DataBindingListener(this,\"" + field + "." + attr + "\")", null, null));
+ //method to init the databinding
jf.getMethod("initDataBinding", null).appendBodyCode("applyDataBinding(\"" + field + "." + attr + "\");", "\n");
- for (Class listener : listeners) {
- final List<Method> listenerMethods = Arrays.asList(listener.getMethods());
- Class parameterType = listenerMethods.get(0).getParameterTypes()[0];
- }
+// for (Class listener : listeners) {
+// final List<Method> listenerMethods = Arrays.asList(listener.getMethods());
+// Class parameterType = listenerMethods.get(0).getParameterTypes()[0];
+// }
}
- dataSourceNumber++;
+ //dataSourceNumber++;
}
}
+ //if the generated file has a superclass which also is a generated class, apply the databinding of the superclass to the class
if (generatedFiles.get(jf.getSuperClass()) != null) {
dbCreation.append("else {\nsuper.applyDataBinding(_binding);\n" +
"return;\n}");
@@ -342,10 +365,12 @@
"return;\n}\n" +
"activeBindings.add(_binding);\ntry{\n");
dbProcess.append("\n} finally {\nactiveBindings.remove(_binding);\n}\n");
+
jf.addField(new JavaField(Modifier.PRIVATE, "java.util.List<String>", "activeBindings", "new java.util.ArrayList<String>()", "List of the active bindings", null), false);
- jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "applyDataBinding", new JavaArgument[]{new JavaArgument("String", "_binding")}, null, dbCreation.toString(), null));
- jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "removeDataBinding", new JavaArgument[]{new JavaArgument("String", "_binding")}, null, dbDeletion.toString(), null));
- jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "processDataBinding", new JavaArgument[]{new JavaArgument("String", "_binding")}, null, dbProcess.toString(), null));
+ jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "applyDataBinding", new JavaArgument[]{new JavaArgument("String", "_binding")}, null, dbCreation.toString(), "Adds the listeners to the elements which are bound by another attribute"));
+ jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "removeDataBinding", new JavaArgument[]{new JavaArgument("String", "_binding")}, null, dbDeletion.toString(), "Removes the listeners to the elements which are bound by another attribute"));
+ jf.addMethod(new JavaMethod(Modifier.PUBLIC, "void", "processDataBinding", new JavaArgument[]{new JavaArgument("String", "_binding")}, null, dbProcess.toString(), "Executes the binding instruction"));
+ //saves the files
gen.saveFiles();
}
serializer.endTag("", "beans");
@@ -427,9 +452,16 @@
return classDescriptors.get(i);
}
+ /**
+ * Decompose the binding into the different elements to bind
+ *
+ * @param node the Node being parsed
+ * @return the elements to bind
+ */
private List<String> browseNode(SimpleNode node) {
List<String> result = new ArrayList<String>();
for (int i = 0; i < node.jjtGetNumChildren(); i++) {
+ //if the child is not a String and are not parameters of a method
if (node.getChild(i).getId() == JavaParserTreeConstants.JJTPRIMARYEXPRESSION && !node.getChild(i).getText().trim().startsWith("(") && !node.getChild(i).getText().trim().startsWith("\"")) {
result.add(node.getChild(i).getText().trim());
}
Modified: trunk/guix-compiler/src/test/test.guix
===================================================================
--- trunk/guix-compiler/src/test/test.guix 2009-07-23 11:51:40 UTC (rev 1518)
+++ trunk/guix-compiler/src/test/test.guix 2009-07-23 13:33:45 UTC (rev 1519)
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<org.nuiton.guix.Test>
+<Application>
<Panel />
-</org.nuiton.guix.Test>
+</Application>
Modified: trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.css
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.css 2009-07-23 11:51:40 UTC (rev 1518)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.css 2009-07-23 13:33:45 UTC (rev 1519)
@@ -1,16 +1,37 @@
-#button:{object . getText( ) . startsWith( "-" )}
+#button:{getText( ) . startsWith( "-" )}
{
- foreground: red;
+ foreground: "new java.awt.Color(0,255,0)";
}
#label
{
- background : blue;
+ foreground : "new java.awt.Color(0,120,255)";
}
-
-.bold
+#label:onMouseEntered
{
- font : bold;
+ foreground : "new java.awt.Color(255,120,0)";
}
+#label:onMouseExited
+{
+ foreground : "new java.awt.Color(0,120,255)";
+}
+
+JToolBar {
+ border : "new javax.swing.border.EtchedBorder()";
+ constraint : "BorderLayout.NORTH";
+}
+
+#tabPanel {
+ constraint : "BorderLayout.CENTER";
+ size : "800,400";
+}
+
+#bouton1, #textfield {
+ size: "100,35";
+}
+
+.table {
+ border : "new javax.swing.border.EtchedBorder()";
+}
Modified: trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.script
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.script 2009-07-23 11:51:40 UTC (rev 1518)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo.script 2009-07-23 13:33:45 UTC (rev 1519)
@@ -1,3 +1,3 @@
-public void testSameName() {
+static public void testSameName() {
System.out.println("load the script file with the same name");
}
Modified: trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo2.guix
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo2.guix 2009-07-23 11:51:40 UTC (rev 1518)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo2.guix 2009-07-23 13:33:45 UTC (rev 1519)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!-- test javadoc Application -->
-<swing:JPanel xmlns:swing='javax.swing.*'>
- <swing:JToggleButton id="button" text="Push me" selected ="true" />
-</swing:JPanel>
+<Panel>
+ <ToggleButton id="button" text="Push me" selected="true" onClick='{System.out.println("test")}' />
+</Panel>
Modified: trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo3.guix
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo3.guix 2009-07-23 11:51:40 UTC (rev 1518)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/GuixDemo3.guix 2009-07-23 13:33:45 UTC (rev 1519)
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!-- test javadoc Application -->
-<swing:JButton xmlns:swing='javax.swing.*'>
-</swing:JButton>
+<Button text="GuixDemo3">
+</Button>
Modified: trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/JButton.css
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/JButton.css 2009-07-23 11:51:40 UTC (rev 1518)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/demo/JButton.css 2009-07-23 13:33:45 UTC (rev 1519)
@@ -1,30 +1,9 @@
-JButton {
- font-size: 18;
- width: 80;
- height: 35;
-}
-
-JButton.digit {
- foreground: blue;
-}
-
-JButton#dot {
- font-size: 20;
-}
-
-JButton.operator {
- font-size: 16;
- foreground: #009900;
-}
-
-JButton.clear {
- foreground: red;
-}
-
-JButton:mouseover {
- font-weight: bold;
-}
-
-JButton.operator:mouseover {
- font-weight: normal;
+Button {
+ size: "80,35";
+ foreground: "new java.awt.Color(120,255,0)";
}
+
+Button:onActionPerformed {
+ text : "click !";
+}
+
1
0
r1518 - trunk/guix-test-swing/src/main/java/org/nuiton/guix
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
by kmorin@users.labs.libre-entreprise.org 23 Jul '09
23 Jul '09
Author: kmorin
Date: 2009-07-23 13:51:40 +0200 (Thu, 23 Jul 2009)
New Revision: 1518
Removed:
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Abstract.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Impl.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Abstract.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Impl.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoImpl.java
trunk/guix-test-swing/src/main/java/org/nuiton/guix/Main.java
Log:
Removes the java files
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,96 +0,0 @@
-package org.nuiton.guix;
-
-import java.util.ArrayList;
-import javax.swing.JMenuBar;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.JToolBar;
-import javax.swing.JButton;
-import javax.swing.JTabbedPane;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.JLabel;
-import org.nuiton.guix.GuixDemo3Abstract;
-import org.nuiton.guix.GuixDemo2Abstract;
-
-/**
- * test javadoc Application
- */
-public interface GuixDemo {
- /*---------------------------------------------------------------------------------*/
- /*-- public acessor methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public JToolBar get$JToolBar5();
-
- public GuixDemo3Abstract getBt3();
-
- public GuixDemo3Abstract getBt31();
-
- public GuixDemo3Abstract getBt32();
-
- public GuixDemo3Abstract getBt34();
-
- public ArrayList getController();
-
- public GuixDemo2Abstract getGd2();
-
- public GuixDemo2Abstract getGd22();
-
- public javax.swing.JPanel getTable();
-
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void set$JToolBar5(JToolBar newValue);
-
- public void setBt3(GuixDemo3Abstract newValue);
-
- public void setBt31(GuixDemo3Abstract newValue);
-
- public void setBt32(GuixDemo3Abstract newValue);
-
- public void setBt34(GuixDemo3Abstract newValue);
-
- public void setController(ArrayList newValue);
-
- public void setGd2(GuixDemo2Abstract newValue);
-
- public void setGd22(GuixDemo2Abstract newValue);
-
- public void setTable(javax.swing.JPanel newValue);
-
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void beforeBinding();
-
- public void beforeCreation();
-
- public void beforeInitialization();
-
- /**
- * Components creation
- */
- public void componentsCreation();
-
- /**
- * components layout
- */
- public void componentsTree();
-
- public void inTheEnd();
-
- /**
- * initilization of databinding
- */
- public void initDataBinding();
-
- /**
- * initialization
- */
- public void initialize();
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,41 +0,0 @@
-package org.nuiton.guix;
-
-import javax.swing.JToggleButton;
-
-/**
- * test javadoc Application
- */
-public interface GuixDemo2 {
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void beforeBinding();
-
- public void beforeCreation();
-
- public void beforeInitialization();
-
- /**
- * Components creation
- */
- public void componentsCreation();
-
- /**
- * components layout
- */
- public void componentsTree();
-
- public void inTheEnd();
-
- /**
- * initilization of databinding
- */
- public void initDataBinding();
-
- /**
- * initialization
- */
- public void initialize();
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Abstract.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Abstract.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Abstract.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,163 +0,0 @@
-package org.nuiton.guix;
-
-import javax.swing.JToggleButton;
-
-/**
- * test javadoc Application
- */
-public abstract class GuixDemo2Abstract extends javax.swing.JPanel implements GuixDemo2 {
- /**
- * List of the active bindings
- */
- private java.util.List<String> activeBindings = new java.util.ArrayList<String>();
- /**
- * test javadoc Application
- */
- private javax.swing.JToggleButton button;
- /**
- * test javadoc Application
- */
- private org.nuiton.guix.GuixDemo2Abstract guixdemo2 = this;
-
- /*---------------------------------------------------------------------------------*/
- /*-- Constructors -----------------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- /**
- * Constructor
- */
- public GuixDemo2Abstract() {
- initialize();
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- JAXXObject implementation ----------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void applyDataBinding(String _binding) {
- processDataBinding(_binding);
- }
-
- public void firePropertyChange(String name, Object oldValue, Object newValue) {
- super.firePropertyChange(name, oldValue, newValue);
- }
-
- public void processDataBinding(String _binding) {
- if (activeBindings.contains(_binding)) {
- return;
- }
- activeBindings.add(_binding);
- try{
-
- } finally {
- activeBindings.remove(_binding);
- }
- }
-
- public void removeDataBinding(String _binding) {
-
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- public acessor methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public java.util.List<String> getActiveBindings() {
- return activeBindings;
- }
-
- public javax.swing.JToggleButton getButton() {
- return button;
- }
-
- public org.nuiton.guix.GuixDemo2Abstract getGuixdemo2() {
- return guixdemo2;
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void setButton(javax.swing.JToggleButton newValue) {
- this.button = newValue;
- }
-
- public void setGuixdemo2(org.nuiton.guix.GuixDemo2Abstract newValue) {
- this.guixdemo2 = newValue;
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void beforeBinding() {
-
- }
-
- public void beforeCreation() {
-
- }
-
- public void beforeInitialization() {
-
- }
-
- /**
- * Components creation
- */
- public void componentsCreation() {
- createButton();
- }
-
- /**
- * components layout
- */
- public void componentsTree() {
- this.setLayout(new java.awt.FlowLayout());
- this.add(button);
- }
-
- public void inTheEnd() {
-
- }
-
- /**
- * initilization of databinding
- */
- public void initDataBinding() {
-
- }
-
- /**
- * initialization
- */
- public void initialize() {
- beforeCreation();
- componentsCreation();
-
- beforeInitialization();
- componentsTree();
- beforeBinding();
- initDataBinding();
- inTheEnd();
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- ui creation methods ----------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- /**
- * button creation
- */
- private void createButton() {
- button = new javax.swing.JToggleButton();
- button.setText("Push me");
- button.setSelected(true);
- button.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent actionEvent){
- System.out.println("test");
- }
- });
- }
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Impl.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Impl.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo2Impl.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,20 +0,0 @@
-package org.nuiton.guix;
-
-import javax.swing.JToggleButton;
-
-/**
- * test javadoc Application
- */
-public class GuixDemo2Impl extends GuixDemo2Abstract {
- /*---------------------------------------------------------------------------------*/
- /*-- Constructors -----------------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- /**
- * Constructor
- */
- public GuixDemo2Impl() {
- super();
- }
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,39 +0,0 @@
-package org.nuiton.guix;
-
-/**
- * test javadoc Application
- */
-public interface GuixDemo3 {
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void beforeBinding();
-
- public void beforeCreation();
-
- public void beforeInitialization();
-
- /**
- * Components creation
- */
- public void componentsCreation();
-
- /**
- * components layout
- */
- public void componentsTree();
-
- public void inTheEnd();
-
- /**
- * initilization of databinding
- */
- public void initDataBinding();
-
- /**
- * initialization
- */
- public void initialize();
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Abstract.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Abstract.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Abstract.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,131 +0,0 @@
-package org.nuiton.guix;
-
-/**
- * test javadoc Application
- */
-public abstract class GuixDemo3Abstract extends javax.swing.JButton implements GuixDemo3 {
- /**
- * List of the active bindings
- */
- private java.util.List<String> activeBindings = new java.util.ArrayList<String>();
- /**
- * test javadoc Application
- */
- private org.nuiton.guix.GuixDemo3Abstract guixdemo3 = this;
-
- /*---------------------------------------------------------------------------------*/
- /*-- Constructors -----------------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- /**
- * Constructor
- */
- public GuixDemo3Abstract() {
- initialize();
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- JAXXObject implementation ----------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void applyDataBinding(String _binding) {
- processDataBinding(_binding);
- }
-
- public void firePropertyChange(String name, Object oldValue, Object newValue) {
- super.firePropertyChange(name, oldValue, newValue);
- }
-
- public void processDataBinding(String _binding) {
- if (activeBindings.contains(_binding)) {
- return;
- }
- activeBindings.add(_binding);
- try{
-
- } finally {
- activeBindings.remove(_binding);
- }
- }
-
- public void removeDataBinding(String _binding) {
-
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- public acessor methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public java.util.List<String> getActiveBindings() {
- return activeBindings;
- }
-
- public org.nuiton.guix.GuixDemo3Abstract getGuixdemo3() {
- return guixdemo3;
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void setGuixdemo3(org.nuiton.guix.GuixDemo3Abstract newValue) {
- this.guixdemo3 = newValue;
- }
-
- /*---------------------------------------------------------------------------------*/
- /*-- public mutator methods -------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public void beforeBinding() {
-
- }
-
- public void beforeCreation() {
-
- }
-
- public void beforeInitialization() {
-
- }
-
- /**
- * Components creation
- */
- public void componentsCreation() {
-
- }
-
- /**
- * components layout
- */
- public void componentsTree() {
- this.setText("GuixDemo3");
- this.setLayout(new java.awt.FlowLayout());
- }
-
- public void inTheEnd() {
-
- }
-
- /**
- * initilization of databinding
- */
- public void initDataBinding() {
-
- }
-
- /**
- * initialization
- */
- public void initialize() {
- beforeCreation();
- componentsCreation();
-
- beforeInitialization();
- componentsTree();
- beforeBinding();
- initDataBinding();
- inTheEnd();
- }
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Impl.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Impl.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemo3Impl.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,18 +0,0 @@
-package org.nuiton.guix;
-
-/**
- * test javadoc Application
- */
-public class GuixDemo3Impl extends GuixDemo3Abstract {
- /*---------------------------------------------------------------------------------*/
- /*-- Constructors -----------------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- /**
- * Constructor
- */
- public GuixDemo3Impl() {
- super();
- }
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoImpl.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoImpl.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoImpl.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,31 +0,0 @@
-package org.nuiton.guix;
-
-import java.util.ArrayList;
-import javax.swing.JMenuBar;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
-import javax.swing.JToolBar;
-import javax.swing.JButton;
-import javax.swing.JTabbedPane;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.JLabel;
-import org.nuiton.guix.GuixDemo3Abstract;
-import org.nuiton.guix.GuixDemo2Abstract;
-
-/**
- * test javadoc Application
- */
-public class GuixDemoImpl extends GuixDemoAbstract {
- /*---------------------------------------------------------------------------------*/
- /*-- Constructors -----------------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- /**
- * Constructor
- */
- public GuixDemoImpl() {
- super();
- }
-
- }
\ No newline at end of file
Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/Main.java
===================================================================
--- trunk/guix-test-swing/src/main/java/org/nuiton/guix/Main.java 2009-07-23 11:51:26 UTC (rev 1517)
+++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/Main.java 2009-07-23 11:51:40 UTC (rev 1518)
@@ -1,19 +0,0 @@
-package org.nuiton.guix;
-
-import java.io.File;
-import org.springframework.beans.factory.ListableBeanFactory;
-import org.springframework.beans.factory.xml.XmlBeanFactory;
-import org.springframework.core.io.FileSystemResource;
-
-public class Main {
- /*---------------------------------------------------------------------------------*/
- /*-- Statics methods --------------------------------------------------------------*/
- /*---------------------------------------------------------------------------------*/
-
- public static void main(String[] args) {
- javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() {GuixDemoImpl main = new GuixDemoImpl();
- main.pack();
- main.setVisible(true);}});
- }
-
- }
\ No newline at end of file
1
0