You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Greg Brown <gk...@mac.com> on 2010/06/17 21:01:29 UTC
Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
BoxPane does not automatically size its content to fill the available space. For that, you'll either need to set the "fill" style to true on the BoxPane or use a container that does size its content to fill. Maybe TablePane would be a better fit for your use case?
On Jun 17, 2010, at 4:49 PM, aappddeevv wrote:
> Wrote the pivotpad application to test bxml and layout issues that I have been having.
>
> I can get most items to appear as I would expect, however, the one configuration that does not show up is placing a split pane inside a box pane.
>
> So placing:
>
> <SplitPane xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk">
> <left>
> <Label text="Left"/>
> </left>
> <right>
> <Label text="Right"/>
> </right>
> </SplitPane>
>
>
> Inside a box pane
>
> <BoxPane …>
>
> </BoxPane>
>
> programmatically or in bxml does not show the splitpane at all.
>
> What am I doing wrong?
>
RE: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by aappddeevv <aa...@verizon.net>.
It looks like the behavior I was seeing was related to the horizontal and
vertical alignment of the scale decorator. So this is a non-issue. I did not
quite get that on the first reading of the javadoc for ScaleDecorator.
> One think I noticed was that the TableView does not scale with the
> ScaleDecorator. I can scale it up (make it bigger) but below 1.0 scale
> factor (zooming out) it disappears completely from the view. I can attach
> screen shots to show it.
Yes, please - could you file this as a bug? Have you seen this behavior in
any other components?
Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by Greg Brown <gk...@mac.com>.
> I have started browsing through them now that I have a vehicle to display
> the contents more easily. Because of the java-browser problem (had looked at
> that link you had sent but no resolution on the issues I am having) I cannot
> view the examples as intended. But I am popping the wtkx files into my
> pivotpad and getting a very good sense quickly.
Have you looked at the ComponentExplorer app? You may also find that helpful in browsing the properties and capabilities of various components. It lives in the tutorials project.
> One think I noticed was that the TableView does not scale with the
> ScaleDecorator. I can scale it up (make it bigger) but below 1.0 scale
> factor (zooming out) it disappears completely from the view. I can attach
> screen shots to show it.
Yes, please - could you file this as a bug? Have you seen this behavior in any other components?
RE: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by aappddeevv <aa...@verizon.net>.
I have started browsing through them now that I have a vehicle to display
the contents more easily. Because of the java-browser problem (had looked at
that link you had sent but no resolution on the issues I am having) I cannot
view the examples as intended. But I am popping the wtkx files into my
pivotpad and getting a very good sense quickly.
One think I noticed was that the TableView does not scale with the
ScaleDecorator. I can scale it up (make it bigger) but below 1.0 scale
factor (zooming out) it disappears completely from the view. I can attach
screen shots to show it.
-----Original Message-----
From: Greg Brown [mailto:gkbrown@mac.com]
Sent: Thursday, June 17, 2010 7:49 PM
To: user@pivot.apache.org
Subject: Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
Just as an FYI, the Pivot tutorial covers the use of TablePane, BoxPane,
etc. If you haven't had a chance to look at it yet, it might be worth
spending some time reviewing it. Hopefully it will give you a better sense
for what is available and how it can be applied.
G
On Jun 17, 2010, at 9:17 PM, aappddeevv wrote:
> That worked...at least I need to check it more but I am confident in it.
>
> I confused your suggestion with TableView.
>
> I think kept looking at the wrong documentation and scratching my head.
>
>
> -----Original Message-----
> From: Greg Brown [mailto:gkbrown@mac.com]
> Sent: Thursday, June 17, 2010 4:00 PM
> To: user@pivot.apache.org
> Subject: Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
>
>> A DockPane might be a good addition to the family here :-)
>
> Check out TablePane. I think you will find that it does what you need.
>
Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by Greg Brown <gk...@mac.com>.
Just as an FYI, the Pivot tutorial covers the use of TablePane, BoxPane, etc. If you haven't had a chance to look at it yet, it might be worth spending some time reviewing it. Hopefully it will give you a better sense for what is available and how it can be applied.
G
On Jun 17, 2010, at 9:17 PM, aappddeevv wrote:
> That worked...at least I need to check it more but I am confident in it.
>
> I confused your suggestion with TableView.
>
> I think kept looking at the wrong documentation and scratching my head.
>
>
> -----Original Message-----
> From: Greg Brown [mailto:gkbrown@mac.com]
> Sent: Thursday, June 17, 2010 4:00 PM
> To: user@pivot.apache.org
> Subject: Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
>
>> A DockPane might be a good addition to the family here :-)
>
> Check out TablePane. I think you will find that it does what you need.
>
RE: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by aappddeevv <aa...@verizon.net>.
That worked...at least I need to check it more but I am confident in it.
I confused your suggestion with TableView.
I think kept looking at the wrong documentation and scratching my head.
-----Original Message-----
From: Greg Brown [mailto:gkbrown@mac.com]
Sent: Thursday, June 17, 2010 4:00 PM
To: user@pivot.apache.org
Subject: Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
> A DockPane might be a good addition to the family here :-)
Check out TablePane. I think you will find that it does what you need.
Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by Greg Brown <gk...@mac.com>.
> A DockPane might be a good addition to the family here :-)
Check out TablePane. I think you will find that it does what you need.
RE: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by aappddeevv <aa...@verizon.net>.
I had put in fill:true into the boxpane but that did not solve the problem.
I also wrapped the splitpane in a Border and other things but that still did
not make it appear.
A DockPane might be a good addition to the family here :-)
Will look at TablePane.
-----Original Message-----
From: Greg Brown [mailto:gkbrown@mac.com]
Sent: Thursday, June 17, 2010 3:08 PM
To: user@pivot.apache.org
Subject: Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
> BoxPane does not automatically size its content to fill the available
space.
More specifically, by default, a box pane gives each child component its
preferred size. Since SplitPane does not have a preferred size, the box pane
gives it a size of 0x0.
Setting "fill" to true will cause a box pane to stretch its children to fit,
but only in one direction. That's probably not what you want, so a TablePane
is probably a better choice.
Re: SplitPane inside a BoxPane - cannot get SplitPane to appear
Posted by Greg Brown <gk...@mac.com>.
> BoxPane does not automatically size its content to fill the available space.
More specifically, by default, a box pane gives each child component its preferred size. Since SplitPane does not have a preferred size, the box pane gives it a size of 0x0.
Setting "fill" to true will cause a box pane to stretch its children to fit, but only in one direction. That's probably not what you want, so a TablePane is probably a better choice.