Nuiton-utils-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 2008
- 3 participants
- 152 discussions
[Lutinutil-commits] r896 - trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions
by tchemit@users.labs.libre-entreprise.org 24 Jul '08
by tchemit@users.labs.libre-entreprise.org 24 Jul '08
24 Jul '08
Author: tchemit
Date: 2008-07-24 20:47:24 +0000 (Thu, 24 Jul 2008)
New Revision: 896
Added:
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/CommandLineAction.java
Removed:
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java
Log:
update from jaxx-swing-action framework
Copied: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/CommandLineAction.java (from rev 891, trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java)
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/CommandLineAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/CommandLineAction.java 2008-07-24 20:47:24 UTC (rev 896)
@@ -0,0 +1,112 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+import jaxx.runtime.JAXXObject;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.commandline.demo.MyContext;
+import org.codelutin.commandline.demo.MyMain;
+
+import javax.swing.AbstractAction;
+import javax.swing.JComponent;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public abstract class CommandLineAction extends AbstractAction {
+
+ static org.apache.commons.logging.Log log = LogFactory.getLog(CommandLineAction.class);
+
+ private static final long serialVersionUID = -810023044364620841L;
+
+ protected ActionEvent e;
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+
+ log.debug("------------------------------------------------------------");
+ log.debug("event : " + e);
+ log.debug("source : " + e.getSource());
+ this.e = e;
+ try {
+ boolean accepted = beforeAction(e);
+ log.debug("action : " + this);
+ if (accepted) {
+ log.info(getActionName() + " (treate:" + accepted + ") : " + this);
+ } else {
+ log.debug(getActionName() + " (treate:" + accepted + ") : " + this);
+ }
+ if (accepted) {
+ doAction(e);
+ updateUI();
+ }
+ } catch (Exception e1) {
+ showError(e1);
+ } finally {
+ this.e = null;
+ // always clear action after use : actions are staless
+ clear();
+ }
+ }
+
+ protected String getActionName() {
+ return (String) getValue(ACTION_COMMAND_KEY);
+ }
+
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+ return isEnabled();
+ }
+
+ protected JComponent getUIObject(String name, JAXXObject container) {
+ if (container == null) {
+ return null;
+ }
+ return (JComponent) container.getObjectById(name);
+ }
+
+ public String getI18nToolTipText() {
+ return "commandlinedemo.action." + getActionName() + ".tooltip";
+ }
+
+ protected void doAction(ActionEvent e) throws Exception {
+ // nothing by default
+ }
+
+ public void updateUI() {
+ // nothing by default
+ }
+
+ public void disposeUI() {
+ // nothing by default
+ }
+
+ protected void clear() {
+ // nothing by default
+ }
+
+
+ protected void showError(Exception e) {
+ log.error(e);
+ }
+
+ protected CommandLineAction(String name) {
+ super(name);
+ log.debug("> " + this);
+ }
+
+ protected MyContext getContext() {
+ return MyMain.getContext();
+ }
+
+
+}
Deleted: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java 2008-07-23 17:55:56 UTC (rev 895)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java 2008-07-24 20:47:24 UTC (rev 896)
@@ -1,112 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * 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 Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.commandline.demo.ui.actions;
-
-import jaxx.runtime.JAXXObject;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.commandline.demo.MyContext;
-import org.codelutin.commandline.demo.MyMain;
-
-import javax.swing.AbstractAction;
-import javax.swing.JComponent;
-import java.awt.event.ActionEvent;
-
-/** @author chemit */
-public abstract class MyAbstractAction extends AbstractAction {
-
- static org.apache.commons.logging.Log log = LogFactory.getLog(MyAbstractAction.class);
-
- private static final long serialVersionUID = -810023044364620841L;
-
- protected ActionEvent e;
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
-
- log.debug("------------------------------------------------------------");
- log.debug("event : " + e);
- log.debug("source : " + e.getSource());
- this.e = e;
- try {
- boolean accepted = beforeAction(e);
- log.debug("action : " + this);
- if (accepted) {
- log.info(getActionName() + " (treate:" + accepted + ") : " + this);
- } else {
- log.debug(getActionName() + " (treate:" + accepted + ") : " + this);
- }
- if (accepted) {
- doAction(e);
- updateUI();
- }
- } catch (Exception e1) {
- showError(e1);
- } finally {
- this.e = null;
- // always clear action after use : actions are staless
- clear();
- }
- }
-
- protected String getActionName() {
- return (String) getValue(ACTION_COMMAND_KEY);
- }
-
- protected boolean beforeAction(ActionEvent e) throws Exception {
- return isEnabled();
- }
-
- protected JComponent getUIObject(String name, JAXXObject container) {
- if (container == null) {
- return null;
- }
- return (JComponent) container.getObjectById(name);
- }
-
- public String getI18nToolTipText() {
- return "commandlinedemo.action." + getActionName() + ".tooltip";
- }
-
- protected void doAction(ActionEvent e) throws Exception {
- // nothing by default
- }
-
- public void updateUI() {
- // nothing by default
- }
-
- public void disposeUI() {
- // nothing by default
- }
-
- protected void clear() {
- // nothing by default
- }
-
-
- protected void showError(Exception e) {
- log.error(e);
- }
-
- protected MyAbstractAction(String name) {
- super(name);
- log.debug("> " + this);
- }
-
- protected MyContext getContext() {
- return MyMain.getContext();
- }
-
-
-}
1
0
[Lutinutil-commits] r895 - in trunk/commandline/commandline-demo/src/main: java/org/codelutin/commandline/demo/ui/actions resources/i18n
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
23 Jul '08
Author: tchemit
Date: 2008-07-23 17:55:56 +0000 (Wed, 23 Jul 2008)
New Revision: 895
Modified:
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java
trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties
trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties
Log:
i18n
Modified: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java 2008-07-23 17:55:56 UTC (rev 895)
@@ -21,9 +21,9 @@
*/
@org.codelutin.jaxx.action.ActionConfig(
actionCommand = "about",
- name = "lima.action.about",
- shortDescription = "lima.action.about.tooltip",
- longDescription = "lima.action.about.help",
+ name = "commandlinedemo.action.about",
+ shortDescription = "commandlinedemo.action.about.tooltip",
+ longDescription = "commandlinedemo.action.about.help",
smallIcon = "action/about.png",
mnemonic = 'a',
hideActionText = false
Modified: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java 2008-07-23 17:55:56 UTC (rev 895)
@@ -35,8 +35,8 @@
*/
@org.codelutin.jaxx.action.ActionConfig(
actionCommand = "changeLocale",
- shortDescription = "lima.action.changeLocale.tooltip",
- longDescription = "lima.action.changeLocale.help",
+ shortDescription = "commandlinedemo.action.changeLocale.tooltip",
+ longDescription = "commandlinedemo.action.changeLocale.help",
hideActionText = false,
multiNames = {"i18n_fr", "i18n_en"}
)
@@ -66,7 +66,7 @@
@Override
public String getI18nToolTipText() {
- return "lima.action.changeLocale.tooltip";
+ return "commandlinedemo.action.changeLocale.tooltip";
}
public String getIcon() {
@@ -78,7 +78,7 @@
return true;
//TODO Faut-il proposer une confirmation ?
//String s = _(locale.getLibelle());
- //int result = JOptionPane.showConfirmDialog(null, _("lima.confirm.changeLanguage", s), "changeLanguage", JOptionPane.YES_NO_OPTION);
+ //int result = JOptionPane.showConfirmDialog(null, _("commandlinedemo.confirm.changeLanguage", s), "changeLanguage", JOptionPane.YES_NO_OPTION);
//return result == JOptionPane.OK_OPTION;
}
Modified: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java 2008-07-23 17:55:56 UTC (rev 895)
@@ -24,9 +24,9 @@
*/
@org.codelutin.jaxx.action.ActionConfig(
actionCommand = "config",
- name = "lima.action.config",
- shortDescription = "lima.action.config.tooltip",
- longDescription = "lima.action.config.help",
+ name = "commandlinedemo.action.config",
+ shortDescription = "commandlinedemo.action.config.tooltip",
+ longDescription = "commandlinedemo.action.config.help",
smallIcon = "action/config.png",
mnemonic = 'P',
hideActionText = false
Modified: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java 2008-07-23 17:55:56 UTC (rev 895)
@@ -21,9 +21,9 @@
*/
@org.codelutin.jaxx.action.ActionConfig(
actionCommand = "help",
- name = "lima.action.help",
- shortDescription = "lima.action.help.tooltip",
- longDescription = "lima.action.help.help",
+ name = "commandlinedemo.action.help",
+ shortDescription = "commandlinedemo.action.help.tooltip",
+ longDescription = "commandlinedemo.action.help.help",
smallIcon = "action/help.png",
mnemonic = 'h',
hideActionText = false
Modified: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java 2008-07-23 17:55:56 UTC (rev 895)
@@ -28,9 +28,9 @@
*/
@org.codelutin.jaxx.action.ActionConfig(
actionCommand = "quit",
- name = "lima.action.quit",
- shortDescription = "lima.action.quit.tooltip",
- longDescription = "lima.action.quit.help",
+ name = "commandlinedemo.action.quit",
+ shortDescription = "commandlinedemo.action.quit.tooltip",
+ longDescription = "commandlinedemo.action.quit.help",
smallIcon = "action/quit.png",
mnemonic = 'q',
hideActionText = false
@@ -48,10 +48,10 @@
boolean result = super.beforeAction(e);
if (result) {
- String[] response = {_("lima.yes"), _("lima.no")};
+ String[] response = {_("commandlinedemo.yes"), _("commandlinedemo.no")};
int n = JOptionPane.showOptionDialog(null,
- _("lima.close_question"),
- _("lima.question"),
+ _("commandlinedemo.close_question"),
+ _("commandlinedemo.question"),
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, //do not use a custom Icon
Modified: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java 2008-07-23 17:55:56 UTC (rev 895)
@@ -26,9 +26,9 @@
*/
@org.codelutin.jaxx.action.ActionConfig(
actionCommand = "site",
- name = "lima.action.site",
- shortDescription = "lima.action.site.tooltip",
- longDescription = "lima.action.site.help",
+ name = "commandlinedemo.action.site",
+ shortDescription = "commandlinedemo.action.site.tooltip",
+ longDescription = "commandlinedemo.action.site.help",
smallIcon = "action/site.png",
mnemonic = 's',
hideActionText = false
Modified: trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties 2008-07-23 17:55:56 UTC (rev 895)
@@ -1,3 +1,21 @@
+commandlinedemo.action.about=About
+commandlinedemo.action.about.help=
+commandlinedemo.action.about.tooltip=
+commandlinedemo.action.changeLocale.help=
+commandlinedemo.action.changeLocale.tooltip=
+commandlinedemo.action.config=Preferences
+commandlinedemo.action.config.help=
+commandlinedemo.action.config.tooltip=
+commandlinedemo.action.help=Help
+commandlinedemo.action.help.help=
+commandlinedemo.action.help.tooltip=
+commandlinedemo.action.quit=Quite
+commandlinedemo.action.quit.help=
+commandlinedemo.action.quit.tooltip=
+commandlinedemo.action.site=Site
+commandlinedemo.action.site.help=
+commandlinedemo.action.site.tooltip=
+commandlinedemo.close_question=Really quit ?
commandlinedemo.config.main.configFileName.description=
commandlinedemo.config.main.debugMode.description=
commandlinedemo.config.main.description=
@@ -16,6 +34,8 @@
commandlinedemo.config.remote.proxyLogin.description=
commandlinedemo.config.remote.proxyPassword.description=
commandlinedemo.config.remote.useProxy.description=
+commandlinedemo.confirm.changeLanguage=
+commandlinedemo.no=No
commandlinedemo.option.description.changeConfig=
commandlinedemo.option.description.changeFileConfig=
commandlinedemo.option.description.editConfig=
@@ -24,30 +44,10 @@
commandlinedemo.option.description.resetConfig=
commandlinedemo.option.description.showConfig=
commandlinedemo.option.description.ui=
-lima.action.about=
-lima.action.about.help=
-lima.action.about.tooltip=
-lima.action.changeLocale.help=
-lima.action.changeLocale.tooltip=
-lima.action.config=
-lima.action.config.help=
-lima.action.config.tooltip=
-lima.action.help=
-lima.action.help.help=
-lima.action.help.tooltip=
-lima.action.quit=
-lima.action.quit.help=
-lima.action.quit.tooltip=
-lima.action.site=
-lima.action.site.help=
-lima.action.site.tooltip=
-lima.close_question=
-lima.confirm.changeLanguage=
-lima.no=
-lima.question=
-lima.yes=
-mainui.menu.edit=
-mainui.menu.file=
-mainui.menu.help=
-mainui.menu.help.i18n=
-mainui.title=
+commandlinedemo.question=Quit
+commandlinedemo.yes=Yes
+mainui.menu.edit=Edit
+mainui.menu.file=File
+mainui.menu.help=Help
+mainui.menu.help.i18n=Language
+mainui.title=Commandline demo
Modified: trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties 2008-07-23 16:16:51 UTC (rev 894)
+++ trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties 2008-07-23 17:55:56 UTC (rev 895)
@@ -1,3 +1,21 @@
+commandlinedemo.action.about=A propos
+commandlinedemo.action.about.help=
+commandlinedemo.action.about.tooltip=
+commandlinedemo.action.changeLocale.help=
+commandlinedemo.action.changeLocale.tooltip=
+commandlinedemo.action.config=Pr\u00E9f\u00E9rences
+commandlinedemo.action.config.help=
+commandlinedemo.action.config.tooltip=
+commandlinedemo.action.help=Aide
+commandlinedemo.action.help.help=
+commandlinedemo.action.help.tooltip=
+commandlinedemo.action.quit=Quitter
+commandlinedemo.action.quit.help=
+commandlinedemo.action.quit.tooltip=
+commandlinedemo.action.site=Site
+commandlinedemo.action.site.help=
+commandlinedemo.action.site.tooltip=
+commandlinedemo.close_question=Voulez-vous quitter ?
commandlinedemo.config.main.configFileName.description=
commandlinedemo.config.main.debugMode.description=
commandlinedemo.config.main.description=
@@ -16,6 +34,8 @@
commandlinedemo.config.remote.proxyLogin.description=
commandlinedemo.config.remote.proxyPassword.description=
commandlinedemo.config.remote.useProxy.description=
+commandlinedemo.confirm.changeLanguage=
+commandlinedemo.no=Non
commandlinedemo.option.description.changeConfig=
commandlinedemo.option.description.changeFileConfig=
commandlinedemo.option.description.editConfig=
@@ -24,30 +44,10 @@
commandlinedemo.option.description.resetConfig=
commandlinedemo.option.description.showConfig=
commandlinedemo.option.description.ui=
-lima.action.about=
-lima.action.about.help=
-lima.action.about.tooltip=
-lima.action.changeLocale.help=
-lima.action.changeLocale.tooltip=
-lima.action.config=
-lima.action.config.help=
-lima.action.config.tooltip=
-lima.action.help=
-lima.action.help.help=
-lima.action.help.tooltip=
-lima.action.quit=
-lima.action.quit.help=
-lima.action.quit.tooltip=
-lima.action.site=
-lima.action.site.help=
-lima.action.site.tooltip=
-lima.close_question=
-lima.confirm.changeLanguage=
-lima.no=
-lima.question=
-lima.yes=
-mainui.menu.edit=
-mainui.menu.file=
-mainui.menu.help=
-mainui.menu.help.i18n=
-mainui.title=
+commandlinedemo.question=Quitter
+commandlinedemo.yes=Oui
+mainui.menu.edit=Edit
+mainui.menu.file=Fichier
+mainui.menu.help=Aide
+mainui.menu.help.i18n=Langue
+mainui.title=Commandline D\u00E9mo
1
0
[Lutinutil-commits] r894 - trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
23 Jul '08
Author: tchemit
Date: 2008-07-23 16:16:51 +0000 (Wed, 23 Jul 2008)
New Revision: 894
Modified:
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java
Log:
no launch if no ui
Modified: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java 2008-07-23 15:53:12 UTC (rev 893)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java 2008-07-23 16:16:51 UTC (rev 894)
@@ -91,7 +91,7 @@
//TODO should we stop ?
}
- if (getContext().isQuit()) {
+ if (getContext().isQuit() || !getContext().isUseUI()) {
// nothing more to be done here
return;
}
1
0
23 Jul '08
Author: tchemit
Date: 2008-07-23 15:53:12 +0000 (Wed, 23 Jul 2008)
New Revision: 893
Modified:
trunk/commandline/pom.xml
Log:
put back javadoc phase
Modified: trunk/commandline/pom.xml
===================================================================
--- trunk/commandline/pom.xml 2008-07-23 15:52:17 UTC (rev 892)
+++ trunk/commandline/pom.xml 2008-07-23 15:53:12 UTC (rev 893)
@@ -95,7 +95,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
- <phase>deploy</phase>
+ <phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
1
0
23 Jul '08
Author: tchemit
Date: 2008-07-23 15:52:17 +0000 (Wed, 23 Jul 2008)
New Revision: 892
Modified:
trunk/commandline/pom.xml
Log:
jaxx-swing is directly add in jaxx-plugin
Modified: trunk/commandline/pom.xml
===================================================================
--- trunk/commandline/pom.xml 2008-07-23 15:34:33 UTC (rev 891)
+++ trunk/commandline/pom.xml 2008-07-23 15:52:17 UTC (rev 892)
@@ -139,11 +139,6 @@
<artifactId>maven-jaxx-plugin</artifactId>
<dependencies>
<dependency>
- <groupId>org.codelutin.jaxx</groupId>
- <artifactId>swing-jaxx</artifactId>
- <version>${jaxx.version}</version>
- </dependency>
- <dependency>
<groupId>lutinlib</groupId>
<artifactId>lutinwidget</artifactId>
<version>0.10-SNAPSHOT</version>
1
0
23 Jul '08
Author: tchemit
Date: 2008-07-23 15:34:33 +0000 (Wed, 23 Jul 2008)
New Revision: 891
Added:
trunk/commandline/commandline-demo/run-demo.sh
trunk/commandline/commandline-demo/src/main/java/org/
trunk/commandline/commandline-demo/src/main/java/org/codelutin/
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyContext.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyActionManager.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyMainUI.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java
trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java
trunk/commandline/commandline-demo/src/main/resources/log4j.properties
trunk/commandline/commandline-demo/src/main/uimodel/
trunk/commandline/commandline-demo/src/main/uimodel/org/
trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/
trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/commandline/
trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/commandline/demo/
trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/commandline/demo/ui/
trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/commandline/demo/ui/JMainUI.jaxx
Modified:
trunk/commandline/commandline-demo/
trunk/commandline/commandline-demo/pom.xml
trunk/commandline/commandline-demo/src/main/resources/commandline.properties
trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties
trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties
trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst
trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst
Log:
commandline-demo with ui and jaxx-swing-action :)
Property changes on: trunk/commandline/commandline-demo
___________________________________________________________________
Name: svn:ignore
+ target
*.log
Modified: trunk/commandline/commandline-demo/pom.xml
===================================================================
--- trunk/commandline/commandline-demo/pom.xml 2008-07-23 15:33:57 UTC (rev 890)
+++ trunk/commandline/commandline-demo/pom.xml 2008-07-23 15:34:33 UTC (rev 891)
@@ -28,7 +28,16 @@
<groupId>org.codelutin.commandline</groupId>
<artifactId>commandline-ui</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.codelutin.jaxx</groupId>
+ <artifactId>jaxx-swing-action</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib</groupId>
+ <artifactId>lutinwidget</artifactId>
+ </dependency>
+
</dependencies>
@@ -46,6 +55,13 @@
<packaging>jar</packaging>
+ <properties>
+
+ <!--Main class in JAR -->
+ <maven.jar.main.class>org.codelutin.commandline.demo.MyMain</maven.jar.main.class>
+
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -53,10 +69,34 @@
<artifactId>maven-i18n-plugin</artifactId>
<executions>
<execution>
+ <id>javaActionConfig</id>
<phase>compile</phase>
- <configuration>
+ <goals>
+ <goal>parserJavaActionConfig</goal>
+ </goals>
+ <configuration>
+ <treateDefaultEntry>false</treateDefaultEntry>
<entries>
<entry>
+ <basedir>${maven.src.dir}/main/java</basedir>
+ <includes>
+ <param>org\/codelutin\/commandline\/demo\/ui\/actions\/**\/*Action.java</param>
+ </includes>
+ <excludes>
+ <param>
+ org\/codelutin\/commandline\/demo\/ui\/actions\/**\/*AbstractAction.java
+ </param>
+ </excludes>
+ </entry>
+ </entries>
+ </configuration>
+ </execution>
+ <execution>
+ <id>java</id>
+ <phase>compile</phase>
+ <configuration>
+ <entries>
+ <entry>
<basedir>${maven.gen.dir}/java</basedir>
</entry>
</entries>
@@ -108,6 +148,89 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.codelutin.jaxx</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <copyToCP>true</copyToCP>
+ <actionsFile>/jaxx/commandlinedemo-actions.properties</actionsFile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate jaxx</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>jaxx-generate-actions-provider</id>
+ <goals>
+ <goal>generate-actions-provider</goal>
+ </goals>
+ <configuration>
+ <fqn>org.codelutin.commandline.demo.ui.MyActionProvider</fqn>
+ <fqnAction>org.codelutin.commandline.demo.ui.actions.MyAbstractAction</fqnAction>
+ <providerName>commandlinedemo</providerName>
+ </configuration>
+ </execution>
+ <execution>
+ <id>jaxx-generate-actions</id>
+ <goals>
+ <goal>generate-actions-properties</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <param>
+ org\/codelutin\/commandline\/demo\/ui\/actions\/**\/*Action.java
+ </param>
+ </includes>
+ <excludes>
+ <param>
+ org\/codelutin\/commandline\/demo\/ui\/actions\/**\/*AbstractAction.java
+ </param>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+
+ <!-- Package phase -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <addClasspath>true</addClasspath>
+ <addExtensions/>
+ <classpathPrefix>./dependency/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
Added: trunk/commandline/commandline-demo/run-demo.sh
===================================================================
--- trunk/commandline/commandline-demo/run-demo.sh (rev 0)
+++ trunk/commandline/commandline-demo/run-demo.sh 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+DEBUG_PORT=5005
+VERSION=$(xmlstarlet sel -N "p=http://maven.apache.org/POM/4.0.0" -t -v "/p:project/p:version" pom.xml)
+JAVA=java
+RELEASE="commandline-demo-$VERSION"
+MX=128M
+
+###############################################################################
+####### parse arguments #######################################################
+###############################################################################
+
+while true; do
+ case "$1" in
+ -d|--debug)
+ echo "Debug mode"
+ DEBUG="-server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$DEBUG_PORT"
+ shift ;;
+ -n|--nosuspend)
+ echo "Debug no suspend mode"
+ DEBUG="$DEBUG,suspend=n"
+ shift ;;
+ \-\-) shift ; break ;;
+ *) break;
+ esac
+done
+
+###############################################################################
+####### init dir ##############################################################
+###############################################################################
+
+dir=$(dirname $0)
+cd $dir
+
+###############################################################################
+####### launch appli ##########################################################
+###############################################################################
+echo "java $RELEASE $@"
+$JAVA $DEBUG -Xmx$MX -Xms$MX -jar target/$RELEASE.jar $@
\ No newline at end of file
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyContext.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyContext.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyContext.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,48 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo;
+
+import org.codelutin.commandline.demo.ui.JMainUI;
+import org.codelutin.commandline.demo.ui.MyMainUI;
+import org.codelutin.i18n.I18n;
+
+/** @author chemit */
+public class MyContext extends CommandLineDemoAbstractContext {
+
+ /** main UI */
+ protected JMainUI mainUI;
+
+ public MyContext() throws Exception {
+ super();
+ }
+
+ public void initI18n() {
+ I18n.init(getMainConfig().getLocale(), getMainConfig().getEncoding());
+ }
+
+ public JMainUI getMainUI() {
+ if (mainUI == null) {
+ mainUI = new MyMainUI();
+ }
+ return mainUI;
+ }
+
+ public void disposeUI() {
+ if (mainUI != null) {
+ mainUI.dispose();
+ mainUI = null;
+ }
+ }
+}
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/MyMain.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,122 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.commandline.demo.ui.MyActionManager;
+import org.codelutin.option.OptionParserResult;
+import org.codelutin.option.ParserFailedException;
+
+import java.io.IOException;
+
+/** @author chemit */
+public class MyMain {
+
+ private static final Log log = LogFactory.getLog(MyMain.class);
+
+ /** le context principal de l'application */
+ protected static MyContext context;
+
+ public static MyContext getContext() {
+ checkInitContext();
+ return context;
+ }
+
+ /**
+ * initialisation de l'application :
+ * <p/>
+ * chargement du context
+ *
+ * @param args les arguments pass�s � l'application
+ */
+ public static synchronized void init(String... args) {
+
+ try {
+ // instanciate context, parser and configs
+ context = new MyContext();
+
+ // init context
+ context.init(args);
+
+ } catch (IOException e) {
+ log.error("io error : " + e.getMessage());
+ e.printStackTrace();
+ System.exit(1);
+
+ } catch (ParserFailedException e) {
+ log.error("parser error : " + e.getMessage());
+ e.printStackTrace();
+ System.exit(1);
+ } catch (Exception e) {
+ log.error("fatal error : " + e.getMessage());
+ e.printStackTrace();
+ System.exit(1);
+ }
+
+ }
+
+ /** Lancement de l'ui apr�s init de l'application. */
+ public static void launch() {
+
+ getContext().getMainUI().setVisible(true);
+
+ }
+
+
+ /** @param args les arguments pass�s au programme */
+ public static void main(String[] args) {
+
+ init(args);
+
+ try {
+ OptionParserResult optionParserResult = getContext().getParser().getLastResult();
+ if (optionParserResult.size() > 0) {
+ optionParserResult.doAllActions(getContext());
+ }
+ } catch (Exception e) {
+ log.error("a problem occurs while treating commandline : " + e.getMessage(), e);
+ //TODO should we stop ?
+ }
+
+ if (getContext().isQuit()) {
+ // nothing more to be done here
+ return;
+ }
+
+ launch();
+
+ }
+
+ public static void checkInitContext() {
+ if (context == null) {
+ throw new RuntimeException("context is null, you must init first the " + MyContext.class.getName() + " class via init method");
+ }
+ }
+
+ public static void dispose(boolean reload) {
+
+ MyActionManager.dispose();
+
+ getContext().disposeUI();
+
+ //ErrorDialog.disposeUI();
+
+ if (reload) {
+ launch();
+ }
+ }
+
+}
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyActionManager.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyActionManager.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyActionManager.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,116 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.jaxx.action.ActionFactoryFromProvider;
+import org.codelutin.jaxx.action.ActionFactory;
+import org.codelutin.commandline.demo.ui.actions.MyAbstractAction;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractButton;
+import javax.swing.JComboBox;
+
+import jaxx.runtime.JAXXObject;
+
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class MyActionManager {
+
+ private static final Log log = LogFactory.getLog(MyActionManager.class);
+
+ /** l'usine d'actions */
+ private static ActionFactory factory;
+
+ /**
+ * @param ui l'ui � charger
+ * @return le tableau des actions instanci�es ou r�cup�r�es du cache de
+ * la factory
+ */
+ public static AbstractAction[] loadActions(JAXXObject ui) {
+ AbstractAction[] actions;
+ actions = getFactory().loadActions(ui);
+ return actions;
+
+ }
+
+ /**
+ * Retourne (et instancie la premi�re fois l'usine d'actions)
+ *
+ * @return l'usine d'actions
+ * @see org.codelutin.jaxx.action.ActionFactory
+ */
+ public static ActionFactory getFactory() {
+ if (factory == null) {
+ // used a simple factory implementation
+ factory = new ActionFactoryFromProvider();
+ }
+ return factory;
+ }
+
+ public static void fireAction(String actionKey, Object source) {
+ fireAction(actionKey, source, (AbstractButton) null);
+ }
+
+
+ public static AbstractAction newAction(String actionKey) {
+ return newAction(actionKey, (AbstractButton) null);
+ }
+
+ public static void resetCache() {
+ getFactory().resetCache();
+ }
+
+ public static void dispose() {
+ resetCache();
+ for (String actionKey : getFactory().getActionNames()) {
+ MyAbstractAction action = (MyAbstractAction) newAction(actionKey);
+ if (action != null) {
+ action.disposeUI();
+ }
+ }
+ }
+
+
+ public static void fireAction(String actionKey, Object source, AbstractButton component) {
+ AbstractAction action = newAction(actionKey, component);
+ fireAction0(actionKey, source, action);
+ }
+
+ public static void fireAction(String actionKey, Object source, JComboBox component) {
+ AbstractAction action = newAction(actionKey, component);
+ fireAction0(actionKey, source, action);
+ }
+
+ protected static AbstractAction newAction(String actionKey, AbstractButton component) {
+ return getFactory().newAction(actionKey, component);
+ }
+
+ protected static AbstractAction newAction(String actionKey, JComboBox component) {
+ return getFactory().newAction(actionKey, component);
+ }
+
+ protected static void fireAction0(String actionKey, Object source, AbstractAction action) {
+ if (action == null) {
+ log.warn("could not find action " + actionKey);
+ return;
+ }
+ ActionEvent event = new ActionEvent(source, ActionEvent.ACTION_FIRST, actionKey);
+ action.actionPerformed(event);
+ }
+
+}
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyMainUI.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyMainUI.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/MyMainUI.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,107 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.commandline.demo.MyContext;
+import org.codelutin.commandline.demo.MyMain;
+import org.codelutin.commandline.demo.ui.actions.ChangeLocaleAction;
+import org.codelutin.commandline.demo.ui.actions.MyAbstractAction;
+import static org.codelutin.i18n.I18n._;
+
+import javax.swing.AbstractButton;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.util.Locale;
+import java.util.regex.Matcher;
+
+/** @author chemit */
+public class MyMainUI extends JMainUI {
+
+ /** log */
+ private static final Log log = LogFactory.getLog(MyMainUI.class);
+
+ public MyMainUI() {
+ super();
+
+ MyMain.checkInitContext();
+
+ finalizeInit(MyMain.getContext());
+
+ }
+
+ protected void finalizeInit(MyContext context) {
+
+ // chargement dans l'ui des actions
+ MyActionManager.loadActions(this);
+
+ getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, InputEvent.ALT_MASK), "quit");
+ getRootPane().getActionMap().put("quit", MyActionManager.newAction("quit"));
+
+ // repaint i18n actions
+ refreshI18nActions(context);
+
+ }
+
+ /**
+ * Rafraichit les actions i18n dans le menu en fonction de la locale
+ * actuellement utilis�e.
+ *
+ * @param context application context
+ */
+ public void refreshI18nActions(MyContext context) {
+
+ Locale locale = context.getMainConfig().getLocale();
+ //CountryEnum country = context.getConfig().getUserCountry();
+ String[] actions = MyActionManager.getFactory().getActionNames();
+ for (String actionName : actions) {
+ Matcher matcher = ChangeLocaleAction.PATTERN_NAME.matcher(actionName);
+ if (!matcher.matches()) {
+ continue;
+ }
+ AbstractButton button = (AbstractButton) getObjectById(actionName);
+ ChangeLocaleAction action = (ChangeLocaleAction) button.getAction();
+ boolean enable = !action.equalsLocale(locale);
+ log.debug("incoming locale : " + locale);
+ log.debug("load i18n action " + action + " is enable ? " + enable);
+ UpdateButton(button, enable, enable ? action.getLocale() : null);
+ button.setEnabled(enable);
+ }
+ }
+
+ public static void DisableButton(AbstractButton... buttons) {
+ for (AbstractButton button : buttons) {
+ UpdateButton(button, false);
+ }
+ }
+
+ public static void EnableButton(AbstractButton button, Object... params) {
+ UpdateButton(button, true, params);
+ }
+
+ public static void UpdateButton(AbstractButton button, boolean enabled, Object... params) {
+ button.setEnabled(enabled);
+ if (!enabled) {
+ button.setToolTipText(null);
+ } else {
+ MyAbstractAction action = (MyAbstractAction) button.getAction();
+ String t = _(action.getI18nToolTipText(), params);
+ button.setToolTipText(t);
+ }
+ }
+}
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/AboutAction.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,49 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+/**
+ * Action pour afficher la dialogue de modification de configuration
+ *
+ * @author Code Lutin, Chemit Tony
+ */
+(a)org.codelutin.jaxx.action.ActionConfig(
+ actionCommand = "about",
+ name = "lima.action.about",
+ shortDescription = "lima.action.about.tooltip",
+ longDescription = "lima.action.about.help",
+ smallIcon = "action/about.png",
+ mnemonic = 'a',
+ hideActionText = false
+)
+public class AboutAction extends MyAbstractAction {
+ private static final long serialVersionUID = 9050439968144935986L;
+
+
+ public AboutAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void doAction(java.awt.event.ActionEvent e) {
+ log.info("To be done!");
+ }
+
+ @Override
+ public void disposeUI() {
+ super.disposeUI();
+ }
+
+}
\ No newline at end of file
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ChangeLocaleAction.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,111 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+/** @author chemit */
+
+import org.codelutin.commandline.demo.MyMain;
+import static org.codelutin.i18n.I18n._;
+
+import javax.swing.Action;
+import java.awt.event.ActionEvent;
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Une action pour recharger la locale.
+ * <p/>
+ * Le nom de l'action doit etre de la forme i18n_XX_YY o� XX est la langue
+ * et YY le pays de la locale � charger.
+ *
+ * @author Code Lutin, Chemit Tony
+ */
+(a)org.codelutin.jaxx.action.ActionConfig(
+ actionCommand = "changeLocale",
+ shortDescription = "lima.action.changeLocale.tooltip",
+ longDescription = "lima.action.changeLocale.help",
+ hideActionText = false,
+ multiNames = {"i18n_fr", "i18n_en"}
+)
+(a)org.codelutin.i18n.I18nable
+public class ChangeLocaleAction extends MyAbstractAction {
+
+ public static final Pattern PATTERN_NAME = Pattern.compile("i18n_(\\w\\w)");
+
+ protected Locale locale;
+
+ private static final long serialVersionUID = 4180668477670765253L;
+
+ public ChangeLocaleAction(String name) {
+ super(name);
+ Matcher matcher = PATTERN_NAME.matcher(name);
+ if (!matcher.matches()) {
+ throw new IllegalArgumentException(_(getClass().getName() + " should have a name like this 'i18n_XX', but was {0}", name));
+ }
+
+ locale = org.codelutin.i18n.I18n.newLocale(matcher.group(1));
+
+ //putValue(Action.NAME, _(locale.getLibelle()));
+ //TODO Make it works again :)
+ putValue(Action.NAME, _(locale.getDisplayLanguage()));
+ putValue(Action.SMALL_ICON, org.codelutin.jaxx.util.UIHelper.createImageIcon(getIcon()));
+ }
+
+ @Override
+ public String getI18nToolTipText() {
+ return "lima.action.changeLocale.tooltip";
+ }
+
+ public String getIcon() {
+ return "action/i18n-" + locale.getLanguage() + ".png";
+ }
+
+ @Override
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+ return true;
+ //TODO Faut-il proposer une confirmation ?
+ //String s = _(locale.getLibelle());
+ //int result = JOptionPane.showConfirmDialog(null, _("lima.confirm.changeLanguage", s), "changeLanguage", JOptionPane.YES_NO_OPTION);
+ //return result == JOptionPane.OK_OPTION;
+ }
+
+ @Override
+ public void doAction(ActionEvent e) {
+
+ getContext().getMainConfig().setLocale(locale);
+ // on doit initialiser la nouvelle locale avant de decharger les ui
+ // au cas ou un appel � une ui surviendrait et dans quel cas la locale
+ // serait toujours sur l'ancienne valeur ...
+ getContext().initI18n();
+ // save config
+ getContext().saveSafely();
+ // dispose then reload main ui
+ MyMain.dispose(true);
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + " Locale " + locale;
+ }
+
+ public boolean equalsLocale(Locale locale) {
+ return this.locale.equals(locale) || this.locale.getLanguage().equals(locale.getLanguage());
+ }
+
+ public Locale getLocale() {
+ return locale;
+ }
+}
\ No newline at end of file
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/ConfigAction.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,64 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+import org.codelutin.option.ui.ConfigUI;
+
+
+/**
+ * Action pour afficher la dialogue de modification de configuration
+ *
+ * @author Code Lutin, Chemit Tony
+ */
+(a)org.codelutin.jaxx.action.ActionConfig(
+ actionCommand = "config",
+ name = "lima.action.config",
+ shortDescription = "lima.action.config.tooltip",
+ longDescription = "lima.action.config.help",
+ smallIcon = "action/config.png",
+ mnemonic = 'P',
+ hideActionText = false
+)
+public class ConfigAction extends MyAbstractAction {
+
+ ConfigUI ui;
+
+ private static final long serialVersionUID = 1449553547444065616L;
+
+ public ConfigAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void doAction(java.awt.event.ActionEvent e) {
+ getUi().setVisible(true);
+ }
+
+ @Override
+ public void disposeUI() {
+ super.disposeUI();
+ if (ui != null) {
+ ui.dispose();
+ ui = null;
+ }
+ }
+
+ public ConfigUI getUi() {
+ if (ui == null) {
+ ui = new ConfigUI().init(getContext(), getContext().getMainConfig(), getContext().getRemoteConfig());
+ }
+ return ui;
+ }
+}
\ No newline at end of file
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/HelpAction.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,50 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+/**
+ * Action pour afficher la dialogue de modification de configuration
+ *
+ * @author Code Lutin, Chemit Tony
+ */
+(a)org.codelutin.jaxx.action.ActionConfig(
+ actionCommand = "help",
+ name = "lima.action.help",
+ shortDescription = "lima.action.help.tooltip",
+ longDescription = "lima.action.help.help",
+ smallIcon = "action/help.png",
+ mnemonic = 'h',
+ hideActionText = false
+)
+public class HelpAction extends MyAbstractAction {
+ private static final long serialVersionUID = 9050439968144935986L;
+
+
+ public HelpAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void doAction(java.awt.event.ActionEvent e) {
+ log.info("To be done!");
+ }
+
+ @Override
+ public void disposeUI() {
+ super.disposeUI();
+ }
+
+
+}
\ No newline at end of file
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/MyAbstractAction.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,112 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+import jaxx.runtime.JAXXObject;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.commandline.demo.MyContext;
+import org.codelutin.commandline.demo.MyMain;
+
+import javax.swing.AbstractAction;
+import javax.swing.JComponent;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public abstract class MyAbstractAction extends AbstractAction {
+
+ static org.apache.commons.logging.Log log = LogFactory.getLog(MyAbstractAction.class);
+
+ private static final long serialVersionUID = -810023044364620841L;
+
+ protected ActionEvent e;
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+
+ log.debug("------------------------------------------------------------");
+ log.debug("event : " + e);
+ log.debug("source : " + e.getSource());
+ this.e = e;
+ try {
+ boolean accepted = beforeAction(e);
+ log.debug("action : " + this);
+ if (accepted) {
+ log.info(getActionName() + " (treate:" + accepted + ") : " + this);
+ } else {
+ log.debug(getActionName() + " (treate:" + accepted + ") : " + this);
+ }
+ if (accepted) {
+ doAction(e);
+ updateUI();
+ }
+ } catch (Exception e1) {
+ showError(e1);
+ } finally {
+ this.e = null;
+ // always clear action after use : actions are staless
+ clear();
+ }
+ }
+
+ protected String getActionName() {
+ return (String) getValue(ACTION_COMMAND_KEY);
+ }
+
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+ return isEnabled();
+ }
+
+ protected JComponent getUIObject(String name, JAXXObject container) {
+ if (container == null) {
+ return null;
+ }
+ return (JComponent) container.getObjectById(name);
+ }
+
+ public String getI18nToolTipText() {
+ return "commandlinedemo.action." + getActionName() + ".tooltip";
+ }
+
+ protected void doAction(ActionEvent e) throws Exception {
+ // nothing by default
+ }
+
+ public void updateUI() {
+ // nothing by default
+ }
+
+ public void disposeUI() {
+ // nothing by default
+ }
+
+ protected void clear() {
+ // nothing by default
+ }
+
+
+ protected void showError(Exception e) {
+ log.error(e);
+ }
+
+ protected MyAbstractAction(String name) {
+ super(name);
+ log.debug("> " + this);
+ }
+
+ protected MyContext getContext() {
+ return MyMain.getContext();
+ }
+
+
+}
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/QuitAction.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,81 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+import static org.codelutin.i18n.I18n._;
+import org.codelutin.commandline.demo.MyMain;
+
+import javax.swing.JOptionPane;
+import java.awt.event.ActionEvent;
+
+
+/**
+ * Action pour afficher la dialogue de modification de configuration
+ *
+ * @author Code Lutin, Chemit Tony
+ */
+(a)org.codelutin.jaxx.action.ActionConfig(
+ actionCommand = "quit",
+ name = "lima.action.quit",
+ shortDescription = "lima.action.quit.tooltip",
+ longDescription = "lima.action.quit.help",
+ smallIcon = "action/quit.png",
+ mnemonic = 'q',
+ hideActionText = false
+)
+public class QuitAction extends MyAbstractAction {
+ private static final long serialVersionUID = 9050439968144935986L;
+
+
+ public QuitAction(String name) {
+ super(name);
+ }
+
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+
+ boolean result = super.beforeAction(e);
+
+ if (result) {
+ String[] response = {_("lima.yes"), _("lima.no")};
+ int n = JOptionPane.showOptionDialog(null,
+ _("lima.close_question"),
+ _("lima.question"),
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE,
+ null, //do not use a custom Icon
+ response, //the titles of buttons
+ response[1]); //default button title
+
+ result = n == JOptionPane.YES_OPTION;
+
+ }
+
+ return result;
+
+
+ }
+
+ @Override
+ public void doAction(java.awt.event.ActionEvent e) {
+ MyMain.dispose(false);
+ }
+
+ @Override
+ public void disposeUI() {
+ super.disposeUI();
+ }
+
+
+}
\ No newline at end of file
Added: trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java
===================================================================
--- trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java (rev 0)
+++ trunk/commandline/commandline-demo/src/main/java/org/codelutin/commandline/demo/ui/actions/SiteAction.java 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,59 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * 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 Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.commandline.demo.ui.actions;
+
+import java.awt.Desktop;
+import java.awt.event.ActionEvent;
+import java.net.URL;
+
+
+/**
+ * Action pour afficher la dialogue de modification de configuration
+ *
+ * @author Code Lutin, Chemit Tony
+ */
+(a)org.codelutin.jaxx.action.ActionConfig(
+ actionCommand = "site",
+ name = "lima.action.site",
+ shortDescription = "lima.action.site.tooltip",
+ longDescription = "lima.action.site.help",
+ smallIcon = "action/site.png",
+ mnemonic = 's',
+ hideActionText = false
+)
+public class SiteAction extends MyAbstractAction {
+ private static final long serialVersionUID = 9050439968144935986L;
+
+ protected URL siteUrl;
+
+ public SiteAction(String name) {
+ super(name);
+ }
+
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+ if (!super.beforeAction(e) && !Desktop.isDesktopSupported() && !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
+ return false;
+ }
+ siteUrl = getContext().getMainConfig().getSiteURL();
+ return siteUrl != null;
+ }
+
+ @Override
+ public void doAction(java.awt.event.ActionEvent e) throws Exception {
+ super.doAction(e);
+ Desktop.getDesktop().browse(siteUrl.toURI());
+ }
+
+}
\ No newline at end of file
Modified: trunk/commandline/commandline-demo/src/main/resources/commandline.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/commandline.properties 2008-07-23 15:33:57 UTC (rev 890)
+++ trunk/commandline/commandline-demo/src/main/resources/commandline.properties 2008-07-23 15:34:33 UTC (rev 891)
@@ -16,7 +16,7 @@
main.config.definition.debugMode=java.lang.Boolean:false
main.config.modifiers.debugMode=mandatory
-main.config.definition.siteURL=java.net.URL:http://lima.labs.libre-entreprise.org
+main.config.definition.siteURL=java.net.URL:http://commandline.labs.libre-entreprise.org
main.config.modifiers.siteURL=final,static,mandatory
###
Modified: trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties 2008-07-23 15:33:57 UTC (rev 890)
+++ trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties 2008-07-23 15:34:33 UTC (rev 891)
@@ -1,27 +1,53 @@
-#Wed Jul 23 13:41:57 CEST 2008
-commandlinedemo.config.main.configFileName.description=commandlinedemo.config.main.configFileName.description
-commandlinedemo.config.main.debugMode.description=commandlinedemo.config.main.debugMode.description
-commandlinedemo.config.main.description=commandlinedemo.config.main.description
-commandlinedemo.config.main.encoding.description=commandlinedemo.config.main.encoding.description
-commandlinedemo.config.main.locale.description=commandlinedemo.config.main.locale.description
-commandlinedemo.config.main.projectName.description=commandlinedemo.config.main.projectName.description
-commandlinedemo.config.main.siteURL.description=commandlinedemo.config.main.siteURL.description
-commandlinedemo.config.main.userFirstName.description=commandlinedemo.config.main.userFirstName.description
-commandlinedemo.config.main.userLastName.description=commandlinedemo.config.main.userLastName.description
-commandlinedemo.config.main.userMail.description=commandlinedemo.config.main.userMail.description
-commandlinedemo.config.main.version.description=commandlinedemo.config.main.version.description
-commandlinedemo.config.remote.URI.description=commandlinedemo.config.remote.URI.description
-commandlinedemo.config.remote.description=commandlinedemo.config.remote.description
-commandlinedemo.config.remote.login.description=commandlinedemo.config.remote.login.description
-commandlinedemo.config.remote.password.description=commandlinedemo.config.remote.password.description
-commandlinedemo.config.remote.proxyLogin.description=commandlinedemo.config.remote.proxyLogin.description
-commandlinedemo.config.remote.proxyPassword.description=commandlinedemo.config.remote.proxyPassword.description
-commandlinedemo.config.remote.useProxy.description=commandlinedemo.config.remote.useProxy.description
-commandlinedemo.option.description.changeConfig=commandlinedemo.option.description.changeConfig
-commandlinedemo.option.description.changeFileConfig=commandlinedemo.option.description.changeFileConfig
-commandlinedemo.option.description.editConfig=commandlinedemo.option.description.editConfig
-commandlinedemo.option.description.help=commandlinedemo.option.description.help
-commandlinedemo.option.description.helpConfig=commandlinedemo.option.description.helpConfig
-commandlinedemo.option.description.resetConfig=commandlinedemo.option.description.resetConfig
-commandlinedemo.option.description.showConfig=commandlinedemo.option.description.showConfig
-commandlinedemo.option.description.ui=commandlinedemo.option.description.ui
+commandlinedemo.config.main.configFileName.description=
+commandlinedemo.config.main.debugMode.description=
+commandlinedemo.config.main.description=
+commandlinedemo.config.main.encoding.description=
+commandlinedemo.config.main.locale.description=
+commandlinedemo.config.main.projectName.description=
+commandlinedemo.config.main.siteURL.description=
+commandlinedemo.config.main.userFirstName.description=
+commandlinedemo.config.main.userLastName.description=
+commandlinedemo.config.main.userMail.description=
+commandlinedemo.config.main.version.description=
+commandlinedemo.config.remote.URI.description=
+commandlinedemo.config.remote.description=
+commandlinedemo.config.remote.login.description=
+commandlinedemo.config.remote.password.description=
+commandlinedemo.config.remote.proxyLogin.description=
+commandlinedemo.config.remote.proxyPassword.description=
+commandlinedemo.config.remote.useProxy.description=
+commandlinedemo.option.description.changeConfig=
+commandlinedemo.option.description.changeFileConfig=
+commandlinedemo.option.description.editConfig=
+commandlinedemo.option.description.help=
+commandlinedemo.option.description.helpConfig=
+commandlinedemo.option.description.resetConfig=
+commandlinedemo.option.description.showConfig=
+commandlinedemo.option.description.ui=
+lima.action.about=
+lima.action.about.help=
+lima.action.about.tooltip=
+lima.action.changeLocale.help=
+lima.action.changeLocale.tooltip=
+lima.action.config=
+lima.action.config.help=
+lima.action.config.tooltip=
+lima.action.help=
+lima.action.help.help=
+lima.action.help.tooltip=
+lima.action.quit=
+lima.action.quit.help=
+lima.action.quit.tooltip=
+lima.action.site=
+lima.action.site.help=
+lima.action.site.tooltip=
+lima.close_question=
+lima.confirm.changeLanguage=
+lima.no=
+lima.question=
+lima.yes=
+mainui.menu.edit=
+mainui.menu.file=
+mainui.menu.help=
+mainui.menu.help.i18n=
+mainui.title=
Modified: trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties 2008-07-23 15:33:57 UTC (rev 890)
+++ trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties 2008-07-23 15:34:33 UTC (rev 891)
@@ -24,3 +24,30 @@
commandlinedemo.option.description.resetConfig=
commandlinedemo.option.description.showConfig=
commandlinedemo.option.description.ui=
+lima.action.about=
+lima.action.about.help=
+lima.action.about.tooltip=
+lima.action.changeLocale.help=
+lima.action.changeLocale.tooltip=
+lima.action.config=
+lima.action.config.help=
+lima.action.config.tooltip=
+lima.action.help=
+lima.action.help.help=
+lima.action.help.tooltip=
+lima.action.quit=
+lima.action.quit.help=
+lima.action.quit.tooltip=
+lima.action.site=
+lima.action.site.help=
+lima.action.site.tooltip=
+lima.close_question=
+lima.confirm.changeLanguage=
+lima.no=
+lima.question=
+lima.yes=
+mainui.menu.edit=
+mainui.menu.file=
+mainui.menu.help=
+mainui.menu.help.i18n=
+mainui.title=
Added: trunk/commandline/commandline-demo/src/main/resources/log4j.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/log4j.properties (rev 0)
+++ trunk/commandline/commandline-demo/src/main/resources/log4j.properties 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,11 @@
+# Global logging configuration
+log4j.rootLogger=ERROR, file
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.file=demo.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+
+# package level
+log4j.logger.org.codelutin.commandline=INFO
+log4j.logger.org.codelutin.option=INFO
+#log4j.logger.org.codelutin=INFO
Added: trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/commandline/demo/ui/JMainUI.jaxx
===================================================================
--- trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/commandline/demo/ui/JMainUI.jaxx (rev 0)
+++ trunk/commandline/commandline-demo/src/main/uimodel/org/codelutin/commandline/demo/ui/JMainUI.jaxx 2008-07-23 15:34:33 UTC (rev 891)
@@ -0,0 +1,34 @@
+<JFrame title="mainui.title" width="1024" height="768" defaultCloseOperation="dispose_on_close">
+ <JMenuBar>
+ <JMenu text="mainui.menu.file">
+ <JMenuItem id="quit"/>
+ </JMenu>
+ <JMenu text="mainui.menu.edit">
+ <JMenuItem id="config"/>
+ </JMenu>
+ <JMenu text="mainui.menu.help" mnemonic="{'H'}">
+ <JMenuItem id="help"/>
+ <JMenuItem id="site"/>
+ <JMenuItem id="about"/>
+ <JMenu text='mainui.menu.help.i18n' mnemonic="{'L'}"
+ icon='{createImageIcon("action/translate.png")}'>
+ <JMenuItem id="i18n_fr"/>
+ <JMenuItem id="i18n_en"/>
+ </JMenu>
+ </JMenu>
+ </JMenuBar>
+ <Table insets='0,0,0,0'>
+ <!-- le panel principal à surcharger selon le context -->
+ <row fill="both" weightx="1" weighty="1">
+ <cell>
+ <JTabbedPane id="contentTabbedPane"/>
+ </cell>
+ </row>
+ <!-- la barre de status -->
+ <row>
+ <cell fill="both">
+ <org.codelutin.widget.StatusBar id='statusBar'/>
+ </cell>
+ </row>
+ </Table>
+</JFrame>
\ No newline at end of file
Modified: trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst
===================================================================
--- trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst 2008-07-23 15:33:57 UTC (rev 890)
+++ trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst 2008-07-23 15:34:33 UTC (rev 891)
@@ -62,7 +62,7 @@
commandlinedemo.config.main.projectName.description
-#. siteURL (URL) <defaultValue:http://lima.labs.libre-entreprise.org>
+#. siteURL (URL) <defaultValue:http://commandline.labs.libre-entreprise.org>
commandlinedemo.config.main.siteURL.description
Modified: trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst
===================================================================
--- trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst 2008-07-23 15:33:57 UTC (rev 890)
+++ trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst 2008-07-23 15:34:33 UTC (rev 891)
@@ -62,7 +62,7 @@
commandlinedemo.config.main.projectName.description
-#. siteURL (URL) <defaultValue:http://lima.labs.libre-entreprise.org>
+#. siteURL (URL) <defaultValue:http://commandline.labs.libre-entreprise.org>
commandlinedemo.config.main.siteURL.description
1
0
23 Jul '08
Author: tchemit
Date: 2008-07-23 15:33:57 +0000 (Wed, 23 Jul 2008)
New Revision: 890
Modified:
trunk/commandline/pom.xml
Log:
define for a plugin his dependencies here, not in each module, since maven seems to not handle this very well...
Modified: trunk/commandline/pom.xml
===================================================================
--- trunk/commandline/pom.xml 2008-07-23 15:32:48 UTC (rev 889)
+++ trunk/commandline/pom.xml 2008-07-23 15:33:57 UTC (rev 890)
@@ -95,7 +95,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
- <phase>verify</phase>
+ <phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
@@ -133,6 +133,23 @@
<xdocDirectory>${basedir}/target/generated-site/xdoc/fr/rst</xdocDirectory>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.codelutin.jaxx</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.codelutin.jaxx</groupId>
+ <artifactId>swing-jaxx</artifactId>
+ <version>${jaxx.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib</groupId>
+ <artifactId>lutinwidget</artifactId>
+ <version>0.10-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>
@@ -141,7 +158,7 @@
<!-- current version -->
<current.version>0.7-SNAPSHOT</current.version>
-
+
<!-- jaxx version -->
<jaxx.version>0.2-SNAPSHOT</jaxx.version>
@@ -159,7 +176,7 @@
<!--le repertoire de generation -->
<maven.gen.dir>${basedir}/target/generated-sources</maven.gen.dir>
-
+
<!-- Lists URL -->
<labs.lists>
http://lists.labs.libre-entreprise.org/mailman/listinfo/lutinutil
@@ -228,12 +245,25 @@
</dependency>
<dependency>
+ <groupId>lutinlib</groupId>
+ <artifactId>lutinwidget</artifactId>
+ <version>0.10-SNAPSHOT</version>
+ </dependency>
+
+ <!-- jaxx library -->
+ <dependency>
<groupId>org.codelutin.jaxx</groupId>
<artifactId>jaxx-swing</artifactId>
<version>${jaxx.version}</version>
</dependency>
<dependency>
+ <groupId>org.codelutin.jaxx</groupId>
+ <artifactId>jaxx-swing-action</artifactId>
+ <version>${jaxx.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.codelutin.commandline</groupId>
<artifactId>commandline-core</artifactId>
<version>${current.version}</version>
1
0
[Lutinutil-commits] r889 - trunk/commandline/commandline-core/src/main/java/org/codelutin/option/actions
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
23 Jul '08
Author: tchemit
Date: 2008-07-23 15:32:48 +0000 (Wed, 23 Jul 2008)
New Revision: 889
Modified:
trunk/commandline/commandline-core/src/main/java/org/codelutin/option/actions/OptionActionShowConfigRunnable.java
Log:
show result in sout not in log...
Modified: trunk/commandline/commandline-core/src/main/java/org/codelutin/option/actions/OptionActionShowConfigRunnable.java
===================================================================
--- trunk/commandline/commandline-core/src/main/java/org/codelutin/option/actions/OptionActionShowConfigRunnable.java 2008-07-23 13:26:17 UTC (rev 888)
+++ trunk/commandline/commandline-core/src/main/java/org/codelutin/option/actions/OptionActionShowConfigRunnable.java 2008-07-23 15:32:48 UTC (rev 889)
@@ -45,7 +45,8 @@
throw new IllegalArgumentException("could not found a configuration with category " + category);
}
ParserUtil.printConfig(writer, context.getConfig(category));
- log.info(writer);
+ System.out.println(writer);
+ //log.info(writer);
}
context.setQuit(true);
1
0
[Lutinutil-commits] r888 - trunk/commandline/commandline-ui/src/main/resources/icons/action
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
23 Jul '08
Author: tchemit
Date: 2008-07-23 13:26:17 +0000 (Wed, 23 Jul 2008)
New Revision: 888
Added:
trunk/commandline/commandline-ui/src/main/resources/icons/action/translate.png
Log:
ajout des icones des actions de base
Added: trunk/commandline/commandline-ui/src/main/resources/icons/action/translate.png
===================================================================
(Binary files differ)
Property changes on: trunk/commandline/commandline-ui/src/main/resources/icons/action/translate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
1
0
[Lutinutil-commits] r887 - in trunk/commandline: . commandline-demo commandline-demo/src commandline-demo/src/main commandline-demo/src/main/resources commandline-demo/src/main/resources/i18n commandline-demo/src/site commandline-demo/src/site/en commandline-demo/src/site/en/rst commandline-demo/src/site/en/rst/user commandline-demo/src/site/fr commandline-demo/src/site/fr/rst commandline-demo/src/site/fr/rst/user commandline-demo/src/test
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
by tchemit@users.labs.libre-entreprise.org 23 Jul '08
23 Jul '08
Author: tchemit
Date: 2008-07-23 11:44:52 +0000 (Wed, 23 Jul 2008)
New Revision: 887
Added:
trunk/commandline/commandline-demo/
trunk/commandline/commandline-demo/pom.xml
trunk/commandline/commandline-demo/src/
trunk/commandline/commandline-demo/src/main/
trunk/commandline/commandline-demo/src/main/java/
trunk/commandline/commandline-demo/src/main/resources/
trunk/commandline/commandline-demo/src/main/resources/commandline.properties
trunk/commandline/commandline-demo/src/main/resources/i18n/
trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties
trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties
trunk/commandline/commandline-demo/src/site/
trunk/commandline/commandline-demo/src/site/en/
trunk/commandline/commandline-demo/src/site/en/rst/
trunk/commandline/commandline-demo/src/site/en/rst/user/
trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst
trunk/commandline/commandline-demo/src/site/fr/
trunk/commandline/commandline-demo/src/site/fr/rst/
trunk/commandline/commandline-demo/src/site/fr/rst/user/
trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst
trunk/commandline/commandline-demo/src/test/
trunk/commandline/commandline-demo/src/test/java/
trunk/commandline/commandline-demo/src/test/resources/
Modified:
trunk/commandline/pom.xml
Log:
ajout d'un module de demo
Added: trunk/commandline/commandline-demo/pom.xml
===================================================================
--- trunk/commandline/commandline-demo/pom.xml (rev 0)
+++ trunk/commandline/commandline-demo/pom.xml 2008-07-23 11:44:52 UTC (rev 887)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin.commandline</groupId>
+ <artifactId>commandline-pom</artifactId>
+ <version>0.7-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>commandline-demo</artifactId>
+
+ <dependencies>
+
+ <!-- librairie commandline -->
+ <dependency>
+ <groupId>org.codelutin.commandline</groupId>
+ <artifactId>commandline-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codelutin.commandline</groupId>
+ <artifactId>commandline-ui</artifactId>
+ </dependency>
+
+ </dependencies>
+
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+
+ <name>commandline-demo</name>
+ <version>0.7-SNAPSHOT</version>
+ <description>commandline demo module</description>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>jar</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <configuration>
+ <entries>
+ <entry>
+ <basedir>${maven.gen.dir}/java</basedir>
+ </entry>
+ </entries>
+ </configuration>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codelutin.commandline</groupId>
+ <artifactId>maven-commandline-plugin</artifactId>
+ <version>${current.version}</version>
+ <configuration>
+ <prefix>CommandLineDemo</prefix>
+ <packageName>org.codelutin.commandline.demo</packageName>
+ </configuration>
+ <executions>
+ <execution>
+ <inherited>false</inherited>
+ <!-- do not use generate phase, since it will be reexecuted a second time... -->
+ <phase>process-resources</phase>
+ <id>genJava</id>
+ <goals>
+ <goal>genJava</goal>
+ </goals>
+ <configuration>
+ <source>${maven.src.dir}/main/resources/commandline.properties</source>
+ <out>${maven.gen.dir}/java</out>
+ <concreteConfig>true</concreteConfig>
+ <_projectName>CommandlineDemo</_projectName>
+ <_configFileName>.commandlineDemo-1</_configFileName>
+ <_version>${current.version}</_version>
+ </configuration>
+ </execution>
+ <execution>
+ <id>genRst</id>
+ <goals>
+ <goal>genRst</goal>
+ </goals>
+ <configuration>
+ <rstFilePath>${maven.src.dir}/site/@bundle@/rst/user</rstFilePath>
+ <out>${basedir}/target/classes</out>
+ <i18nCP>${maven.src.dir}/main/resources</i18nCP>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: trunk/commandline/commandline-demo/src/main/resources/commandline.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/commandline.properties (rev 0)
+++ trunk/commandline/commandline-demo/src/main/resources/commandline.properties 2008-07-23 11:44:52 UTC (rev 887)
@@ -0,0 +1,55 @@
+###############################################################################
+### Option definitions ########################################################
+###############################################################################
+
+# TODO define them
+
+
+###############################################################################
+### Main configuration definition #############################################
+###############################################################################
+
+###
+### Application global properties
+###
+
+main.config.definition.debugMode=java.lang.Boolean:false
+main.config.modifiers.debugMode=mandatory
+
+main.config.definition.siteURL=java.net.URL:http://lima.labs.libre-entreprise.org
+main.config.modifiers.siteURL=final,static,mandatory
+
+###
+### user properties
+###
+
+main.config.definition.userFirstName=java.lang.String
+main.config.modifiers.userFirstName=mandatory
+
+main.config.definition.userLastName=java.lang.String
+main.config.modifiers.userLastName=mandatory
+
+main.config.definition.userMail=java.lang.String
+main.config.modifiers.userMail=mandatory
+
+###############################################################################
+### Remote configuration definition ###########################################
+###############################################################################
+
+remote.config.definition.login=java.lang.String
+remote.config.modifiers.login=mandatory
+
+remote.config.definition.password=java.lang.String
+remote.config.modifiers.password=
+
+remote.config.definition.URI=java.net.URI:jnp://localhost:1099
+remote.config.modifiers.URI=static,mandatory
+
+remote.config.definition.useProxy=java.lang.Boolean:False
+remote.config.modifiers.useProxy=
+
+remote.config.definition.proxyLogin=java.lang.String
+remote.config.modifiers.proxyLogin=
+
+remote.config.definition.proxyPassword=java.lang.String
+remote.config.modifiers.proxyPassword=
Added: trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties (rev 0)
+++ trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-en_GB.properties 2008-07-23 11:44:52 UTC (rev 887)
@@ -0,0 +1,27 @@
+#Wed Jul 23 13:41:57 CEST 2008
+commandlinedemo.config.main.configFileName.description=commandlinedemo.config.main.configFileName.description
+commandlinedemo.config.main.debugMode.description=commandlinedemo.config.main.debugMode.description
+commandlinedemo.config.main.description=commandlinedemo.config.main.description
+commandlinedemo.config.main.encoding.description=commandlinedemo.config.main.encoding.description
+commandlinedemo.config.main.locale.description=commandlinedemo.config.main.locale.description
+commandlinedemo.config.main.projectName.description=commandlinedemo.config.main.projectName.description
+commandlinedemo.config.main.siteURL.description=commandlinedemo.config.main.siteURL.description
+commandlinedemo.config.main.userFirstName.description=commandlinedemo.config.main.userFirstName.description
+commandlinedemo.config.main.userLastName.description=commandlinedemo.config.main.userLastName.description
+commandlinedemo.config.main.userMail.description=commandlinedemo.config.main.userMail.description
+commandlinedemo.config.main.version.description=commandlinedemo.config.main.version.description
+commandlinedemo.config.remote.URI.description=commandlinedemo.config.remote.URI.description
+commandlinedemo.config.remote.description=commandlinedemo.config.remote.description
+commandlinedemo.config.remote.login.description=commandlinedemo.config.remote.login.description
+commandlinedemo.config.remote.password.description=commandlinedemo.config.remote.password.description
+commandlinedemo.config.remote.proxyLogin.description=commandlinedemo.config.remote.proxyLogin.description
+commandlinedemo.config.remote.proxyPassword.description=commandlinedemo.config.remote.proxyPassword.description
+commandlinedemo.config.remote.useProxy.description=commandlinedemo.config.remote.useProxy.description
+commandlinedemo.option.description.changeConfig=commandlinedemo.option.description.changeConfig
+commandlinedemo.option.description.changeFileConfig=commandlinedemo.option.description.changeFileConfig
+commandlinedemo.option.description.editConfig=commandlinedemo.option.description.editConfig
+commandlinedemo.option.description.help=commandlinedemo.option.description.help
+commandlinedemo.option.description.helpConfig=commandlinedemo.option.description.helpConfig
+commandlinedemo.option.description.resetConfig=commandlinedemo.option.description.resetConfig
+commandlinedemo.option.description.showConfig=commandlinedemo.option.description.showConfig
+commandlinedemo.option.description.ui=commandlinedemo.option.description.ui
Added: trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties
===================================================================
--- trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties (rev 0)
+++ trunk/commandline/commandline-demo/src/main/resources/i18n/commandline-demo-fr_FR.properties 2008-07-23 11:44:52 UTC (rev 887)
@@ -0,0 +1,26 @@
+commandlinedemo.config.main.configFileName.description=
+commandlinedemo.config.main.debugMode.description=
+commandlinedemo.config.main.description=
+commandlinedemo.config.main.encoding.description=
+commandlinedemo.config.main.locale.description=
+commandlinedemo.config.main.projectName.description=
+commandlinedemo.config.main.siteURL.description=
+commandlinedemo.config.main.userFirstName.description=
+commandlinedemo.config.main.userLastName.description=
+commandlinedemo.config.main.userMail.description=
+commandlinedemo.config.main.version.description=
+commandlinedemo.config.remote.URI.description=
+commandlinedemo.config.remote.description=
+commandlinedemo.config.remote.login.description=
+commandlinedemo.config.remote.password.description=
+commandlinedemo.config.remote.proxyLogin.description=
+commandlinedemo.config.remote.proxyPassword.description=
+commandlinedemo.config.remote.useProxy.description=
+commandlinedemo.option.description.changeConfig=
+commandlinedemo.option.description.changeFileConfig=
+commandlinedemo.option.description.editConfig=
+commandlinedemo.option.description.help=
+commandlinedemo.option.description.helpConfig=
+commandlinedemo.option.description.resetConfig=
+commandlinedemo.option.description.showConfig=
+commandlinedemo.option.description.ui=
Added: trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst
===================================================================
--- trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst (rev 0)
+++ trunk/commandline/commandline-demo/src/site/en/rst/user/CommandLineDemoUsage.rst 2008-07-23 11:44:52 UTC (rev 887)
@@ -0,0 +1,110 @@
+===========================
+**CommandLineDemo**'s usage
+===========================
+
+Launch commands
+---------------
+
+#. [--show-config]* <all|main|remote> [normal|complete|tec]
+ commandlinedemo.option.description.showConfig
+
+
+#. --edit-config
+ commandlinedemo.option.description.editConfig
+
+
+#. --config-file <configFile:FILE>
+ commandlinedemo.option.description.changeFileConfig
+
+
+#. [--config]* <key:STRING> <value:STRING> [main|remote]
+ commandlinedemo.option.description.changeConfig
+
+
+#. --help|-h
+ commandlinedemo.option.description.help
+
+
+#. [--help-config]* <all|main|remote>
+ commandlinedemo.option.description.helpConfig
+
+
+#. --reset-config
+ commandlinedemo.option.description.resetConfig
+
+
+#. --ui <flag:BOOLEAN>
+ commandlinedemo.option.description.ui
+
+Configurations of **CommandLineDemo**
+-------------------------------------
+
+commandlinedemo.config.main.description (main)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#. configFileName (File) <defaultValue:.commandlineDemo-1>
+ commandlinedemo.config.main.configFileName.description
+
+
+#. debugMode (Boolean) <defaultValue:false>
+ commandlinedemo.config.main.debugMode.description
+
+
+#. encoding (String) <defaultValue:UTF-8>
+ commandlinedemo.config.main.encoding.description
+
+
+#. locale (Locale) <defaultValue:en_GB>
+ commandlinedemo.config.main.locale.description
+
+
+#. projectName (String) <defaultValue:CommandlineDemo>
+ commandlinedemo.config.main.projectName.description
+
+
+#. siteURL (URL) <defaultValue:http://lima.labs.libre-entreprise.org>
+ commandlinedemo.config.main.siteURL.description
+
+
+#. userFirstName (String)
+ commandlinedemo.config.main.userFirstName.description
+
+
+#. userLastName (String)
+ commandlinedemo.config.main.userLastName.description
+
+
+#. userMail (String)
+ commandlinedemo.config.main.userMail.description
+
+
+#. version (VersionNumber) <defaultValue:0.7>
+ commandlinedemo.config.main.version.description
+
+
+commandlinedemo.config.remote.description (remote)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#. URI (URI) <defaultValue:jnp://localhost:1099>
+ commandlinedemo.config.remote.URI.description
+
+
+#. login (String)
+ commandlinedemo.config.remote.login.description
+
+
+#. password (String)
+ commandlinedemo.config.remote.password.description
+
+
+#. proxyLogin (String)
+ commandlinedemo.config.remote.proxyLogin.description
+
+
+#. proxyPassword (String)
+ commandlinedemo.config.remote.proxyPassword.description
+
+
+#. useProxy (Boolean) <defaultValue:false>
+ commandlinedemo.config.remote.useProxy.description
+
Added: trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst
===================================================================
--- trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst (rev 0)
+++ trunk/commandline/commandline-demo/src/site/fr/rst/user/CommandLineDemoUsage.rst 2008-07-23 11:44:52 UTC (rev 887)
@@ -0,0 +1,110 @@
+==========================================
+Guide d'utilisation de **CommandLineDemo**
+==========================================
+
+Les commandes de lancement de **CommandLineDemo**
+-------------------------------------------------
+
+#. [--show-config]* <all|main|remote> [normal|complete|tec]
+ commandlinedemo.option.description.showConfig
+
+
+#. --edit-config
+ commandlinedemo.option.description.editConfig
+
+
+#. --config-file <configFile:FILE>
+ commandlinedemo.option.description.changeFileConfig
+
+
+#. [--config]* <key:STRING> <value:STRING> [main|remote]
+ commandlinedemo.option.description.changeConfig
+
+
+#. --help|-h
+ commandlinedemo.option.description.help
+
+
+#. [--help-config]* <all|main|remote>
+ commandlinedemo.option.description.helpConfig
+
+
+#. --reset-config
+ commandlinedemo.option.description.resetConfig
+
+
+#. --ui <flag:BOOLEAN>
+ commandlinedemo.option.description.ui
+
+Les configurations de **CommandLineDemo**
+-----------------------------------------
+
+commandlinedemo.config.main.description (main)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#. configFileName (File) <defaultValue:.commandlineDemo-1>
+ commandlinedemo.config.main.configFileName.description
+
+
+#. debugMode (Boolean) <defaultValue:false>
+ commandlinedemo.config.main.debugMode.description
+
+
+#. encoding (String) <defaultValue:UTF-8>
+ commandlinedemo.config.main.encoding.description
+
+
+#. locale (Locale) <defaultValue:en_GB>
+ commandlinedemo.config.main.locale.description
+
+
+#. projectName (String) <defaultValue:CommandlineDemo>
+ commandlinedemo.config.main.projectName.description
+
+
+#. siteURL (URL) <defaultValue:http://lima.labs.libre-entreprise.org>
+ commandlinedemo.config.main.siteURL.description
+
+
+#. userFirstName (String)
+ commandlinedemo.config.main.userFirstName.description
+
+
+#. userLastName (String)
+ commandlinedemo.config.main.userLastName.description
+
+
+#. userMail (String)
+ commandlinedemo.config.main.userMail.description
+
+
+#. version (VersionNumber) <defaultValue:0.7>
+ commandlinedemo.config.main.version.description
+
+
+commandlinedemo.config.remote.description (remote)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#. URI (URI) <defaultValue:jnp://localhost:1099>
+ commandlinedemo.config.remote.URI.description
+
+
+#. login (String)
+ commandlinedemo.config.remote.login.description
+
+
+#. password (String)
+ commandlinedemo.config.remote.password.description
+
+
+#. proxyLogin (String)
+ commandlinedemo.config.remote.proxyLogin.description
+
+
+#. proxyPassword (String)
+ commandlinedemo.config.remote.proxyPassword.description
+
+
+#. useProxy (Boolean) <defaultValue:false>
+ commandlinedemo.config.remote.useProxy.description
+
Modified: trunk/commandline/pom.xml
===================================================================
--- trunk/commandline/pom.xml 2008-07-23 11:44:24 UTC (rev 886)
+++ trunk/commandline/pom.xml 2008-07-23 11:44:52 UTC (rev 887)
@@ -22,6 +22,7 @@
<module>commandline-core</module>
<module>commandline-ui</module>
<module>maven-plugin</module>
+ <module>commandline-demo</module>
</modules>
<dependencies>
@@ -138,6 +139,9 @@
<properties>
+ <!-- current version -->
+ <current.version>0.7-SNAPSHOT</current.version>
+
<!-- jaxx version -->
<jaxx.version>0.2-SNAPSHOT</jaxx.version>
@@ -232,13 +236,13 @@
<dependency>
<groupId>org.codelutin.commandline</groupId>
<artifactId>commandline-core</artifactId>
- <version>0.7-SNAPSHOT</version>
+ <version>${current.version}</version>
</dependency>
<dependency>
<groupId>org.codelutin.commandline</groupId>
<artifactId>commandline-ui</artifactId>
- <version>0.7-SNAPSHOT</version>
+ <version>${current.version}</version>
</dependency>
<dependency>
1
0