How do I set the border around elements in a DockLayoutPanel?

345 views
Skip to first unread message

Greg Dougherty

unread,
Aug 12, 2010, 1:09:00 PM8/12/10
to Google Web Toolkit
The topic pretty much says it all. I know how to do this for a
DockPanel. How do I do it for a DockLayoutPanel?

Yes, I know, "use uibinder". That doesn't work when you're building
things grammatically, which is what I'm doing.

BTW, why don't the Showcase application use ANY *LayoutPanels? I
thought they were supposed to be the preferred way to do things, no?

Greg

dane.molotok

unread,
Aug 12, 2010, 1:59:52 PM8/12/10
to Google Web Toolkit
How did you do it with a DockPanel? Wouldn't you want to style the
elements you've placed in the panel? So it shouldn't matter if it's a
DockPanel or a DockLayoutPanel.

On Aug 12, 12:09 pm, Greg Dougherty <dougherty.greg...@mayo.edu>
wrote:

Greg Dougherty

unread,
Aug 12, 2010, 2:50:31 PM8/12/10
to Google Web Toolkit
With a DockPanel I just create a CSS style, and apply it to the
Panel. I did that with a DockLayoutPanel, and nothing seemed to
happen. I searched the archives of this group for CSS and
DockLayoutPanel, and the concolusion I came to is that CSS doesn't
work with DLPs. If that's not correct, I'd love to hear it, and see
an example of how to do it correctly.

Presumably the people writing GWT actually test the features they put
in it. Given the paucity of example code, this belief has to remain
merely an assumption. :-(

Greg

cokol

unread,
Aug 13, 2010, 7:08:44 AM8/13/10
to Google Web Toolkit
wrap you panel into DecoratorPanel then you can use 9box round corners

Greg Dougherty

unread,
Aug 13, 2010, 1:07:43 PM8/13/10
to Google Web Toolkit
Thanks, but it's not the panel I want to decorate, it's the elements
within the panel (i.e. I want to put a box around Center).

cokol

unread,
Aug 13, 2010, 2:52:11 PM8/13/10
to Google Web Toolkit
then do the same - use the decoratorpanel as container for elements
where you want to have corners, u might also want to create a
composite having decoratorpanel wrapping elements...

PhilBeaudoin

unread,
Aug 14, 2010, 8:53:55 PM8/14/10
to Google Web Toolkit
I haven't tried this, but you could try to put a LayoutPanel in each
the DockLayoutPanel side you want to style, then style that
LayoutPanel and add any other widget inside this LayoutPanel.

Thomas Broyer

unread,
Aug 15, 2010, 10:29:36 AM8/15/10
to Google Web Toolkit


On 12 août, 19:09, Greg Dougherty <dougherty.greg...@mayo.edu> wrote:
> The topic pretty much says it all.  I know how to do this for a
> DockPanel.  How do I do it for a DockLayoutPanel?
>
> Yes, I know, "use uibinder".  That doesn't work when you're building
> things grammatically, which is what I'm doing.

I believe getWidgetContainerElement() is designed for this kind of use
cases.

> BTW, why don't the Showcase application use ANY *LayoutPanels?  I
> thought they were supposed to be the preferred way to do things, no?

It doesn't use UiBinder either, because both have been added to GWT
long after the Showcase sample was created. The Mail sample has been
updated to use layout panels though if you want to see some example.
Showcase also (still) demonstrates the "old" DockPanel/StackPanel/
SplitPanel/etc. which should use "quirks mode", whereas layout panels
should use "standards mode". I guess someone should revisit the
sample, but it takes time, and having Cell widgets, RequestFactory,
Activities, etc. ready are probably higher priority (and should IMO
be).

Greg Dougherty

unread,
Aug 18, 2010, 1:02:35 PM8/18/10
to Google Web Toolkit
I humbly disagree. You haven't added a feature to your product until
people can actually USE it. On something like this, that means adding
example code and samples showing how it should be used.

One hopes that the people building the features have such code, as
test cases if nothing else. I certainly can't find it, either on the
web site, or in the checked-in project available via SVN.

Seriously: If you were writing DockLayoutPanel, wouldn't one of your
test cases be "Make sure DockLayoutPanel can do everything that
DockPanel does in Showcase"?

Having done that, wouldn't you want your test code added to Showcase,
so potential users could see how to use your shiny new widget?

I'm writing a brand new GWT 2.0 app. And I'm writing it in Quirks
mode, using the non-LayoutPanel panels, because they WORK, and I don't
have the time to waste to try to figure out how to get the
*LayoutPanels to behave. I'm guessing I'm not the only person in that
situation.

On Aug 15, 9:29 am, Thomas Broyer <t.bro...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages