You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Jérôme Serré <je...@gmail.com> on 2010/10/11 17:07:02 UTC
Component size
Hello,
I probably have an error in the file wtkx but I cannot see it.
Maybe someone could help me.
I would like the TableView is not fixed but it fills the entire horizontal
space, whatever the size of the browser.
You can see it at : http://85.216.59.161:8000/cave2/principale.jsp
Thank you for your help.
Jérôme
<?xml version="1.0" encoding="ISO-8859-1"?>
<Window title="Principale" maximized="true"
xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns:content="org.apache.pivot.wtk.content"
xmlns="org.apache.pivot.wtk">
<content>
<Border styles="{padding:0}">
<content>
<Border styles="{padding:0, color:'#DDDCD5',
thickness:7}">
<content>
<TablePane wtkx:id="tableau"
styles="{verticalSpacing:1,
showHorizontalGridLines:false,
horizontalSpacing:1,
showVerticalGridLines:false}">
<columns>
<TablePane.Column width="1*"/>
</columns>
<rows>
<TablePane.Row height="-1">
<wtkx:include
wtkx:id="menuPrincipale" src="menuPrincipale.wtkx"/>
</TablePane.Row>
<TablePane.Row height="-1">
../..
</TablePane.Row>
<TablePane.Row height="1*">
<Border styles="{padding:5}">
<content>
<BoxPane
orientation="horizontal" styles="{fill:true}">
<Border
title="Critères de recherche" styles="{padding:10}">
<content>
../..
</content>
</Border>
<Border
title="Résultat" styles="{padding:10}">
<content>
<Border
styles="{padding:0}">
<content>
<ScrollPane
horizontalScrollBarPolicy="fill_to_capacity"
verticalScrollBarPolicy="fill_to_capacity"
preferredWidth="700">
<view>
<TableView wtkx:id="table">
<columns>
<TableView.Column name="pays" headerData="Pays" minimumWidth="50"
width="1*">
<cellRenderer>
<content:TableViewImageCellRenderer/>
</cellRenderer>
</TableView.Column>
<TableView.Column name="appellation" minimumWidth="170" width="3*"
headerData="Appellation"/>
<TableView.Column name="nom" minimumWidth="170" width="3*"
headerData="Nom"/>
<TableView.Column name="millesime" minimumWidth="60" width="2*"
headerData="Millésime"/>
<TableView.Column name="couleur" headerData="Couleur" minimumWidth="50"
width="2*">
<cellRenderer>
<content:TableViewImageCellRenderer/>
</cellRenderer>
</TableView.Column>
<TableView.Column name="boire" headerData="A boire" minimumWidth="80"
width="2*"/>
</columns>
</TableView>
</view>
<columnHeader>
<TableViewHeader tableView="$table" sortMode="single_column"/>
</columnHeader>
</ScrollPane>
</content>
</Border>
</content>
</Border>
</BoxPane>
</content>
</Border>
</TablePane.Row>
</rows>
</TablePane>
</content>
</Border>
</content>
</Border>
</content>
</Window>
--
Cordialement
Jérôme Serré
RE: Component size
Posted by Jérôme Serré <je...@gmail.com>.
I suspected :)
It's ok. Thank you very much.
Jérôme
-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com]
Envoyé : lundi 11 octobre 2010 19:08
À : user@pivot.apache.org
Objet : Re: Component size
Sorry - should have mentioned that. You put it on the component itself, not
the row:
<TablePane.Row>
<Foo TablePane.columnSpan="2"/>
</TablePane.Row>
On Oct 11, 2010, at 12:40 PM, Jérôme Serré wrote:
> Thank you,
> It seems to be work but I don't know where and how put the [rowSpan="2"]
> This doesn't work : <TablePane.Row height="-1" rowSpan="2">
>
> Jérôme
>
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com]
> Envoyé : lundi 11 octobre 2010 17:40
> À : user@pivot.apache.org
> Objet : Re: Component size
>
> I think the problem is your use of a BoxPane as the TableView's ancestor.
A
> horizontal box pane only fills in the vertical direction, and you need to
> fill horizontally.
>
> Instead of a BoxPane, I would suggest using a TablePane. You might be able
> to re-use your existing table pane by adding another column (and setting
the
> column span of the first two rows to 2), or you could just replace the box
> pane with a table pane.
>
> Hope this helps,
> Greg
>
> On Oct 11, 2010, at 11:07 AM, Jérôme Serré wrote:
>
>> Hello,
>>
>> I probably have an error in the file wtkx but I cannot see it.
>> Maybe someone could help me.
>> I would like the TableView is not fixed but it fills the entire
> horizontal
>> space, whatever the size of the browser.
>>
>> You can see it at : http://85.216.59.161:8000/cave2/principale.jsp
>>
>>
>>
>> Thank you for your help.
>>
>> Jérôme
>>
>>
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>
>> <Window title="Principale" maximized="true"
>>
>> xmlns:wtkx="http://pivot.apache.org/wtkx"
>>
>> xmlns:content="org.apache.pivot.wtk.content"
>>
>> xmlns="org.apache.pivot.wtk">
>>
>> <content>
>>
>> <Border styles="{padding:0}">
>>
>> <content>
>>
>> <Border styles="{padding:0, color:'#DDDCD5',
>> thickness:7}">
>>
>> <content>
>>
>> <TablePane wtkx:id="tableau"
>> styles="{verticalSpacing:1,
>>
>> showHorizontalGridLines:false,
>> horizontalSpacing:1,
>>
>> showVerticalGridLines:false}">
>>
>> <columns>
>>
>> <TablePane.Column width="1*"/>
>>
>> </columns>
>>
>> <rows>
>>
>> <TablePane.Row height="-1">
>>
>> <wtkx:include
>> wtkx:id="menuPrincipale" src="menuPrincipale.wtkx"/>
>>
>> </TablePane.Row>
>>
>> <TablePane.Row height="-1">
>>
>> ../..
>>
>> </TablePane.Row>
>
>>
>> <TablePane.Row height="1*">
>>
>> <Border styles="{padding:5}">
>>
>> <content>
>>
>> <BoxPane
>> orientation="horizontal" styles="{fill:true}">
>>
>> <Border
>> title="Critères de recherche" styles="{padding:10}">
>>
>> <content>
>>
>> ../..
>>
>> </content>
>>
>> </Border>
>>
>> <Border
>> title="Résultat" styles="{padding:10}">
>>
>> <content>
>>
>> <Border
>> styles="{padding:0}">
>>
>> <content>
>>
>> <ScrollPane
>> horizontalScrollBarPolicy="fill_to_capacity"
>> verticalScrollBarPolicy="fill_to_capacity"
>>
>>
>> preferredWidth="700">
>>
>> <view>
>
>>
>>
>> <TableView wtkx:id="table">
>>
>>
>> <columns>
>>
>>
>> <TableView.Column name="pays" headerData="Pays" minimumWidth="50"
>> width="1*">
>>
>>
>> <cellRenderer>
>>
>>
>> <content:TableViewImageCellRenderer/>
>>
>>
>> </cellRenderer>
>>
>>
>> </TableView.Column>
>>
>>
>> <TableView.Column name="appellation" minimumWidth="170" width="3*"
>> headerData="Appellation"/>
>>
>>
>> <TableView.Column name="nom" minimumWidth="170" width="3*"
>> headerData="Nom"/>
>>
>>
>> <TableView.Column name="millesime" minimumWidth="60" width="2*"
>> headerData="Millésime"/>
>>
>>
>> <TableView.Column name="couleur" headerData="Couleur" minimumWidth="50"
>> width="2*">
>>
>>
>> <cellRenderer>
>>
>>
>> <content:TableViewImageCellRenderer/>
>>
>>
>> </cellRenderer>
>>
>>
>> </TableView.Column>
>>
>>
>> <TableView.Column name="boire" headerData="A boire" minimumWidth="80"
>> width="2*"/>
>>
>>
>> </columns>
>>
>>
>> </TableView>
>>
>>
>> </view>
>>
>>
>> <columnHeader>
>>
>>
>> <TableViewHeader tableView="$table" sortMode="single_column"/>
>>
>>
>> </columnHeader>
>>
>>
> </ScrollPane>
>>
>> </content>
>>
>> </Border>
>>
>> </content>
>>
>> </Border>
>>
>> </BoxPane>
>>
>> </content>
>>
>> </Border>
>>
>> </TablePane.Row>
>>
>> </rows>
>>
>> </TablePane>
>>
>> </content>
>>
>> </Border>
>>
>> </content>
>>
>> </Border>
>>
>> </content>
>>
>> </Window>
>>
>>
>>
>> --
>>
>> Cordialement
>>
>> Jérôme Serré
>>
>>
>>
>>
>
Re: Component size
Posted by Greg Brown <gk...@mac.com>.
Sorry - should have mentioned that. You put it on the component itself, not the row:
<TablePane.Row>
<Foo TablePane.columnSpan="2"/>
</TablePane.Row>
On Oct 11, 2010, at 12:40 PM, Jérôme Serré wrote:
> Thank you,
> It seems to be work but I don't know where and how put the [rowSpan="2"]
> This doesn't work : <TablePane.Row height="-1" rowSpan="2">
>
> Jérôme
>
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com]
> Envoyé : lundi 11 octobre 2010 17:40
> À : user@pivot.apache.org
> Objet : Re: Component size
>
> I think the problem is your use of a BoxPane as the TableView's ancestor. A
> horizontal box pane only fills in the vertical direction, and you need to
> fill horizontally.
>
> Instead of a BoxPane, I would suggest using a TablePane. You might be able
> to re-use your existing table pane by adding another column (and setting the
> column span of the first two rows to 2), or you could just replace the box
> pane with a table pane.
>
> Hope this helps,
> Greg
>
> On Oct 11, 2010, at 11:07 AM, Jérôme Serré wrote:
>
>> Hello,
>>
>> I probably have an error in the file wtkx but I cannot see it.
>> Maybe someone could help me.
>> I would like the “TableView” is not fixed but it fills the entire
> horizontal
>> space, whatever the size of the browser.
>>
>> You can see it at : http://85.216.59.161:8000/cave2/principale.jsp
>>
>>
>>
>> Thank you for your help.
>>
>> Jérôme
>>
>>
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>
>> <Window title="Principale" maximized="true"
>>
>> xmlns:wtkx="http://pivot.apache.org/wtkx"
>>
>> xmlns:content="org.apache.pivot.wtk.content"
>>
>> xmlns="org.apache.pivot.wtk">
>>
>> <content>
>>
>> <Border styles="{padding:0}">
>>
>> <content>
>>
>> <Border styles="{padding:0, color:'#DDDCD5',
>> thickness:7}">
>>
>> <content>
>>
>> <TablePane wtkx:id="tableau"
>> styles="{verticalSpacing:1,
>>
>> showHorizontalGridLines:false,
>> horizontalSpacing:1,
>>
>> showVerticalGridLines:false}">
>>
>> <columns>
>>
>> <TablePane.Column width="1*"/>
>>
>> </columns>
>>
>> <rows>
>>
>> <TablePane.Row height="-1">
>>
>> <wtkx:include
>> wtkx:id="menuPrincipale" src="menuPrincipale.wtkx"/>
>>
>> </TablePane.Row>
>>
>> <TablePane.Row height="-1">
>>
>> ../..
>>
>> </TablePane.Row>
>
>>
>> <TablePane.Row height="1*">
>>
>> <Border styles="{padding:5}">
>>
>> <content>
>>
>> <BoxPane
>> orientation="horizontal" styles="{fill:true}">
>>
>> <Border
>> title="Critères de recherche" styles="{padding:10}">
>>
>> <content>
>>
>> ../..
>>
>> </content>
>>
>> </Border>
>>
>> <Border
>> title="Résultat" styles="{padding:10}">
>>
>> <content>
>>
>> <Border
>> styles="{padding:0}">
>>
>> <content>
>>
>> <ScrollPane
>> horizontalScrollBarPolicy="fill_to_capacity"
>> verticalScrollBarPolicy="fill_to_capacity"
>>
>>
>> preferredWidth="700">
>>
>> <view>
>
>>
>>
>> <TableView wtkx:id="table">
>>
>>
>> <columns>
>>
>>
>> <TableView.Column name="pays" headerData="Pays" minimumWidth="50"
>> width="1*">
>>
>>
>> <cellRenderer>
>>
>>
>> <content:TableViewImageCellRenderer/>
>>
>>
>> </cellRenderer>
>>
>>
>> </TableView.Column>
>>
>>
>> <TableView.Column name="appellation" minimumWidth="170" width="3*"
>> headerData="Appellation"/>
>>
>>
>> <TableView.Column name="nom" minimumWidth="170" width="3*"
>> headerData="Nom"/>
>>
>>
>> <TableView.Column name="millesime" minimumWidth="60" width="2*"
>> headerData="Millésime"/>
>>
>>
>> <TableView.Column name="couleur" headerData="Couleur" minimumWidth="50"
>> width="2*">
>>
>>
>> <cellRenderer>
>>
>>
>> <content:TableViewImageCellRenderer/>
>>
>>
>> </cellRenderer>
>>
>>
>> </TableView.Column>
>>
>>
>> <TableView.Column name="boire" headerData="A boire" minimumWidth="80"
>> width="2*"/>
>>
>>
>> </columns>
>>
>>
>> </TableView>
>>
>>
>> </view>
>>
>>
>> <columnHeader>
>>
>>
>> <TableViewHeader tableView="$table" sortMode="single_column"/>
>>
>>
>> </columnHeader>
>>
>>
> </ScrollPane>
>>
>> </content>
>>
>> </Border>
>>
>> </content>
>>
>> </Border>
>>
>> </BoxPane>
>>
>> </content>
>>
>> </Border>
>>
>> </TablePane.Row>
>>
>> </rows>
>>
>> </TablePane>
>>
>> </content>
>>
>> </Border>
>>
>> </content>
>>
>> </Border>
>>
>> </content>
>>
>> </Window>
>>
>>
>>
>> --
>>
>> Cordialement
>>
>> Jérôme Serré
>>
>>
>>
>>
>
RE: Component size
Posted by Jérôme Serré <je...@gmail.com>.
Thank you,
It seems to be work but I don't know where and how put the [rowSpan="2"]
This doesn't work : <TablePane.Row height="-1" rowSpan="2">
Jérôme
-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com]
Envoyé : lundi 11 octobre 2010 17:40
À : user@pivot.apache.org
Objet : Re: Component size
I think the problem is your use of a BoxPane as the TableView's ancestor. A
horizontal box pane only fills in the vertical direction, and you need to
fill horizontally.
Instead of a BoxPane, I would suggest using a TablePane. You might be able
to re-use your existing table pane by adding another column (and setting the
column span of the first two rows to 2), or you could just replace the box
pane with a table pane.
Hope this helps,
Greg
On Oct 11, 2010, at 11:07 AM, Jérôme Serré wrote:
> Hello,
>
> I probably have an error in the file wtkx but I cannot see it.
> Maybe someone could help me.
> I would like the TableView is not fixed but it fills the entire
horizontal
> space, whatever the size of the browser.
>
> You can see it at : http://85.216.59.161:8000/cave2/principale.jsp
>
>
>
> Thank you for your help.
>
> Jérôme
>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <Window title="Principale" maximized="true"
>
> xmlns:wtkx="http://pivot.apache.org/wtkx"
>
> xmlns:content="org.apache.pivot.wtk.content"
>
> xmlns="org.apache.pivot.wtk">
>
> <content>
>
> <Border styles="{padding:0}">
>
> <content>
>
> <Border styles="{padding:0, color:'#DDDCD5',
> thickness:7}">
>
> <content>
>
> <TablePane wtkx:id="tableau"
> styles="{verticalSpacing:1,
>
> showHorizontalGridLines:false,
> horizontalSpacing:1,
>
> showVerticalGridLines:false}">
>
> <columns>
>
> <TablePane.Column width="1*"/>
>
> </columns>
>
> <rows>
>
> <TablePane.Row height="-1">
>
> <wtkx:include
> wtkx:id="menuPrincipale" src="menuPrincipale.wtkx"/>
>
> </TablePane.Row>
>
> <TablePane.Row height="-1">
>
> ../..
>
> </TablePane.Row>
>
> <TablePane.Row height="1*">
>
> <Border styles="{padding:5}">
>
> <content>
>
> <BoxPane
> orientation="horizontal" styles="{fill:true}">
>
> <Border
> title="Critères de recherche" styles="{padding:10}">
>
> <content>
>
> ../..
>
> </content>
>
> </Border>
>
> <Border
> title="Résultat" styles="{padding:10}">
>
> <content>
>
> <Border
> styles="{padding:0}">
>
> <content>
>
> <ScrollPane
> horizontalScrollBarPolicy="fill_to_capacity"
> verticalScrollBarPolicy="fill_to_capacity"
>
>
> preferredWidth="700">
>
> <view>
>
>
> <TableView wtkx:id="table">
>
>
> <columns>
>
>
> <TableView.Column name="pays" headerData="Pays" minimumWidth="50"
> width="1*">
>
>
> <cellRenderer>
>
>
> <content:TableViewImageCellRenderer/>
>
>
> </cellRenderer>
>
>
> </TableView.Column>
>
>
> <TableView.Column name="appellation" minimumWidth="170" width="3*"
> headerData="Appellation"/>
>
>
> <TableView.Column name="nom" minimumWidth="170" width="3*"
> headerData="Nom"/>
>
>
> <TableView.Column name="millesime" minimumWidth="60" width="2*"
> headerData="Millésime"/>
>
>
> <TableView.Column name="couleur" headerData="Couleur" minimumWidth="50"
> width="2*">
>
>
> <cellRenderer>
>
>
> <content:TableViewImageCellRenderer/>
>
>
> </cellRenderer>
>
>
> </TableView.Column>
>
>
> <TableView.Column name="boire" headerData="A boire" minimumWidth="80"
> width="2*"/>
>
>
> </columns>
>
>
> </TableView>
>
>
> </view>
>
>
> <columnHeader>
>
>
> <TableViewHeader tableView="$table" sortMode="single_column"/>
>
>
> </columnHeader>
>
>
</ScrollPane>
>
> </content>
>
> </Border>
>
> </content>
>
> </Border>
>
> </BoxPane>
>
> </content>
>
> </Border>
>
> </TablePane.Row>
>
> </rows>
>
> </TablePane>
>
> </content>
>
> </Border>
>
> </content>
>
> </Border>
>
> </content>
>
> </Window>
>
>
>
> --
>
> Cordialement
>
> Jérôme Serré
>
>
>
>
Re: Component size
Posted by Greg Brown <gk...@mac.com>.
I think the problem is your use of a BoxPane as the TableView's ancestor. A horizontal box pane only fills in the vertical direction, and you need to fill horizontally.
Instead of a BoxPane, I would suggest using a TablePane. You might be able to re-use your existing table pane by adding another column (and setting the column span of the first two rows to 2), or you could just replace the box pane with a table pane.
Hope this helps,
Greg
On Oct 11, 2010, at 11:07 AM, Jérôme Serré wrote:
> Hello,
>
> I probably have an error in the file wtkx but I cannot see it.
> Maybe someone could help me.
> I would like the “TableView” is not fixed but it fills the entire horizontal
> space, whatever the size of the browser.
>
> You can see it at : http://85.216.59.161:8000/cave2/principale.jsp
>
>
>
> Thank you for your help.
>
> Jérôme
>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <Window title="Principale" maximized="true"
>
> xmlns:wtkx="http://pivot.apache.org/wtkx"
>
> xmlns:content="org.apache.pivot.wtk.content"
>
> xmlns="org.apache.pivot.wtk">
>
> <content>
>
> <Border styles="{padding:0}">
>
> <content>
>
> <Border styles="{padding:0, color:'#DDDCD5',
> thickness:7}">
>
> <content>
>
> <TablePane wtkx:id="tableau"
> styles="{verticalSpacing:1,
>
> showHorizontalGridLines:false,
> horizontalSpacing:1,
>
> showVerticalGridLines:false}">
>
> <columns>
>
> <TablePane.Column width="1*"/>
>
> </columns>
>
> <rows>
>
> <TablePane.Row height="-1">
>
> <wtkx:include
> wtkx:id="menuPrincipale" src="menuPrincipale.wtkx"/>
>
> </TablePane.Row>
>
> <TablePane.Row height="-1">
>
> ../..
>
> </TablePane.Row>
>
> <TablePane.Row height="1*">
>
> <Border styles="{padding:5}">
>
> <content>
>
> <BoxPane
> orientation="horizontal" styles="{fill:true}">
>
> <Border
> title="Critères de recherche" styles="{padding:10}">
>
> <content>
>
> ../..
>
> </content>
>
> </Border>
>
> <Border
> title="Résultat" styles="{padding:10}">
>
> <content>
>
> <Border
> styles="{padding:0}">
>
> <content>
>
> <ScrollPane
> horizontalScrollBarPolicy="fill_to_capacity"
> verticalScrollBarPolicy="fill_to_capacity"
>
>
> preferredWidth="700">
>
> <view>
>
>
> <TableView wtkx:id="table">
>
>
> <columns>
>
>
> <TableView.Column name="pays" headerData="Pays" minimumWidth="50"
> width="1*">
>
>
> <cellRenderer>
>
>
> <content:TableViewImageCellRenderer/>
>
>
> </cellRenderer>
>
>
> </TableView.Column>
>
>
> <TableView.Column name="appellation" minimumWidth="170" width="3*"
> headerData="Appellation"/>
>
>
> <TableView.Column name="nom" minimumWidth="170" width="3*"
> headerData="Nom"/>
>
>
> <TableView.Column name="millesime" minimumWidth="60" width="2*"
> headerData="Millésime"/>
>
>
> <TableView.Column name="couleur" headerData="Couleur" minimumWidth="50"
> width="2*">
>
>
> <cellRenderer>
>
>
> <content:TableViewImageCellRenderer/>
>
>
> </cellRenderer>
>
>
> </TableView.Column>
>
>
> <TableView.Column name="boire" headerData="A boire" minimumWidth="80"
> width="2*"/>
>
>
> </columns>
>
>
> </TableView>
>
>
> </view>
>
>
> <columnHeader>
>
>
> <TableViewHeader tableView="$table" sortMode="single_column"/>
>
>
> </columnHeader>
>
> </ScrollPane>
>
> </content>
>
> </Border>
>
> </content>
>
> </Border>
>
> </BoxPane>
>
> </content>
>
> </Border>
>
> </TablePane.Row>
>
> </rows>
>
> </TablePane>
>
> </content>
>
> </Border>
>
> </content>
>
> </Border>
>
> </content>
>
> </Window>
>
>
>
> --
>
> Cordialement
>
> Jérôme Serré
>
>
>
>