i am unable to understand the difference between the two.
in which situation which one should be used?
any pros cons?
code http://gwt.google.com/samples/Showcase/Showcase.html#!CwStackPanel and for stacklayoutpanel and description looks same
i am unable to understand the difference between the two.
in which situation which one should be used?
any pros cons?
code http://gwt.google.com/samples/Showcase/Showcase.html#!CwStackPanel and for stacklayoutpanel and description looks same
If you read the javadocs, you'll see that StackPanel only works in quirks mode, and StackLayoutPanel only works in standards mode. They are functionally identical, but you need to choose one or the other depending on what mode your application runs on.
I persistently advocate, after understanding quirkiness of GWT Java and that you need to bear the attitude that you are actually programming in Javascript when programming GWT Java, ...
that the first concept to understand when learning GWT is to understand the purpose and functions of the ProvidesResize/RequiresResize interfaces.
ResizeLayoutPanel inside DisclosurePanel using GWT
GWT or not for enterprise apps
StackLayoutPanel falls into the framework of ProvidesResize/RequiresResize.
If you use non-layoutpanels like StackPanel, you would have to concoct your own resize framework, or at least try to implement these pair of interfaces in them, which could involve scheduling and debouncing actions to provide a pleasant experience to the user.
You can use non-layoutpanels if your UI is simple and does not comprise a complex and deep hierarchy of panels and widgets.
In order to allow the features of layout panels, you would need to place your hosting page on standards mode. Therefore, saying that the difference between layoutpanels and non-layoutpanels is Standards mode is not an accurate picture because you need to know the motivation behind having the ProvidesResize/RequiresResize interfaces.
https://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels#Resize
I guess quirks mode is to allow the browser page to operate in the outdated quirky mode where everybody tried to please everybody's quirky individualistic idea of how HTML should behave (where microsoft was about the most belligerent practitioner of HTML quirks).
What is Standards mode:
https://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels#Standards