]> source.dussan.org Git - gwtquery.git/commitdiff
change visibility of methods so as they are available for external plugins
authorManolo Carrasco <manolo@apache.org>
Mon, 7 Mar 2011 07:23:43 +0000 (07:23 +0000)
committerManolo Carrasco <manolo@apache.org>
Mon, 7 Mar 2011 07:23:43 +0000 (07:23 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java

index eb7cec7ddb5aea9e8d2e5f0f94771fba3167c06b..4590547fc8a6e90afe2991933fab9d3e4f058b78 100644 (file)
@@ -12,7 +12,7 @@ public class WidgetsUtils {
    * @param tagNames
    * @return
    */
-  static boolean matchesTags(Element e, String... tagNames) {
+  public static boolean matchesTags(Element e, String... tagNames) {
 
     assert e != null : "Element cannot be null";
 
@@ -32,11 +32,9 @@ public class WidgetsUtils {
 
   /**
    * replace the <code>oldElement</code> by the <code>newElement</code>
-   * 
-   * @param oldElement
-   * @param newElement
+   * Old element classes will be copied to the new widget.
    */
-   static void replace(Element oldElement, Element newElement) {
+   public static void replace(Element oldElement, Element newElement) {
     assert oldElement != null && newElement != null;
     GQuery.$(oldElement).replaceWith(newElement);
 
@@ -46,7 +44,12 @@ public class WidgetsUtils {
     }
    }
    
-   static void replace(Element e, Widget widget)  {
+   /**
+    * Replace a dom element by a widget.
+    * If the widget implements Attachable the method attach will be called.
+    * Old element classes will be copied to the new widget.
+    */
+   public static void replace(Element e, Widget widget)  {
      assert e != null && widget != null;
      replace(e, widget.getElement());