]> source.dussan.org Git - gwtquery.git/commitdiff
adding innerWidth and innerHeight methods and deprecating contentWidth and contentHei...
authorManolo Carrasco <manolo@apache.org>
Sun, 23 Jan 2011 21:27:35 +0000 (21:27 +0000)
committerManolo Carrasco <manolo@apache.org>
Sun, 23 Jan 2011 21:27:35 +0000 (21:27 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java

index ba00f65ac9a620f813d8d6572e2150924a76ca6d..1576f622a1d24c84442c3d119704f32ce99d80da 100644 (file)
@@ -859,19 +859,19 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
   }\r
 \r
   /**\r
-   * Returns the inner height of the first matched element, including padding\r
-   * but not the vertical scrollbar height, border, or margin.\r
+   * @deprecated use innerHeight()\r
    */\r
+  @Deprecated\r
   public int clientHeight() {\r
-    return get(0).getClientHeight();\r
+    return innerHeight();\r
   }\r
 \r
   /**\r
-   * Returns the inner width of the first matched element, including padding\r
-   * but not the vertical scrollbar width, border, or margin.\r
+   * @deprecated use innerWidth()\r
    */\r
+  @Deprecated\r
   public int clientWidth() {\r
-    return get(0).getClientWidth();\r
+    return innerWidth();\r
   }\r
 \r
   /**\r
@@ -1367,6 +1367,22 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
     return -1;\r
   }\r
 \r
+  /**\r
+   * Returns the inner height of the first matched element, including padding\r
+   * but not the vertical scrollbar height, border, or margin.\r
+   */\r
+  public int innerHeight() {\r
+    return get(0).getClientHeight();\r
+  }\r
+\r
+  /**\r
+   * Returns the inner width of the first matched element, including padding\r
+   * but not the vertical scrollbar width, border, or margin.\r
+   */\r
+  public int innerWidth() {\r
+    return get(0).getClientWidth();\r
+  }\r
+  \r
   /**\r
    * Insert all of the matched elements after another, specified, set of\r
    * elements.\r
index baf0a6805d2dd7c50724362b24804da8a7759504..53b19a47a2c27669540653643e287066eb261622 100644 (file)
@@ -251,14 +251,12 @@ public interface LazyGQuery<T> extends LazyBase<T>{
   LazyGQuery<T> click(Function...f);
 
   /**
-   * Returns the inner height of the first matched element, including padding
-   * but not the vertical scrollbar height, border, or margin.
+   * @deprecated use innerHeight()
    */
   int clientHeight();
 
   /**
-   * Returns the inner width of the first matched element, including padding
-   * but not the vertical scrollbar width, border, or margin.
+   * @deprecated use innerWidth()
    */
   int clientWidth();
 
@@ -549,6 +547,18 @@ public interface LazyGQuery<T> extends LazyBase<T>{
    */
   int index(Element element);
 
+  /**
+   * Returns the inner height of the first matched element, including padding
+   * but not the vertical scrollbar height, border, or margin.
+   */
+  int innerHeight();
+
+  /**
+   * Returns the inner width of the first matched element, including padding
+   * but not the vertical scrollbar width, border, or margin.
+   */
+  int innerWidth();
+
   /**
    * Insert all of the matched elements after another, specified, set of
    * elements.