BoxPane has a clearly defined purpose and is already known to cause confusion 
for new developers. Adding yet another feature to it is only going to make it 
more difficult to learn. So yes, adding complexity is an argument against 
implementing a particular design.

StackPane stacks components, but only when there is more than one. BoxPane is 
also meant to host multiple components. Scrolling in ScrollPane is optional.

But none of these containers are ideal for this case, which is why a FillPane 
might make sense.


----- Reply message -----
From: "Noel Grandin" <noelgran...@gmail.com>
Date: Wed, Aug 24, 2011 5:11 am
Subject: [jira] [Commented] (PIVOT-790) Add FillPane layout container that acts 
like a BoxPane with fill=true in both directions
To: <dev@pivot.apache.org>
Cc: "Greg Brown" <gk_br...@verizon.net>, "Noel Grandin (JIRA)" <j...@apache.org>



"Adding complexity" is not an argument against adding a new feature. All new 
features add complexity.

The question is "is the complexity justified" and "is it the minimum necessary 
complexity"

I think the complexity is justified and that it is minimised by adding the 
feature to BoxPane, since BoxPane already
implements most of this logic - it really just needs some conditional checks to 
decide how much width/height to work
with i.e. all of it, or just the minimum amount.

StackPane lays things out on top of each other, so it's not appropriate for 
this case, and ScrollPane...... scrolls.

-- Noel.

Greg Brown wrote:
> FWIW, I think overloading BoxPane would add more complexity. I'd prefer 
> either a new component or recommending StackPane or ScrollPane for this use 
> case.
> G
>
> ----- Reply message -----
> From: "Noel Grandin (JIRA)" <j...@apache.org>
> Date: Tue, Aug 23, 2011 3:20 pm
> Subject: [jira] [Commented] (PIVOT-790) Add FillPane layout container that 
> acts like a BoxPane with fill=true in both directions
> To: <dev@pivot.apache.org>
>
>
>     [ 
> https://issues.apache.org/jira/browse/PIVOT-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089678#comment-13089678
>  ] 
>
> Noel Grandin commented on PIVOT-790:
> ------------------------------------
>
> I think we can keep backwards compatibility by making the new setFill(String) 
> method parse "true" and "false".
>
>> Add FillPane layout container that acts like a BoxPane with fill=true in 
>> both directions
>> ----------------------------------------------------------------------------------------
>>
>>                 Key: PIVOT-790
>>                 URL: https://issues.apache.org/jira/browse/PIVOT-790
>>             Project: Pivot
>>          Issue Type: New Feature
>>          Components: wtk
>>    Affects Versions: 2.0.1
>>            Reporter: Roger Whitcomb
>>            Assignee: Roger Whitcomb
>>            Priority: Minor
>>             Fix For: 2.0.1
>>
>>         Attachments: fill.patch, fill_pane_horizontal.jpg, 
>> fill_pane_vertical.jpg
>>
>>   Original Estimate: 2h
>>  Remaining Estimate: 2h
>>
>> Would like to have a FillPane that lays out its components to fill the 
>> available space both horizontally and vertically.  It does have an 
>> orientation (like BoxPane) to specify the direction to lay things out but it 
>> always allows its children to fill up the space.
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>         

Reply via email to