You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Noel Grandin <no...@gmail.com> on 2009/08/12 10:44:57 UTC

idea: column and row groups for TablePane

Hi

One feature that I find useful in Swing layouts like MigLayout and
FormLayout is column and row groups.

I.e. each column and/or row can belong to at most one group.
All columns that belong to a given group is assigned the same height
i.e. max preferred height
All rows that belong to a given group are assigned the same width, i.e.
max preferred width

For simplicity, and to prevent conflicting constraints, row and columns
may not belong to more than one group.

For example, this helps some forms look visually better when I'm mixing
various UI controls, because a combobox and a spinner don't always have
the same default height.

Does this sound interesting to people?
Could be a useful addition to TablePane and/or Form.

Regards, Noel.

Re: idea: column and row groups for TablePane

Posted by Noel Grandin <no...@gmail.com>.
Correct.

It shows up most commonly in forms, notably in the 1-3 pixels difference
in height between rows.
Which most people fix by adding insets, which of course breaks as soon
as the default font size changes.

So yeah, it makes sense to only put it into Form.

I'll think about it a little more and put something into JIRA.

Greg Brown wrote:
> OK, that makes sense. And you don't want to hard-code these heights or
> widths, correct? I can understand the desire for such a feature, but
> it feels a bit over-designed for TablePane. I could see adding
> something like this to Form, though.
>


Re: idea: column and row groups for TablePane

Posted by Greg Brown <gk...@mac.com>.
OK, that makes sense. And you don't want to hard-code these heights or  
widths, correct? I can understand the desire for such a feature, but  
it feels a bit over-designed for TablePane. I could see adding  
something like this to Form, though.


On Aug 12, 2009, at 8:01 AM, Noel Grandin wrote:

> Greg Brown wrote:
>> It sounds potentially interesting, but also potentially complicated.
>> If this is the primary use case, I think it may already be addressed
>> with TablePane or BoxPane: TablePane always gives all cells in a row
>> the max. height of the cells, and BoxPane with fill:true does the  
>> same.
>>
>>
> What I'm talking about is the ability to make cells in multiple rows
> have the same height. For example, consider the following form:
>
> Label1......Spinner
> Label2......ComboBox
> Label3......TextArea
>
> For best visual prettiness, we want rows 1 and 2 to be the same  
> height,
> but not row 3 because row 3 contains a very large item.
>
> Similar constraints apply to some form layouts where we want a  
> subset of
> the columns to have the same width.
>
> -- Noel.
>


Re: idea: column and row groups for TablePane

Posted by Noel Grandin <no...@gmail.com>.
Greg Brown wrote:
> It sounds potentially interesting, but also potentially complicated.
> If this is the primary use case, I think it may already be addressed
> with TablePane or BoxPane: TablePane always gives all cells in a row
> the max. height of the cells, and BoxPane with fill:true does the same.
>
>
What I'm talking about is the ability to make cells in multiple rows
have the same height. For example, consider the following form:

Label1......Spinner
Label2......ComboBox
Label3......TextArea

For best visual prettiness, we want rows 1 and 2 to be the same height,
but not row 3 because row 3 contains a very large item.

Similar constraints apply to some form layouts where we want a subset of
the columns to have the same width.

-- Noel.


Re: idea: column and row groups for TablePane

Posted by Greg Brown <gk...@mac.com>.
> For example, this helps some forms look visually better when I'm  
> mixing
> various UI controls, because a combobox and a spinner don't always  
> have
> the same default height.

It sounds potentially interesting, but also potentially complicated.  
If this is the primary use case, I think it may already be addressed  
with TablePane or BoxPane: TablePane always gives all cells in a row  
the max. height of the cells, and BoxPane with fill:true does the same.