I updated DeckLayoutPanel to implement AcceptsOneWidget, and I moved the
animationDuration down from TabLayoutPanel into DeckLayoutPanel so that
setWidget() will automatically use the default animation time.

I went with AcceptsOneWidget instead of HasOneWidget because its
compatible with ActivityManager, and because I didn't want to add
DeckLayoutPanel.getWidget() (getVisibleWidget is more clear).

Also, setWidget(null) clears the current widget.  That seems more
natural than doing a no-op.


http://gwt-code-reviews.appspot.com/1340803/diff/1/12
File user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java
(right):

http://gwt-code-reviews.appspot.com/1340803/diff/1/12#newcode28
user/src/com/google/gwt/user/client/ui/DeckLayoutPanel.java:28: * {@link
com.google.gwt.user.client.ui.TabPanel}.
On 2011/02/02 18:41:20, sbrubaker wrote:
Do you mean TabPanel or TabLayoutPanel?

Done.

http://gwt-code-reviews.appspot.com/1340803/diff/1/21
File user/test/com/google/gwt/user/client/ui/DeckLayoutPanelTest.java
(right):

http://gwt-code-reviews.appspot.com/1340803/diff/1/21#newcode32
user/test/com/google/gwt/user/client/ui/DeckLayoutPanelTest.java:32: //
Show widget at index 1, make sure it becomes visible.
On 2011/02/02 18:41:20, sbrubaker wrote:
You may want to note that you're testing both forms of showWidget
(here and
below).

Done.

http://gwt-code-reviews.appspot.com/1340803/diff/1/22
File user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java
(right):

http://gwt-code-reviews.appspot.com/1340803/diff/1/22#newcode269
user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java:269:
assertEquals("inserted text",
Rietveld has weird highlighting.  There aren't actually any spaces after
the comma.

http://gwt-code-reviews.appspot.com/1340803/diff/1/22#newcode271
user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java:271:
assertEquals("added text",
same

http://gwt-code-reviews.appspot.com/1340803/diff/1/22#newcode416
user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java:416:
p.forceLayout();
If we don't force layout (synchronously), then it happens in a finally
command (asynchronously) after the current event loop, which would
require me to turn this into an asynchronous test with a bunch of nested
DeferredCommands.

http://gwt-code-reviews.appspot.com/1340803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to