aboutsummaryrefslogtreecommitdiffstats
path: root/samples/src/main
diff options
context:
space:
mode:
authorJulien Dramaix <julien.dramaix@gmail.com>2011-02-24 21:46:35 +0000
committerJulien Dramaix <julien.dramaix@gmail.com>2011-02-24 21:46:35 +0000
commit45de0912002973a5ba43baf88abd5cb042017bb2 (patch)
tree40d95eae0dd6eee932908dc73c6c8ba03a0fb16b /samples/src/main
parentbafd66b4af26fae4940e9b4732195989e340945c (diff)
downloadgwtquery-45de0912002973a5ba43baf88abd5cb042017bb2.tar.gz
gwtquery-45de0912002973a5ba43baf88abd5cb042017bb2.zip
implement Manolo's idea : use with() method to facilitate eclipse auto-completion
Diffstat (limited to 'samples/src/main')
-rw-r--r--samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java b/samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java
index 3ce6f9b3..7ef2ce03 100644
--- a/samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java
+++ b/samples/src/main/java/gwtquery/samples/client/GwtQueryWidgetModule.java
@@ -86,16 +86,15 @@ public class GwtQueryWidgetModule implements EntryPoint {
$("#tabs").as(Widgets).tabPanel();
- // IDE suggestions are not available with this syntax.
+ // IDE suggestions are not available with this syntax. -> I agree
// Also it implies that the css method in GQuery needs more overloads
- $("#aaa").css(CSS.POSITION, Position.ABSOLUTE);
- $("#aaa").css(CSS.TOP, Length.cm(15));
- $("#aaa").css(CSS.BACKGROUND, RGBColor.RED, ImageValue.url(""), BackgroundRepeat.NO_REPEAT, BackgroundAttachment.FIXED, BackgroundPosition.CENTER);
+ // $("#aaa").css(CSS.POSITION, Position.ABSOLUTE);
+ // $("#aaa").css(CSS.TOP, Length.cm(15));
+ // $("#aaa").css(CSS.BACKGROUND, RGBColor.RED, ImageValue.url(""), BackgroundRepeat.NO_REPEAT, BackgroundAttachment.FIXED, BackgroundPosition.CENTER);
- // With this syntax IDE gives more help
- // We could overload the with method in each CssProperty without adding more methods to GQuery
- $("#aaa").css(CSS.TOP.with(Length.cm(15)));
- $("#aaa").css(CSS.BACKGROUND.with(RGBColor.SILVER, ImageValue.url(""), BackgroundRepeat.NO_REPEAT, BackgroundAttachment.FIXED, BackgroundPosition.CENTER));
+ $("#aaa").setCss(CSS.TOP.with(Length.cm(15)));
+ $("#aaa").setCss(CSS.BACKGROUND.with(RGBColor.SILVER, ImageValue.url(""), BackgroundRepeat.NO_REPEAT, BackgroundAttachment.FIXED, BackgroundPosition.CENTER));
+ $("#aaa").setCss(CSS.BACKGROUND_ATTACHMENT.with(BackgroundAttachment.FIXED));
}
private ButtonOptions createButtonOptions(){