You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2009/07/02 08:07:58 UTC

FlowLayout equivalent

Guys,
Is there a FlowLayout equivalent in the works, planned or equivalent?

It is a bit confusing that the FlowPane is the BoxLayout equivalent,
but I guess that is too late to change...


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: FlowLayout equivalent

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Mon, Jul 6, 2009 at 6:03 AM, Greg Brown<gk...@mac.com> wrote:
> I agree. I would prefer to front-load as many API changes as we can into
> Pivot 1.3, since we have already made a pretty significant API change by
> changing pivot.* to org.apache.pivot.*.

Good Point!!!


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: FlowLayout equivalent

Posted by Greg Brown <gk...@mac.com>.
I agree. I would prefer to front-load as many API changes as we can  
into Pivot 1.3, since we have already made a pretty significant API  
change by changing pivot.* to org.apache.pivot.*.


On Jul 5, 2009, at 9:15 AM, Todd Volkert wrote:

> My own personal feeling is that while in incubation, we can be more  
> loose
> with API changes.  Once we graduate, then we should adhere to a much
> stricter policy with regards to API changes and maintaining backward
> compatibility.
> The trick is: how can we know how many people are using Pivot on real
> projects?
>
> -T
>
> On Sun, Jul 5, 2009 at 3:07 AM, Niclas Hedhman <ni...@hedhman.org>  
> wrote:
>
>> On Sat, Jul 4, 2009 at 3:42 AM, Todd Volkert<tv...@gmail.com>  
>> wrote:
>>> I agree.  Moving FlowPane to BoxPane, and creating FlowPane a-la
>> FlowLayout
>>> would make things simpler.  And I do think the need for wrapping  
>>> in this
>>> fashion is a valid use case that should be supported by the  
>>> platform.
>>
>> Are you sure you want this big incompatible change?
>>
>> It would be good to know how many people are actually picking up  
>> Pivot
>> so far. If they are few enough, consensus to these kind of changes  
>> are
>> typically easy to get, as bleeding edge developers seems very  
>> tolerant
>> and agreeable compared to the lazy masses.... (I hate ants on my
>> desk!!!)
>>
>> Another alternative would be to have a wrapping mode on FlowPane,
>> which defaults to current behavior.
>>
>>
>> My attempt on trying to implement this, shows how terrible an UI
>> programmer I really am, or should I say how little I enjoy it and the
>> tediousness to I feel.
>>
>>
>> Cheers
>> --
>> Niclas Hedhman, Software Developer
>> http://www.qi4j.org - New Energy for Java
>>
>> I  live here; http://tinyurl.com/2qq9er
>> I  work here; http://tinyurl.com/2ymelc
>> I relax here; http://tinyurl.com/2cgsug
>>


Re: FlowLayout equivalent

Posted by Todd Volkert <tv...@gmail.com>.
My own personal feeling is that while in incubation, we can be more loose
with API changes.  Once we graduate, then we should adhere to a much
stricter policy with regards to API changes and maintaining backward
compatibility.
The trick is: how can we know how many people are using Pivot on real
projects?

-T

On Sun, Jul 5, 2009 at 3:07 AM, Niclas Hedhman <ni...@hedhman.org> wrote:

> On Sat, Jul 4, 2009 at 3:42 AM, Todd Volkert<tv...@gmail.com> wrote:
> > I agree.  Moving FlowPane to BoxPane, and creating FlowPane a-la
> FlowLayout
> > would make things simpler.  And I do think the need for wrapping in this
> > fashion is a valid use case that should be supported by the platform.
>
> Are you sure you want this big incompatible change?
>
> It would be good to know how many people are actually picking up Pivot
> so far. If they are few enough, consensus to these kind of changes are
> typically easy to get, as bleeding edge developers seems very tolerant
> and agreeable compared to the lazy masses.... (I hate ants on my
> desk!!!)
>
> Another alternative would be to have a wrapping mode on FlowPane,
> which defaults to current behavior.
>
>
> My attempt on trying to implement this, shows how terrible an UI
> programmer I really am, or should I say how little I enjoy it and the
> tediousness to I feel.
>
>
> Cheers
> --
> Niclas Hedhman, Software Developer
> http://www.qi4j.org - New Energy for Java
>
> I  live here; http://tinyurl.com/2qq9er
> I  work here; http://tinyurl.com/2ymelc
> I relax here; http://tinyurl.com/2cgsug
>

