Archived
0
This commit is contained in:
iMoHax
2014-07-17 19:47:23 +04:00
parent e33a315220
commit 12d81ab157
5 changed files with 58 additions and 169 deletions

View File

@@ -8,14 +8,10 @@
fx:controller="ru.trader.controllers.ItemDescController"> fx:controller="ru.trader.controllers.ItemDescController">
<Label text="Продавцы:"/> <Label text="Продавцы:"/>
<ListView fx:id="seller" maxHeight="200.0"> <ListView fx:id="seller" maxHeight="200.0">
<cellFactory> <cellFactory><OfferListCell/></cellFactory>
<OfferListCell/>
</cellFactory>
</ListView> </ListView>
<Label text="Покупатели:"/> <Label text="Покупатели:"/>
<ListView fx:id="buyer" maxHeight="200.0"> <ListView fx:id="buyer" maxHeight="200.0">
<cellFactory> <cellFactory><OfferListCell/></cellFactory>
<OfferListCell/>
</cellFactory>
</ListView> </ListView>
</VBox> </VBox>

View File

@@ -13,70 +13,46 @@
<TableView fx:id="tblItems" editable="true" VBox.vgrow="ALWAYS"> <TableView fx:id="tblItems" editable="true" VBox.vgrow="ALWAYS">
<columns> <columns>
<TableColumn editable="true" minWidth="200.0" prefWidth="200.0" text="Товар"> <TableColumn editable="true" minWidth="200.0" prefWidth="200.0" text="Товар">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
<PropertyValueFactory property="name"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn editable="true" resizable="false" text="Покупка"> <TableColumn editable="true" resizable="false" text="Покупка">
<columns> <columns>
<TableColumn minWidth="120.0" prefWidth="120.0" text="Мин."> <TableColumn minWidth="120.0" prefWidth="120.0" text="Мин.">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="minSell"/></cellValueFactory>
<OfferCellValueImpl property="minSell"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" text="Ср."> <TableColumn minWidth="80.0" prefWidth="80.0" text="Ср.">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="avgSell"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="120.0" prefWidth="120.0" text="Макс."> <TableColumn minWidth="120.0" prefWidth="120.0" text="Макс.">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="maxSell"/></cellValueFactory>
<OfferCellValueImpl property="maxSell"/>
</cellValueFactory>
</TableColumn> </TableColumn>
</columns> </columns>
</TableColumn> </TableColumn>
<TableColumn editable="true" resizable="false" text="Продажа"> <TableColumn editable="true" resizable="false" text="Продажа">
<columns> <columns>
<TableColumn minWidth="120.0" prefWidth="120.0" text="Мин."> <TableColumn minWidth="120.0" prefWidth="120.0" text="Мин.">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="minBuy"/></cellValueFactory>
<OfferCellValueImpl property="minBuy"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" text="Ср."> <TableColumn minWidth="80.0" prefWidth="80.0" text="Ср.">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="avgBuy"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="120.0" prefWidth="120.0" text="Макс."> <TableColumn minWidth="120.0" prefWidth="120.0" text="Макс.">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="maxBuy"/></cellValueFactory>
<OfferCellValueImpl property="maxBuy"/>
</cellValueFactory>
</TableColumn> </TableColumn>
</columns> </columns>
</TableColumn> </TableColumn>
<TableColumn editable="true" resizable="false" text="Прибыль"> <TableColumn editable="true" resizable="false" text="Прибыль">
<columns> <columns>
<TableColumn fx:id="minProfit" minWidth="80.0" prefWidth="80.0" text="Мин."> <TableColumn fx:id="minProfit" minWidth="80.0" prefWidth="80.0" text="Мин.">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/>
</cellFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="avgProfit" minWidth="80.0" prefWidth="80.0" text="Ср."> <TableColumn fx:id="avgProfit" minWidth="80.0" prefWidth="80.0" text="Ср.">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/>
</cellFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="maxProfit" minWidth="80.0" prefWidth="80.0" text="Макс." sortType="DESCENDING"> <TableColumn fx:id="maxProfit" minWidth="80.0" prefWidth="80.0" text="Макс." sortType="DESCENDING">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/>
</cellFactory>
</TableColumn> </TableColumn>
</columns> </columns>
</TableColumn> </TableColumn>

