Hi Alex,

There is no direct equivalent to BorderLayout in Pivot. However, you should be 
able to use TablePane for this purpose. Create a TablePane with three rows and 
three columns defined as follows:

<columns>
  <TablePane.Column width="-1"/>
  <TablePane.Column width="1*"/>
  <TablePane.Column width="-1"/>
</columns>

<rows>
  <TablePane.Row height="-1">...</TablePane.Row>
  <TablePane.Row height="1*">...</TablePane.Row>
  <TablePane.Row height="-1">...</TablePane.Row>
</rows>

The first and last rows should contain a single component with 
TablePane.columnSpan="3". These represent the "north" and "south" regions. The 
middle row should contain three components for "west", "center", and "east", 
respectively.

I haven't tried this myself so I'm curious to know how it turns out.

G

On Aug 1, 2011, at 12:43 AM, Alex Ryzhov wrote:

> This is my first message to the user group and I'd like to thank the Pivot 
> team for a great Swing successor. Now to the topic:
> 
> It appears that there is no equivalent of BorderLayout in Pivot. I tried 
> BoxPane, TablePane but they aren't equivalent. For example, I'd like 
> component A at the top and B in the center - can't do that. I was able to 
> write my own component which I called FillPane. It accepts 2 children and 
> puts one of them at the specified side (TOP, RIGHT, BOTTOM, or LEFT), and the 
> other one in the center. Using this primitive component I can simulate 
> BorderLayout. Do you think this is something that could make its way into the 
> library?
> 
> Thanks,
> Alex

Reply via email to