Re: FlowLayout equivalent

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Sat, Jul 4, 2009 at 3:42 AM, Todd Volkert<tv...@gmail.com> wrote:
> I agree.  Moving FlowPane to BoxPane, and creating FlowPane a-la FlowLayout
> would make things simpler.  And I do think the need for wrapping in this
> fashion is a valid use case that should be supported by the platform.

Are you sure you want this big incompatible change?

It would be good to know how many people are actually picking up Pivot
so far. If they are few enough, consensus to these kind of changes are
typically easy to get, as bleeding edge developers seems very tolerant
and agreeable compared to the lazy masses.... (I hate ants on my
desk!!!)

Another alternative would be to have a wrapping mode on FlowPane,
which defaults to current behavior.


My attempt on trying to implement this, shows how terrible an UI
programmer I really am, or should I say how little I enjoy it and the
tediousness to I feel.


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: FlowLayout equivalent

Posted by Todd Volkert <tv...@gmail.com>.
I agree.  Moving FlowPane to BoxPane, and creating FlowPane a-la FlowLayout
would make things simpler.  And I do think the need for wrapping in this
fashion is a valid use case that should be supported by the platform.
-T

On Thu, Jul 2, 2009 at 9:41 PM, Greg Brown <gk...@mac.com> wrote:

> Now that I think about it, this does raise the question of, given a
> horizontal flow pane, what a combination of wrap = true and any vertical
> alignment might mean (and vice versa for vertical flow panes). If the flow
> pane did need to wrap, how would the components be vertically aligned? They
> could be aligned within the row, but that seems a bit over-designed,
> especially for justify alignments - do all components get the same height,
> or the max height of all components in a given row? Confusing.
>
> AWT's FlowLayout avoids this by only supporting baseline alignment. Does it
> make sense to rename FlowPane to BoxPane and create a new FlowPane that
> adheres more closely to FlowLayout behavior? Turning baseline alignment
> on/off could be managed by a (boolean) style property (which means that we
> might not need to add this to the VerticalAlignment enum).
>
> Thoughts?
>
>
>
> On Jul 2, 2009, at 8:43 PM, Greg Brown wrote:
>
>  So are you looking for wrapping behavior? This is something we have talked
>> about adding - if you want, I'll create a JIRA ticket for it and try to get
>> it in for 1.3. I have some FlowPane updates on my TODO list for 1.3.1
>> already - I could just batch them up and shoot for 1.3 instead.
>>
>>
>> On Jul 2, 2009, at 10:25 AM, Niclas Hedhman wrote:
>>
>>  Basically, I have a 'toolbox' of icons, think drawing tools in Photoshop.
>>> The tools are dynamic, so adding and removing should not leave an 'empty'
>>> slot, and the toolbox is resizable so the 'flow' should basically be like
>>> words in a paragraph. The horizontal/vertical constraint gives far too
>>> much
>>> manual tossing around in client code.
>>>
>>> I am working on an implementation, gopefully done by tomorrow...
>>>
>>> Cheers
>>> Niclas
>>>
>>> On Jul 2, 2009 8:21 PM, "Greg Brown" <gk...@mac.com> wrote:
>>>
>>> I think FlowPane is probably what you are looking for. Is there a
>>> particular
>>> layout you are trying to achieve that you have been unable to accomplish
>>> with FlowPane?
>>>
>>> On Jul 2, 2009, at 2:07 AM, Niclas Hedhman wrote: > Guys, > Is there a
>>> FlowLayout equivalent in t...
>>>
>>
>>
>

Re: FlowLayout equivalent

Posted by Greg Brown <gk...@mac.com>.
Now that I think about it, this does raise the question of, given a  
horizontal flow pane, what a combination of wrap = true and any  
vertical alignment might mean (and vice versa for vertical flow  
panes). If the flow pane did need to wrap, how would the components be  
vertically aligned? They could be aligned within the row, but that  
seems a bit over-designed, especially for justify alignments - do all  
components get the same height, or the max height of all components in  
a given row? Confusing.

AWT's FlowLayout avoids this by only supporting baseline alignment.  
Does it make sense to rename FlowPane to BoxPane and create a new  
FlowPane that adheres more closely to FlowLayout behavior? Turning  
baseline alignment on/off could be managed by a (boolean) style  
property (which means that we might not need to add this to the  
VerticalAlignment enum).

Thoughts?


