diff options
author | Manolo Carrasco <manolo@apache.org> | 2011-05-02 13:35:25 +0000 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2011-05-02 13:35:25 +0000 |
commit | 1daf614e92cc724b41e9cea01047c4b06c7d7cb3 (patch) | |
tree | c8cefbbe7df8d2fba8cc0334eb2ff8c2f0c020bb | |
parent | 91f1a5911e01fd0cd970fd0743799a40ecf27c4d (diff) | |
download | gwtquery-1daf614e92cc724b41e9cea01047c4b06c7d7cb3.tar.gz gwtquery-1daf614e92cc724b41e9cea01047c4b06c7d7cb3.zip |
Add Float class in order to make gquery compatible with 2.0.0
3 files changed, 9 insertions, 10 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/FloatProperty.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/FloatProperty.java index a6f92e37..33cbfcfa 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/css/FloatProperty.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/css/FloatProperty.java @@ -16,7 +16,6 @@ package com.google.gwt.query.client.css; import com.google.gwt.dom.client.Style; -import com.google.gwt.dom.client.Style.Float; /** * This property specifies whether a box should float to the left, right, or not @@ -37,6 +36,6 @@ public class FloatProperty extends CssProperty<Float> { @Override protected void set(Style s, Float value) { - s.setFloat(value); + s.setProperty(CSS_PROPERTY, value.getCssName()); } } diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java index 9c36d56c..128fd890 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java @@ -96,7 +96,7 @@ public class WidgetsUtils { boolean removed = false; // TODO: handle tables if (parent instanceof HTMLPanel) { - ((HTMLPanel) parent).addAndReplaceElement(newWidget, oldWidget.getElement().<com.google.gwt.dom.client.Element>cast()); + ((HTMLPanel) parent).addAndReplaceElement(newWidget, oldWidget.getElement()); if (!remove) { $(newWidget).before($(oldWidget)); } diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java index 79627094..30137d87 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java @@ -20,7 +20,6 @@ import static com.google.gwt.query.client.GQuery.$; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Cursor; import com.google.gwt.dom.client.Style.Display; -import com.google.gwt.dom.client.Style.Float; import com.google.gwt.dom.client.Style.FontStyle; import com.google.gwt.dom.client.Style.ListStyleType; import com.google.gwt.dom.client.Style.Overflow; @@ -30,11 +29,6 @@ import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.dom.client.Style.VerticalAlign; import com.google.gwt.dom.client.Style.Visibility; import com.google.gwt.junit.client.GWTTestCase; -import com.google.gwt.query.client.css.CSS; -import com.google.gwt.query.client.css.EmptyCellsProperty; -import com.google.gwt.query.client.css.UriValue; -import com.google.gwt.query.client.css.Length; -import com.google.gwt.query.client.css.RGBColor; import com.google.gwt.query.client.css.BackgroundAttachmentProperty.BackgroundAttachment; import com.google.gwt.query.client.css.BackgroundPositionProperty.BackgroundPosition; import com.google.gwt.query.client.css.BackgroundRepeatProperty.BackgroundRepeat; @@ -42,15 +36,22 @@ import com.google.gwt.query.client.css.BorderCollapseProperty.BorderCollapse; import com.google.gwt.query.client.css.BorderSpacingProperty.BorderSpacing; import com.google.gwt.query.client.css.BorderStyleProperty.BorderStyle; import com.google.gwt.query.client.css.BorderWidthProperty.BorderWidth; +import com.google.gwt.query.client.css.CSS; import com.google.gwt.query.client.css.CaptionSideProperty.CaptionSide; import com.google.gwt.query.client.css.ClearProperty.Clear; import com.google.gwt.query.client.css.ClipProperty.Shape; +import com.google.gwt.query.client.css.EmptyCellsProperty; import com.google.gwt.query.client.css.FontSizeProperty.FontSize; import com.google.gwt.query.client.css.FontVariantProperty.FontVariant; +import com.google.gwt.query.client.css.Length; import com.google.gwt.query.client.css.ListStylePositionProperty.ListStylePosition; +import com.google.gwt.query.client.css.RGBColor; import com.google.gwt.query.client.css.TextAlignProperty.TextAlign; import com.google.gwt.query.client.css.TextTransformProperty.TextTransform; import com.google.gwt.query.client.css.UnicodeBidiProperty.UnicodeBidi; +import com.google.gwt.query.client.css.UriValue; +import com.google.gwt.query.client.css.Float; + import com.google.gwt.query.client.css.WhiteSpaceProperty.WhiteSpace; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.RootPanel; @@ -552,7 +553,6 @@ public class GQueryCssTest extends GWTTestCase { public void testFloatProperty() { $(e).html("<div><div id='test'>Content</div></div>"); - $("#test").css(CSS.FLOAT.with(Float.LEFT)); assertEquals("left", $("#test").css("float")); |