Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

TableWrapLayout

TableWrapLayout is a grid-based layout very similar to SWT's versatile GridLayout. It differs from GridLayout in that it uses a layout algorithm that works more like HTML tables. It tries to respect the provided client area width and grows vertically to compensate.

There are many similarities between GridLayout and TableWrapLayout. Both organize children in grids. Both have layout data that instructs the layout how to treat each control. Both can accept hints on which control should grab excess space, etc.

However, they fundamentally differ in the approach to the layout. TableWrapLayout starts with columns. It computes minimal, preferred and maximum widths of each column and uses this information to assign excess space. It also tries to be fair when dividing space across columns so that there is no excess wrapping of some controls.

It is possible to mix GridLayout and TableWrapLayout but the branch where GridLayout is used is the one where wrapping stops. This is quite acceptable if you don't want it to wrap (if the composite contains controls that cannot wrap anyway, like text, buttons, trees etc.). However, you should have an unbroken path of TableWrapLayouts from the form body to each text control that needs to wrap.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire