Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion how to resize a DockLayoutPanel pane using gwt 2.0 and uibinder
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jd  
View profile  
 More options Nov 7 2009, 4:08 am
From: jd <jdpatter...@gmail.com>
Date: Sat, 7 Nov 2009 01:08:12 -0800 (PST)
Local: Sat, Nov 7 2009 4:08 am
Subject: Re: how to resize a DockLayoutPanel pane using gwt 2.0 and uibinder
Here is a subclass I made to expose some functionality that might help
you

        class ResizableDockLayoutPanel extends DockLayoutPanel
        {
                public ResizableDockLayoutPanel(Unit unit)
                {
                        super(unit);
                }

                public double getWidgetSize(Widget widget)
                {
                    return ((LayoutData) widget.getLayoutData()).size;
                }

                public void setWidgetSize(Widget widget, double size)
                {
                        ((LayoutData) widget.getLayoutData()).size = size;
                }

                @Override
                public void insert(Widget widget, Direction direction, double size,
Widget before)
                {
                        super.insert(widget, direction, size, before);
                }
        }

On Nov 6, 8:00 pm, gkb <gkb...@gmail.com> wrote:

> Hello all.

> I have a question concerning how to access/modify the size of a
> DockLayoutPanel's widget outside of the *.ui.xml file in the java
> code.

> For instance, say I have a DockLayoutPanel with a West widget and a
> Center widget as follows:
> {{{
> <g:DockLayoutPanel unit='EM'>
>     <g:west size='20'>
>        <layouts:WestWidget ui:field='westWidget' />
>     </g:west>
>     <g:center>
>       <layouts:CenterWidget ui:field='centerWidget' />
>     </g:center>
>   </g:DockLayoutPanel>}}}

> Is it possible to dynamically change the width of the westWidget
> somewhere in the associated java code, or can it only by modified in
> the *.ui.xml file.

> The problem is, I would like to be able to hide/show the westWidget
> and have the centerWidget fill the remaining space dynamically when
> the app is running,
> but changing the width of westWidget in the java code has no effect on
> the width of the West Pane of the DockLayoutPanel that was hard-coded
> in, there is a disconnect between them.

> Any help would be greatly appreciated.

> Sincerely,

> George.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google