--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/miIqFHgBEjMJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Guy
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/yNJ60daUk_sJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
It is not true, gquery can be used in different contexts and does not
break the MVP pattern if you do not want. It is a helper library not a
programming pattern.
In a MVP app you can use it in different ways:
1. you can put any animation, decoration or enhancement in your view
so as the presenter does not matter since you implement correctly the
view interface. For instance you can have a view with just only
text-boxes, then you could enhance those components with the
gquery-enhance plugin changing boxes by slider, color pickers etc, or
you could add gquery animations overriding onAttach, etc.
2. Gquery also helps in a MVP context since you can use it to decouple
parts, and get widget instances anywhere
MyWidget w = $(".gwt-mywidget_class").widget();
- Manolo
>
> Guy
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/yNJ60daUk_sJ.
Gwtquery (GQuery) is NOT JQuery nor needs to import it to work, they
only share the API (syntax and name of methods), so GQuery has been
entirely rewritten taking advance of GWT and reusing as much stuff as
possible from gwt.
So animate() in GQuery has nothing in common with animate in jquery()
(except the name and parameters), the implementation based in the gwt
class Animate, and Easing function has only one method interpolate()
which is used directly by Animation. Take a look to the Easing
interface in gquery which is exactly the same that your Interpolation
interface, in fact we could incorporate these bunch of interpolations
to the project if you authorise it.
http://code.google.com/p/gwtquery/source/browse/trunk/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java#37
>
> 2. Manuel - great respect for GWT-Query - actually the biggest thing i
> find missing in gwt is support for "dom-programming" and lack of built-
> in selector engine. But I agree with Guy that jquery-like syntax is
> not necessarily an advantage :)
gwtquery is a gwt library, it basically introduces many nice things to
the gwt world: css selectors, a lot of useful methods for dom
manipulation, animations, light collections, etc, and the jquery
popular syntax (method chaining).
So if you only need GQuery selectors, you can use them without forcing
your programmers to use jquery syntax, nor any reference to the GQuery
class.
Element context = anyWidget.getElement();
SelectorEngine sel = new SelectorEngine();
NodeList<Element> nodes = sel.select(".mycontainer .gwt-label", context);
The same if you wanted to use Selectors optimized at compile time, etc.
Summarizing take from gquery just what you need, and do not feel
forced to use jquery-like syntax nor any programming pattern. Like
with any other library, the gwt compiler will do its work not
including in your javascript anything you do not use.
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/JZojg4ekSM4J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
- Your example passing a gwt UI component
import static com.google.gwt.query.client.GQuery.$;
$(yourGWTUIElement).fadeIn(1300);
- More examples using selectors and type-safe constants
$(".gwt-label").fadeIn(Speed.SLOW);
$(".gwt-label").css("vertical-align", "middle").delay(1000).fadeIn(Speed.FAST);
$(".gwt-button").css(CSS.VERTICAL_ALIGN.with(VerticalAlign.MIDDLE));
Enjoy gquery :-)
- Manolo
2011/8/22 Dimitrijević Ivan <dim...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.