Author: julien(a)jboss.com
Date: 2008-07-07 19:03:03 -0400 (Mon, 07 Jul 2008)
New Revision: 11339
Added:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Bootstrap.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/ElementListener.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Tools.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/
Removed:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Appender.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Bootstrap.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/ElementListener.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Level.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Logger.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Tools.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxObject.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Appender.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/AppenderWidget.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Level.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Logger.java
Log:
rename o.j.p.presentation.ajax.client.utils to ....util
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -26,7 +26,7 @@
import org.jboss.portal.presentation.ajax.client.protocol.AjaxAction;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxResponse;
import org.jboss.portal.presentation.ajax.client.model.AjaxObject;
-import org.jboss.portal.presentation.ajax.client.utils.logging.Logger;
+import org.jboss.portal.presentation.ajax.client.util.logging.Logger;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -25,31 +25,18 @@
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.ChangeListener;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.i18n.client.DateTimeFormat;
import org.jboss.portal.presentation.ajax.client.model.update.ModelUpdate;
import org.jboss.portal.presentation.ajax.client.model.AjaxObject;
-import org.jboss.portal.presentation.ajax.client.utils.Bootstrap;
-import org.jboss.portal.presentation.ajax.client.utils.logging.Appender;
-import org.jboss.portal.presentation.ajax.client.utils.logging.Level;
-import org.jboss.portal.presentation.ajax.client.utils.logging.Logger;
-import org.jboss.portal.presentation.ajax.client.utils.logging.AppenderWidget;
+import org.jboss.portal.presentation.ajax.client.util.Bootstrap;
+import org.jboss.portal.presentation.ajax.client.util.logging.Logger;
+import org.jboss.portal.presentation.ajax.client.util.logging.AppenderWidget;
import java.util.Map;
import java.util.HashMap;
-import java.util.Date;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxObject.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxObject.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxObject.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -37,7 +37,7 @@
import org.jboss.portal.presentation.ajax.client.model.update.UpdateObject;
import org.jboss.portal.presentation.ajax.client.model.update.RemoveChild;
import org.jboss.portal.presentation.ajax.client.model.update.RemoveObject;
-import org.jboss.portal.presentation.ajax.client.utils.logging.Logger;
+import org.jboss.portal.presentation.ajax.client.util.logging.Logger;
import org.jboss.portal.presentation.ajax.client.AgentContext;
/**
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -38,8 +38,8 @@
import org.jboss.portal.presentation.ajax.client.PresentationClientRemote;
import org.jboss.portal.presentation.ajax.client.protocol.OpaqueWindowAction;
import org.jboss.portal.presentation.ajax.client.protocol.DestroyObjectAction;
-import org.jboss.portal.presentation.ajax.client.utils.Tools;
-import org.jboss.portal.presentation.ajax.client.utils.logging.Logger;
+import org.jboss.portal.presentation.ajax.client.util.Tools;
+import org.jboss.portal.presentation.ajax.client.util.logging.Logger;
import java.util.Map;
import java.util.HashMap;
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -31,7 +31,7 @@
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Element;
-import org.jboss.portal.presentation.ajax.client.utils.logging.Logger;
+import org.jboss.portal.presentation.ajax.client.util.logging.Logger;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
Copied:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util
(from rev 11273,
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils)
Deleted:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Appender.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Appender.java 2008-07-02
22:14:58 UTC (rev 11273)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Appender.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -1,36 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils;
-
-import java.util.Date;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
- * @version $Revision: 630 $
- */
-public interface Appender
-{
-
- void append(Level level, Date time, String category, String msg);
-
-}
Deleted:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Bootstrap.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Bootstrap.java 2008-07-02
22:14:58 UTC (rev 11273)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Bootstrap.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -1,147 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils;
-
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.user.client.Element;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Event;
-import com.google.gwt.user.client.Window;
-
-import java.util.ArrayList;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
- * @version $Revision: 630 $
- */
-public class Bootstrap
-{
-
- /** . */
- private static final Logger log = Logger.getLogger(Bootstrap.class);
-
- /** . */
- private static Bootstrap instance;
-
- public static void init()
- {
- if (instance == null)
- {
- instance = new Bootstrap();
- instance.perform();
- }
- }
-
- /** . */
- private ArrayList listeners;
-
- private Bootstrap()
- {
- listeners = new ArrayList();
- }
-
- private void perform()
- {
- JavaScriptObject overridenSubmit = getOverridenSubmitFunction();
-
- //
- patch(overridenSubmit);
- }
-
- public void addListener(ElementListener listener)
- {
- ArrayList copy = new ArrayList(listeners);
- copy.add(listener);
- listeners = copy;
- }
-
- private static void handle(Event event, Element element)
- {
- DOM.eventPreventDefault(event);
-
- //
- log.info("Element " + element + " clicked");
-
-// for (Iterator i = listeners.iterator();i.hasNext();)
-// {
-// ElementListener listener = (ElementListener)i.next();
-// listener.clicked(element);
-// }
- }
-
- private static void handle(Element element)
- {
- log.info("Element " + element + " clicked");
-// for (Iterator i = listeners.iterator();i.hasNext();)
-// {
-// ElementListener listener = (ElementListener)i.next();
-// listener.clicked(element);
-// }
- }
-
- /**
- * Returns the submit function of the HTMLFormElement javascript object.
- *
- * @return the submit function
- */
- public native JavaScriptObject getNativeSubmitFunction()
- /*-{
- return $wnd.HTMLFormElement.prototype.submit;
- }-*/;
-
- /**
- *
- * @return
- */
- public native JavaScriptObject getOverridenSubmitFunction()
- /*-{
- function overrideSubmit(event)
- {
- if(event != null)
- {
- // It is a browser submit event
- var target = event.target;
-
@org.jboss.portal.presentation.ajax.client.utils.Bootstrap::handle(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;)(event,target);
- }
- else
- {
- // It is a programmatic submit
-
@org.jboss.portal.presentation.ajax.client.utils.Bootstrap::handle(Lcom/google/gwt/user/client/Element;)(this);
- }
-
- //
- }
-
- //
- return overrideSubmit;
- }-*/;
-
- /**
- * @param overridenSubmit the patched submit
- */
- public native void patch(JavaScriptObject overridenSubmit)
- /*-{
- $wnd.HTMLFormElement.prototype.submit2 = $wnd.HTMLFormElement.prototype.submit;
- $wnd.HTMLFormElement.prototype.submit = overridenSubmit;
- }-*/;
-}
Copied:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Bootstrap.java
(from rev 11338,
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Bootstrap.java)
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Bootstrap.java
(rev 0)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Bootstrap.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -0,0 +1,148 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.util;
+
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Event;
+
+import java.util.ArrayList;
+
+import org.jboss.portal.presentation.ajax.client.util.logging.Logger;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class Bootstrap
+{
+
+ /** . */
+ private static final Logger log = Logger.getLogger(Bootstrap.class);
+
+ /** . */
+ private static Bootstrap instance;
+
+ public static void init()
+ {
+ if (instance == null)
+ {
+ instance = new Bootstrap();
+ instance.perform();
+ }
+ }
+
+ /** . */
+ private ArrayList listeners;
+
+ private Bootstrap()
+ {
+ listeners = new ArrayList();
+ }
+
+ private void perform()
+ {
+ JavaScriptObject overridenSubmit = getOverridenSubmitFunction();
+
+ //
+ patch(overridenSubmit);
+ }
+
+ public void addListener(ElementListener listener)
+ {
+ ArrayList copy = new ArrayList(listeners);
+ copy.add(listener);
+ listeners = copy;
+ }
+
+ private static void handle(Event event, Element element)
+ {
+ DOM.eventPreventDefault(event);
+
+ //
+ log.info("Element " + element + " clicked");
+
+// for (Iterator i = listeners.iterator();i.hasNext();)
+// {
+// ElementListener listener = (ElementListener)i.next();
+// listener.clicked(element);
+// }
+ }
+
+ private static void handle(Element element)
+ {
+ log.info("Element " + element + " clicked");
+// for (Iterator i = listeners.iterator();i.hasNext();)
+// {
+// ElementListener listener = (ElementListener)i.next();
+// listener.clicked(element);
+// }
+ }
+
+ /**
+ * Returns the submit function of the HTMLFormElement javascript object.
+ *
+ * @return the submit function
+ */
+ public native JavaScriptObject getNativeSubmitFunction()
+ /*-{
+ return $wnd.HTMLFormElement.prototype.submit;
+ }-*/;
+
+ /**
+ *
+ * @return
+ */
+ public native JavaScriptObject getOverridenSubmitFunction()
+ /*-{
+ function overrideSubmit(event)
+ {
+ if(event != null)
+ {
+ // It is a browser submit event
+ var target = event.target;
+
@org.jboss.portal.presentation.ajax.client.util.Bootstrap::handle(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;)(event,target);
+ }
+ else
+ {
+ // It is a programmatic submit
+
@org.jboss.portal.presentation.ajax.client.util.Bootstrap::handle(Lcom/google/gwt/user/client/Element;)(this);
+ }
+
+ //
+ }
+
+ //
+ return overrideSubmit;
+ }-*/;
+
+ /**
+ * @param overridenSubmit the patched submit
+ */
+ public native void patch(JavaScriptObject overridenSubmit)
+ /*-{
+ $wnd.HTMLFormElement.prototype.submit2 = $wnd.HTMLFormElement.prototype.submit;
+ $wnd.HTMLFormElement.prototype.submit = overridenSubmit;
+ }-*/;
+}
Deleted:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/ElementListener.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/ElementListener.java 2008-07-02
22:14:58 UTC (rev 11273)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/ElementListener.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -1,34 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils;
-
-import com.google.gwt.user.client.Element;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
- * @version $Revision: 630 $
- */
-public interface ElementListener
-{
- void clicked(Element element);
-}
Copied:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/ElementListener.java
(from rev 11338,
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/ElementListener.java)
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/ElementListener.java
(rev 0)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/ElementListener.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.util;
+
+import com.google.gwt.user.client.Element;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface ElementListener
+{
+ void clicked(Element element);
+}
Deleted:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Level.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Level.java 2008-07-02
22:14:58 UTC (rev 11273)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Level.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -1,65 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
- * @version $Revision: 630 $
- */
-public class Level
-{
-
- /** . */
- public static final Level TRACE = new Level("TRACE");
-
- /** . */
- public static final Level DEBUG = new Level("DEBUG");
-
- /** . */
- public static final Level INFO = new Level("INFO");
-
- /** . */
- public static final Level ERROR = new Level("ERROR");
-
- /** . */
- private final String name;
-
- /** . */
- private final String toString;
-
- private Level(String name)
- {
- this.name = name;
- this.toString = "[" + name + "]";
- }
-
- public String getName()
- {
- return name;
- }
-
- public String toString()
- {
- return toString;
- }
-}
Deleted:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Logger.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Logger.java 2008-07-02
22:14:58 UTC (rev 11273)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Logger.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -1,168 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Date;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
- * @version $Revision: 630 $
- */
-public final class Logger
-{
-
- /** . */
- private static final String PREFIX =
"org.jboss.portal.presentation.ajax.client.";
-
- /** . */
- private static final Map loggers = new HashMap();
-
- /** . */
- private static final Set appenders = new HashSet();
-
- /**
- * Returns a logger.
- *
- * @param category the logger category
- * @return the logger
- * @throws IllegalArgumentException if the clazz argument is null
- */
- public static Logger getLogger(String category) throws IllegalArgumentException
- {
- if (category == null)
- {
- throw new IllegalArgumentException("No null category accepted");
- }
-
- //
- Logger logger = (Logger)loggers.get(category);
-
- //
- if (logger == null)
- {
- loggers.put(category, logger = new Logger(category));
- }
-
- //
- return logger;
- }
-
- /**
- * Returns a logger.
- *
- * @param clazz the logger key
- * @return the logger
- * @throws IllegalArgumentException if the clazz argument is null
- */
- public static Logger getLogger(Class clazz) throws IllegalArgumentException
- {
- if (clazz == null)
- {
- throw new IllegalArgumentException("No null clazz accepted");
- }
-
- //
- String name = clazz.toString();
- name = name.substring("class ".length());
- if (name.startsWith(PREFIX))
- {
- name = name.substring(PREFIX.length());
- }
-
- //
- return getLogger(name);
- }
-
- public static void registerAppender(Appender appender)
- {
- if (appender == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- appenders.add(appender);
- }
-
- /** . */
- private final String category;
-
- private Logger(String category)
- {
- this.category = category;
- }
-
- public String getCategory()
- {
- return category;
- }
-
- public void log(Level level, String msg)
- {
- if (level == null)
- {
- throw new IllegalArgumentException("No null level");
- }
- if (msg == null)
- {
- throw new IllegalArgumentException("No null msg");
- }
-
- //
- Date now = new Date();
-
- //
- for (Iterator i = appenders.iterator();i.hasNext();)
- {
- Appender appender = (Appender)i.next();
-
- //
- appender.append(level, now, category, msg);
- }
- }
-
- public void info(String msg)
- {
- log(Level.INFO, msg);
- }
-
- public void error(String msg)
- {
- log(Level.ERROR, msg);
- }
-
- public void debug(String msg)
- {
- log(Level.DEBUG, msg);
- }
-
- public void trace(String msg)
- {
- log(Level.TRACE, msg);
- }
-}
Deleted:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Tools.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Tools.java 2008-07-02
22:14:58 UTC (rev 11273)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Tools.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -1,120 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils;
-
-import com.google.gwt.user.client.Element;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Window;
-
-import java.util.Map;
-
-/**
- * A collection of various utility methods.
- *
- * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
- * @version $Revision: 630 $
- */
-public class Tools
-{
-
- /**
- * Returns an element tag name.
- *
- * @param element the element to obtain the tag name from
- * @return the tag name value
- */
- public static native String getTagName(Element element)
- /*-{
- return element.nodeName;
- }-*/;
-
- /**
- * Serialize a form.
- */
- public static void serialize(Element element, Map map)
- {
- String tag = getTagName(element);
-
- //
- String value = null;
- if ("INPUT".equals(tag))
- {
- String type = DOM.getElementAttribute(element, "type").toLowerCase();
-
- //
- if ("checkbox".equals(type))
- {
- throw new UnsupportedOperationException("todo");
- }
- else if ("radio".equals(type))
- {
- throw new UnsupportedOperationException("todo");
- }
- else
- {
- value = DOM.getElementProperty(element, "value");
- }
- }
- else
- {
- for (int i = DOM.getChildCount(element) - 1;i >= 0;i--)
- {
- serialize(DOM.getChild(element, i), map);
- }
- }
-
- //
- if (value != null)
- {
- String name = DOM.getElementAttribute(element, "name");
-
- //
- if (name != null)
- {
- String disabled = DOM.getElementProperty(element, "disabled");
-
- //
- if (disabled == null ||
!disabled.trim().toCharArray().equals("true"))
- {
- String[] values = (String[])map.get(name);
-
- //
- if (values == null)
- {
- map.put(name, new String[]{value});
- }
- else
- {
- String[] tmp = new String[values.length + 1];
- for (int i = 0;i < values.length;i++)
- {
- tmp[i] = values[i];
- }
- tmp[values.length] = value;
- values = tmp;
- }
- }
- }
- }
- }
-}
Copied:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Tools.java
(from rev 11338,
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Tools.java)
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Tools.java
(rev 0)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/Tools.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.util;
+
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.DOM;
+
+import java.util.Map;
+
+/**
+ * A collection of various utility methods.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class Tools
+{
+
+ /**
+ * Returns an element tag name.
+ *
+ * @param element the element to obtain the tag name from
+ * @return the tag name value
+ */
+ public static native String getTagName(Element element)
+ /*-{
+ return element.nodeName;
+ }-*/;
+
+ /**
+ * Serialize a form.
+ */
+ public static void serialize(Element element, Map map)
+ {
+ String tag = getTagName(element);
+
+ //
+ String value = null;
+ if ("INPUT".equals(tag))
+ {
+ String type = DOM.getElementAttribute(element, "type").toLowerCase();
+
+ //
+ if ("checkbox".equals(type))
+ {
+ throw new UnsupportedOperationException("todo");
+ }
+ else if ("radio".equals(type))
+ {
+ throw new UnsupportedOperationException("todo");
+ }
+ else
+ {
+ value = DOM.getElementProperty(element, "value");
+ }
+ }
+ else
+ {
+ for (int i = DOM.getChildCount(element) - 1;i >= 0;i--)
+ {
+ serialize(DOM.getChild(element, i), map);
+ }
+ }
+
+ //
+ if (value != null)
+ {
+ String name = DOM.getElementAttribute(element, "name");
+
+ //
+ if (name != null)
+ {
+ String disabled = DOM.getElementProperty(element, "disabled");
+
+ //
+ if (disabled == null ||
!disabled.trim().toCharArray().equals("true"))
+ {
+ String[] values = (String[])map.get(name);
+
+ //
+ if (values == null)
+ {
+ map.put(name, new String[]{value});
+ }
+ else
+ {
+ String[] tmp = new String[values.length + 1];
+ for (int i = 0;i < values.length;i++)
+ {
+ tmp[i] = values[i];
+ }
+ tmp[values.length] = value;
+ values = tmp;
+ }
+ }
+ }
+ }
+ }
+}
Copied:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging
(from rev 11338,
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/logging)
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Appender.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/logging/Appender.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Appender.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils.logging;
+package org.jboss.portal.presentation.ajax.client.util.logging;
import java.util.Date;
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/AppenderWidget.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/logging/AppenderWidget.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/AppenderWidget.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils.logging;
+package org.jboss.portal.presentation.ajax.client.util.logging;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.ChangeListener;
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Level.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/logging/Level.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Level.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils.logging;
+package org.jboss.portal.presentation.ajax.client.util.logging;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Logger.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/logging/Logger.java 2008-07-07
23:01:21 UTC (rev 11338)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/util/logging/Logger.java 2008-07-07
23:03:03 UTC (rev 11339)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-package org.jboss.portal.presentation.ajax.client.utils.logging;
+package org.jboss.portal.presentation.ajax.client.util.logging;
import java.util.Map;
import java.util.HashMap;