Collapsible Component in GWT2.4

396 views
Skip to first unread message

vaibhav jain

unread,
Jan 19, 2012, 9:10:14 AM1/19/12
to google-we...@googlegroups.com
Hello Experts,


Actually i want to use a Panel in GWT 2.4 ,which can be collapsed towards left.

I am making a Menutree on the left of the screen and will display the item on the right side of the screen which is selected by MenuTree,I want to put this MenuTree in a Panel which can be collapsed towards left when clicking some thing so that item in right panel can take full space of screen.

Can any one tell me to use Collapsible Component available at:

http://code.google.com/p/google-web-toolkit-incubator/source/browse/trunk/src/com/google/gwt/widgetideas/client/CollapsiblePanel.java?r=1723
I have made the classes as given in above link,i just want to do  the task by these classes.


--
vaibhav jain.

Thomas Broyer

unread,
Jan 19, 2012, 11:33:53 AM1/19/12
to google-we...@googlegroups.com
I think the "recommended" way to do this in GWT 2.0+ is to use a DockLayoutPanel or a LayoutPanel and use setWidgetSize (or setWidgetLeftWidth in a LayoutPanel) to resize it dynamically (and benefit from a smooth animation).

(oh, just noticed this is what's suggested on the GWT-Incubator home page: http://code.google.com/p/google-web-toolkit-incubator/ )

vaibhav jain

unread,
Jan 19, 2012, 1:16:15 PM1/19/12
to google-we...@googlegroups.com
Hi,,
     Thanks for your reply,Can you explain little more how to resize layout panel dynamically to achieve the task as i m very new to GWT.I need to collapse the left panel towards left.

On Thu, Jan 19, 2012 at 10:03 PM, Thomas Broyer <t.br...@gmail.com> wrote:
I think the "recommended" way to do this in GWT 2.0+ is to use a DockLayoutPanel or a LayoutPanel and use setWidgetSize (or setWidgetLeftWidth in a LayoutPanel) to resize it dynamically (and benefit from a smooth animation).

(oh, just noticed this is what's suggested on the GWT-Incubator home page: http://code.google.com/p/google-web-toolkit-incubator/ )

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/AWuBKFhUgTQJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
vaibhav jain.

Andrea Boscolo

unread,
Jan 20, 2012, 3:51:10 AM1/20/12
to google-we...@googlegroups.com
For an example, check the third comment (from Mauro) on https://groups.google.com/forum/#!topic/google-web-toolkit/C6S4jS1UsM0/discussion and see if it fits you needs. The sample is beyond simple layouting but you can find the collapsing/resizing logic you are looking for in the AppLayoutImpl class.
Reply all
Reply to author
Forward
0 new messages