On Jul 2, 2009, at 8:43 PM, Greg Brown wrote:

> So are you looking for wrapping behavior? This is something we have  
> talked about adding - if you want, I'll create a JIRA ticket for it  
> and try to get it in for 1.3. I have some FlowPane updates on my  
> TODO list for 1.3.1 already - I could just batch them up and shoot  
> for 1.3 instead.
>
>
> On Jul 2, 2009, at 10:25 AM, Niclas Hedhman wrote:
>
>> Basically, I have a 'toolbox' of icons, think drawing tools in  
>> Photoshop.
>> The tools are dynamic, so adding and removing should not leave an  
>> 'empty'
>> slot, and the toolbox is resizable so the 'flow' should basically  
>> be like
>> words in a paragraph. The horizontal/vertical constraint gives far  
>> too much
>> manual tossing around in client code.
>>
>> I am working on an implementation, gopefully done by tomorrow...
>>
>> Cheers
>> Niclas
>>
>> On Jul 2, 2009 8:21 PM, "Greg Brown" <gk...@mac.com> wrote:
>>
>> I think FlowPane is probably what you are looking for. Is there a  
>> particular
>> layout you are trying to achieve that you have been unable to  
>> accomplish
>> with FlowPane?
>>
>> On Jul 2, 2009, at 2:07 AM, Niclas Hedhman wrote: > Guys, > Is  
>> there a
>> FlowLayout equivalent in t...
>


Re: FlowLayout equivalent

Posted by Greg Brown <gk...@mac.com>.
So are you looking for wrapping behavior? This is something we have  
talked about adding - if you want, I'll create a JIRA ticket for it  
and try to get it in for 1.3. I have some FlowPane updates on my TODO  
list for 1.3.1 already - I could just batch them up and shoot for 1.3  
instead.


On Jul 2, 2009, at 10:25 AM, Niclas Hedhman wrote:

> Basically, I have a 'toolbox' of icons, think drawing tools in  
> Photoshop.
> The tools are dynamic, so adding and removing should not leave an  
> 'empty'
> slot, and the toolbox is resizable so the 'flow' should basically be  
> like
> words in a paragraph. The horizontal/vertical constraint gives far  
> too much
> manual tossing around in client code.
>
> I am working on an implementation, gopefully done by tomorrow...
>
> Cheers
> Niclas
>
> On Jul 2, 2009 8:21 PM, "Greg Brown" <gk...@mac.com> wrote:
>
> I think FlowPane is probably what you are looking for. Is there a  
> particular
> layout you are trying to achieve that you have been unable to  
> accomplish
> with FlowPane?
>
> On Jul 2, 2009, at 2:07 AM, Niclas Hedhman wrote: > Guys, > Is there a
> FlowLayout equivalent in t...


Re: FlowLayout equivalent

Posted by Niclas Hedhman <ni...@hedhman.org>.
Basically, I have a 'toolbox' of icons, think drawing tools in Photoshop.
The tools are dynamic, so adding and removing should not leave an 'empty'
slot, and the toolbox is resizable so the 'flow' should basically be like
words in a paragraph. The horizontal/vertical constraint gives far too much
manual tossing around in client code.

I am working on an implementation, gopefully done by tomorrow...

Cheers
Niclas

On Jul 2, 2009 8:21 PM, "Greg Brown" <gk...@mac.com> wrote:

I think FlowPane is probably what you are looking for. Is there a particular
layout you are trying to achieve that you have been unable to accomplish
with FlowPane?

On Jul 2, 2009, at 2:07 AM, Niclas Hedhman wrote: > Guys, > Is there a
FlowLayout equivalent in t...

Re: FlowLayout equivalent

Posted by Greg Brown <gk...@mac.com>.
I think FlowPane is probably what you are looking for. Is there a  
particular layout you are trying to achieve that you have been unable  
to accomplish with FlowPane?

On Jul 2, 2009, at 2:07 AM, Niclas Hedhman wrote:

> Guys,
> Is there a FlowLayout equivalent in the works, planned or equivalent?
>
> It is a bit confusing that the FlowPane is the BoxLayout equivalent,
> but I guess that is too late to change...
>
>
> Cheers
> -- 
> Niclas Hedhman, Software Developer
> http://www.qi4j.org - New Energy for Java
>
> I  live here; http://tinyurl.com/2qq9er
> I  work here; http://tinyurl.com/2ymelc
> I relax here; http://tinyurl.com/2cgsug