View File

@@ -31,53 +31,29 @@
<TableView fx:id="tblSell" editable="true"> <TableView fx:id="tblSell" editable="true">
<columns> <columns>
<TableColumn minWidth="200.0" prefWidth="200.0" text="Товар"> <TableColumn minWidth="200.0" prefWidth="200.0" text="Товар">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
<PropertyValueFactory property="name"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="100.0" prefWidth="100.0" resizable="false" text="Цена" <TableColumn minWidth="100.0" prefWidth="100.0" resizable="false" text="Цена" onEditCommit="#editPrice">
onEditCommit="#editPrice"> <cellFactory><PriceCellImpl/></cellFactory>
<cellFactory> <cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
<PriceCellImpl/>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="price"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="sortSell" minWidth="80.0" prefWidth="80.0" resizable="false" <TableColumn fx:id="sortSell" minWidth="80.0" prefWidth="80.0" resizable="false" text="Прибыль" sortType="DESCENDING">
text="Прибыль" sortType="DESCENDING"> <cellFactory><DoubleCell/></cellFactory>
<cellFactory> <cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
<DoubleCell/>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="profit"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG SELL"> <TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG SELL">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="avgSell"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG BUY"> <TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG BUY">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="avgBuy"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="120.0" prefWidth="120.0" text="BEST SELL"> <TableColumn minWidth="120.0" prefWidth="120.0" text="BEST SELL">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
<OfferCellValueImpl property="bestSell"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="120.0" prefWidth="120.0" text="BEST BUY"> <TableColumn minWidth="120.0" prefWidth="120.0" text="BEST BUY">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
<OfferCellValueImpl property="bestBuy"/>
</cellValueFactory>
</TableColumn> </TableColumn>
</columns> </columns>
<columnResizePolicy> <columnResizePolicy>
@@ -93,53 +69,29 @@
<TableView fx:id="tblBuy" editable="true"> <TableView fx:id="tblBuy" editable="true">
<columns> <columns>
<TableColumn minWidth="200.0" prefWidth="200.0" text="Товар"> <TableColumn minWidth="200.0" prefWidth="200.0" text="Товар">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
<PropertyValueFactory property="name"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="100.0" prefWidth="100.0" resizable="false" text="Цена" <TableColumn minWidth="100.0" prefWidth="100.0" resizable="false" text="Цена" editable="true" onEditCommit="#editPrice">
editable="true" onEditCommit="#editPrice"> <cellFactory><PriceCellImpl/></cellFactory>
<cellFactory> <cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
<PriceCellImpl/>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="price"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="sortBuy" minWidth="80.0" prefWidth="80.0" resizable="false" <TableColumn fx:id="sortBuy" minWidth="80.0" prefWidth="80.0" resizable="false" text="Прибыль" sortType="DESCENDING">
text="Прибыль" sortType="DESCENDING"> <cellFactory><DoubleCell/></cellFactory>
<cellFactory> <cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
<DoubleCell/>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="profit"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG SELL"> <TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG SELL">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="avgSell"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG BUY"> <TableColumn minWidth="80.0" prefWidth="80.0" resizable="false" text="AVG BUY">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="avgBuy"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="120.0" prefWidth="120.0" text="BEST SELL"> <TableColumn minWidth="120.0" prefWidth="120.0" text="BEST SELL">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
<OfferCellValueImpl property="bestSell"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="120.0" prefWidth="120.0" text="BEST BUY"> <TableColumn minWidth="120.0" prefWidth="120.0" text="BEST BUY">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
<OfferCellValueImpl property="bestBuy"/>
</cellValueFactory>
</TableColumn> </TableColumn>
</columns> </columns>
<columnResizePolicy> <columnResizePolicy>

View File

