Archived
0
This repository has been archived on 2022-07-30. You can view files and clone it, but cannot push or open issues or pull requests.
Files
trader/client/src/main/resources/view/offers.fxml
2016-03-14 14:15:35 +03:00

172 lines
9.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.control.cell.*?>
<?import javafx.scene.layout.*?>
<?import ru.trader.view.support.cells.*?>
<?import org.controlsfx.glyphfont.Glyph?>
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ru.trader.controllers.OffersController"
prefHeight="500">
<fx:define><Insets fx:id="stationsMargin" left="5" right="5" /></fx:define>
<fx:define><Insets fx:id="stationsPadding" left="12" right="10" /></fx:define>
<columnConstraints>
<ColumnConstraints minWidth="270" maxWidth="270"/>
<ColumnConstraints fillWidth="true"/>
</columnConstraints>
<VBox GridPane.rowSpan="2" GridPane.vgrow="ALWAYS" minWidth="270">
<TitledPane text="%market.system.name" collapsible="false">
<HBox><TextField fx:id="systemText" HBox.hgrow="ALWAYS" /><Button minWidth="30" onAction="#currentSystem"><graphic><Glyph text="FontAwesome|MAP_MARKER"/></graphic></Button></HBox>
</TitledPane>
<TitledPane VBox.vgrow="ALWAYS" text="%market.stations" collapsible="false">
<ListView fx:id="stationsList">
<contextMenu>
<ContextMenu>
<items>
<MenuItem text="%main.menu.edit.addStation" onAction="#addStation" />
<MenuItem text="%main.menu.edit.editStation" onAction="#editStation" />
<MenuItem text="%main.menu.edit.removeStation" onAction="#removeStation" />
</items>
</ContextMenu>
</contextMenu>
</ListView>
</TitledPane>
</VBox>
<TitledPane fx:id="stationPane" GridPane.columnIndex="1" maxHeight="60" collapsible="false">
<VBox>
<HBox spacing="4">
<Label text="%offers.text.distance"/>
<Label fx:id="distance" minWidth="60"/>
<Label text="%market.allegiance"/>
<Label fx:id="faction" minWidth="60"/>
<Label text="%market.government"/>
<Label fx:id="government" minWidth="60"/>
</HBox>
<HBox spacing="4">
<Label text="%offers.text.services"/>
<TilePane hgap="5" vgap="5" prefColumns="5" tileAlignment="BASELINE_LEFT">
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
<CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
<CheckBox fx:id="cbMediumLandpad" text="%services.MEDIUM_LANDPAD"/>
<CheckBox fx:id="cbLargeLandpad" text="%services.LARGE_LANDPAD"/>
</TilePane>
</HBox>
</VBox>
</TitledPane>
<Accordion GridPane.rowIndex="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
<panes>
<TitledPane fx:id="paneSells" animated="false" text="%offers.pane.sell">
<TableView fx:id="tblSell" editable="true">
<rowFactory><OfferDecoratedRow /></rowFactory>
<columns>
<TableColumn minWidth="230.0" text="%market.item.name">
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="110.0" text="%market.offer.price" onEditCommit="#editPrice">
<cellFactory><PriceCellImpl/></cellFactory>
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.offer.supply">
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="sortSell" minWidth="90.0" text="%market.order.profit" sortType="DESCENDING">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
</TableColumn>
<TableColumn text="%market.offer.avg">
<columns>
<TableColumn minWidth="80.0" text="%market.offer.sell">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.offer.buy">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
</TableColumn>
</columns>
</TableColumn>
<TableColumn text="%market.offer.best">
<columns>
<TableColumn minWidth="120.0" text="%market.offer.sell">
<cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="120.0" text="%market.offer.buy">
<cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
</TableColumn>
</columns>
</TableColumn>
</columns>
<columnResizePolicy>
<TableView fx:constant="UNCONSTRAINED_RESIZE_POLICY"/>
</columnResizePolicy>
<sortOrder>
<fx:reference source="sortSell"/>
</sortOrder>
</TableView>
</TitledPane>
<TitledPane animated="false" text="%offers.pane.buy">
<TableView fx:id="tblBuy" editable="true">
<rowFactory><OfferDecoratedRow /></rowFactory>
<columns>
<TableColumn minWidth="230.0" text="%market.item.name">
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="110.0" text="%market.offer.price" editable="true" onEditCommit="#editPrice">
<cellFactory><PriceCellImpl/></cellFactory>
<cellValueFactory><PropertyValueFactory property="price"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.offer.demand">
<cellValueFactory><PropertyValueFactory property="count"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="sortBuy" minWidth="90.0" text="%market.order.profit" sortType="DESCENDING">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="profit"/></cellValueFactory>
</TableColumn>
<TableColumn text="%market.offer.avg">
<columns>
<TableColumn minWidth="80.0" text="%market.offer.sell">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="avgSell"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="80.0" text="%market.offer.buy">
<cellFactory><DoubleCell/></cellFactory>
<cellValueFactory><PropertyValueFactory property="avgBuy"/></cellValueFactory>
</TableColumn>
</columns>
</TableColumn>
<TableColumn text="%market.offer.best">
<columns>
<TableColumn minWidth="120.0" text="%market.offer.sell">
<cellValueFactory><OfferCellValueImpl property="bestSell"/></cellValueFactory>
</TableColumn>
<TableColumn minWidth="120.0" text="%market.offer.buy">
<cellValueFactory><OfferCellValueImpl property="bestBuy"/></cellValueFactory>
</TableColumn>
</columns>
</TableColumn>
</columns>
<columnResizePolicy>
<TableView fx:constant="UNCONSTRAINED_RESIZE_POLICY"/>
</columnResizePolicy>
<sortOrder>
<fx:reference source="sortBuy"/>
</sortOrder>
</TableView>
</TitledPane>
</panes>
<expandedPane>
<fx:reference source="paneSells"/>
</expandedPane>
</Accordion>
</GridPane>