Hi Paul, ULCBoxPane is a simpler version of ULCGridBagLayoutPane.
The components are added from left to right. If number of columns for the boxpane are not specied then all components are laid out in one row. If the number of columns for the boxpane are specified then the row and column of the next component to be added are determined by division (row = fColumns != 0 ? fNextIndex / fColumns : 0) and mod (column = fColumns != 0 ? fNextIndex % fColumns : fNextIndex) operation respectively on the specified column by the index of the next cell. If horizontal span is specified then the next index is incremented by that many cells. verticalSpan cannot be specified for the add operation because it will make the computation of next available cell difficult. >Is there an easy way of implementing this? How can I give a component a certain row span? You can use set() method to specify vertical and horizontal spans and use the above formulae to calculate row and column indices. However, since you will be specifying the spans, you will know which cells will be occupied and thus adjust the next cell co-ordinates to avoid overlaps. Thanks and regards, Janak ----------------------------------------- Janak Mulani email: [EMAIL PROTECTED] url: http://www.canoo.com <http://www.canoo.com/> Beyond AJAX - Java Rich Internet Applications http://www.canoo.com/ulc ----------------------------------------- ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Harrison Sent: Wednesday, July 23, 2008 2:32 AM To: [email protected] Subject: [ULC-developer] ULCBoxLayout Hi All I have been developing a dynamic GUI where I only know the layout of the items at run time. Up until now I have been using the GridBagLayout and getting my users (other developers) to specify X and Y coordinates, horizontal and vertical spanning, weights etc. I have had to move from the GridBagLayout to specifying a Grid for the layout of the items. SWT implements a GridData where items will be added to a grid without specifying x or y coordinates, and it allows the addition of spanning parameter. I have been checking out the ULCBoxPane and it should allow me to do exactly what I want, but the add(.) method only allows me to add a horizontal span. I need to be able to add an item to the layout giving its column & row span, their weights and the item. Is there an easy way of implementing this? How can I give a component a certain row span? Paul Harrison _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