@@ -14,52 +14,31 @@
<TableView fx:id="tblOrders" editable="true"> <TableView fx:id="tblOrders" editable="true">
<columns> <columns>
<TableColumn minWidth="200.0" prefWidth="200.0" text="Товар"> <TableColumn minWidth="200.0" prefWidth="200.0" text="Товар">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
<PropertyValueFactory property="name"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" text="Цена"> <TableColumn minWidth="80.0" prefWidth="80.0" text="Цена">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="price"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="count" minWidth="80.0" prefWidth="80.0" text="Кол-во"> <TableColumn fx:id="count" minWidth="80.0" prefWidth="80.0" text="Кол-во">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
<PropertyValueFactory property="count"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="120.0" prefWidth="120.0" text="Покупатель"> <TableColumn minWidth="120.0" prefWidth="120.0" text="Покупатель">
<cellValueFactory> <cellValueFactory><OfferCellValueImpl property="buyer"/></cellValueFactory>
<OfferCellValueImpl property="buyer"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn minWidth="80.0" prefWidth="80.0" text="Прибыль"> <TableColumn minWidth="80.0" prefWidth="80.0" text="Прибыль">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="profit"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn resizable="false" text="Максимум"> <TableColumn resizable="false" text="Максимум">
<columns> <columns>
<TableColumn fx:id="maxCount" minWidth="80.0" prefWidth="80.0" text="Кол-во"> <TableColumn fx:id="maxCount" minWidth="80.0" prefWidth="80.0" text="Кол-во">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="max"/></cellValueFactory>
<PropertyValueFactory property="max"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="bestProfit" minWidth="80.0" prefWidth="80.0" text="Прибыль" <TableColumn fx:id="bestProfit" minWidth="80.0" prefWidth="80.0" text="Прибыль" sortType="DESCENDING">
sortType="DESCENDING"> <cellFactory><DoubleCell/></cellFactory>
<cellFactory> <cellValueFactory><PropertyValueFactory property="bestProfit"/></cellValueFactory>
<DoubleCell/>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="bestProfit"/>
</cellValueFactory>
</TableColumn> </TableColumn>
</columns> </columns>
</TableColumn> </TableColumn>
@@ -74,20 +53,12 @@
<TableView fx:id="tblBuyers"> <TableView fx:id="tblBuyers">
<columns> <columns>
<TableColumn minWidth="120.0" prefWidth="120.0" text="Покупатель"> <TableColumn minWidth="120.0" prefWidth="120.0" text="Покупатель">
<cellFactory> <cellFactory><OfferTableCell/></cellFactory>
<OfferTableCell/> <cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="price"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="curProfit" minWidth="80.0" prefWidth="80.0" text="Прибыль" sortType="DESCENDING"> <TableColumn fx:id="curProfit" minWidth="80.0" prefWidth="80.0" text="Прибыль" sortType="DESCENDING">
<cellFactory> <cellFactory><DoubleCell/></cellFactory>
<DoubleCell/> <cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
</cellFactory>
<cellValueFactory>
<PropertyValueFactory property="profit"/>
</cellValueFactory>
</TableColumn> </TableColumn>
</columns> </columns>
<columnResizePolicy> <columnResizePolicy>

View File

@@ -13,19 +13,13 @@
<TableView fx:id="items" editable="true" prefWidth="400.0"> <TableView fx:id="items" editable="true" prefWidth="400.0">
<columns> <columns>
<TableColumn minWidth="200.0" prefWidth="200.0" text="Товар" editable="false"> <TableColumn minWidth="200.0" prefWidth="200.0" text="Товар" editable="false">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
<PropertyValueFactory property="name"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="buy" minWidth="80.0" prefWidth="80.0" maxWidth="80.0" text="Продажа"> <TableColumn fx:id="buy" minWidth="80.0" prefWidth="80.0" maxWidth="80.0" text="Продажа">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="bprice"/></cellValueFactory>
<PropertyValueFactory property="bprice"/>
</cellValueFactory>
</TableColumn> </TableColumn>
<TableColumn fx:id="sell" minWidth="80.0" prefWidth="80.0" maxWidth="80.0" text="Покупка"> <TableColumn fx:id="sell" minWidth="80.0" prefWidth="80.0" maxWidth="80.0" text="Покупка">
<cellValueFactory> <cellValueFactory><PropertyValueFactory property="sprice"/></cellValueFactory>
<PropertyValueFactory property="sprice"/>
</cellValueFactory>
</TableColumn> </TableColumn>
</columns> </columns>
</TableView> </TableView>