• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Layout three GWT panels Horizontally

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
GWT Layout is quit strange for a programmer comming from swing desktop GUI dev. I know GWT Layout rely on browser layout engine which uses html and css to layout objects in browser window.
i'm writing a GWT application . but I run into a dilemma. if i use DockLayoutPanel which uses absolute positioning my Composites are not automatically resized to fit the size of it's children (i need this feature in my app). so i gave up using DockLayoutPanel and used HorizontalPanel and VerticalPanel. but HorizontalPanel doesn’t allow me to stack widgets beside each other then have last right most widgets fill all remaining horizontal space. when i add two panels to a HorizontalPanel i see they are layed out one on the east and one on the west (sse image below). If i use FlowPanel to add these two Panels they stack over each other. these are kinds of GWT UI oddities that i experienced. I want to layout many panels horizontally and want them to be aligned in the right by each other while the last Panel should fill all remaining available horizontal space. by simply adding Panels to a Parent HorizontalPanel i don't get my expected layout. below is a link of a screenshot for my three Panels Layed out by a parent HorizontalPanel. as you can see there is a Blank space separating Panels from each others. how we can work out to make them next to each other without the blank space? .
In fact I'm looking for advice on how to write this GWT Layout code elegantly perhaps using CSS without coding all Layout logic in java /GWT. can you propose some good solutions ?

screenshot is at http://flic.kr/p/94mSnh

thanks
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of using panels, use a FlexTable instead. You can obtain a reference to the FlexCellFormatter to manipulate lots of attributes such as row/col span, v/hor alignment, width etc.
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:Instead of using panels, use a FlexTable instead. You can obtain a reference to the FlexCellFormatter to manipulate lots of attributes such as row/col span, v/hor alignment, width etc.


Hello,
How would you code the editor UI in screeshot using FlexTable?
how to use Flextable to make three cells that fit height of their children widgets automatically. and also fits children widgets width automatically but last cell with TextArea would span to fill all remaining horizontal space.
can you give a hint how to do that with FlexTable?
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
using FlexTable is worse than vertical and Horizontal Panels.

I really tried to figure out how to layout these 3 Forms horizontally and having them resize h/v correctly but I'm stuck now! I have no clue what's ever how to do this Layout using standard GWT.
can someone help on this please?


 
catch it before it slithers away! Oh wait, it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic