Re: Clear Center of a DockLayoutPanel

2011-02-21 Thread redjhawk
I am new in the world of GWT and I haven't used UIBinder yet. But when
I use DockPanelLayout and center must be replaced, the solution I
found on the Internet is overloading DockLayoutPanel and rewriting the
"add" method.

Hope this is useful for you.

public class DockLayoutPanelReplaceable extends DockLayoutPanel {
@Override
public void add(Widget widget) {
if (getCenter() != null) {
   remove(getCenter());
}
super.add(widget);
}
}

-- 
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-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Clear Center of a DockLayoutPanel

2011-02-19 Thread DartmanX
I am trying to determine how to clear out the center of a
DockLayoutPanel (GWT 2.1).

My "main" view will be something like this:


 








I'm using an MVP design and will register event handlers (which will
be delegated to MenuItem Command implementations). However, when
someone chooses an item from the menubar, the contents of the center
need to change.

It's been suggested that I put a DeckPanel in the center, which is
fine, but I don't know how to get the contents to "flip" the deck.

-- 
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-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.