<?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 org.controlsfx.glyphfont.Glyph?>
<?import ru.trader.view.support.NumberField?>
<GridPane xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8"
      fx:controller="ru.trader.controllers.StationEditorController" styleClass="dialog"
      vgap="10" hgap="4">
    <fx:define><Insets fx:id="hbox_margin" left="10" /></fx:define>
    <TextField fx:id="name" GridPane.columnSpan="2" alignment="CENTER" />
    <HBox GridPane.rowIndex="1" GridPane.columnSpan="2" spacing="10" alignment="CENTER">
        <VBox prefWidth="200" alignment="CENTER">
            <Label text="%market.government"/>
            <ComboBox fx:id="government" maxWidth="200" />
        </VBox>
        <VBox prefWidth="200" alignment="CENTER">
            <Label text="%market.allegiance"/>
            <ComboBox fx:id="faction" maxWidth="200" />
        </VBox>
    </HBox>
    <HBox GridPane.rowIndex="2" GridPane.columnSpan="2" spacing="10" alignment="CENTER">
        <VBox prefWidth="180" alignment="CENTER">
            <Label text="%market.station.type"/>
            <ComboBox fx:id="type" maxWidth="200" />
        </VBox>
        <VBox prefWidth="180" alignment="CENTER">
            <Label text="%market.economic"/>
            <ComboBox fx:id="economic" maxWidth="200" />
        </VBox>
        <VBox prefWidth="180" alignment="CENTER">
            <Label text="%market.economic"/>
            <ComboBox fx:id="subEconomic" maxWidth="200" />
        </VBox>
    </HBox>
    <HBox GridPane.rowIndex="3" GridPane.columnIndex="1" spacing="4">
        <VBox prefWidth="200" alignment="CENTER">
            <Label text="%vEditor.text.distance"/>
            <NumberField fx:id="distance" maxWidth="100" />
        </VBox>
        <VBox HBox.hgrow="ALWAYS" alignment="CENTER">
            <Label text="%vEditor.text.services"/>
            <HBox spacing="5" maxWidth="400">
                <VBox spacing="5">
                    <CheckBox fx:id="cbMarket" text="%services.MARKET"/>
                    <CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
                    <CheckBox fx:id="cbRefuel" text="%services.REFUEL"/>
                </VBox>
                <VBox spacing="5">
                    <CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
                    <CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
                    <CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
                </VBox>
                <VBox spacing="5">
                    <CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
                </VBox>
            </HBox>
        </VBox>
    </HBox>
    <VBox GridPane.rowIndex="4" alignment="CENTER" spacing="10">
        <Button prefWidth="30" onAction="#up"><graphic><Glyph text="FontAwesome|ARROW_UP"/></graphic></Button>
        <Button prefWidth="30" onAction="#down"><graphic><Glyph text="FontAwesome|ARROW_DOWN"/></graphic></Button>
        <Button prefWidth="30" onAction="#add"><graphic><Glyph text="FontAwesome|PLUS"/></graphic></Button>
    </VBox>
    <TableView fx:id="items" GridPane.rowIndex="4" prefWidth="575" maxHeight="560" editable="true" GridPane.columnIndex="1">
        <columns>
            <TableColumn minWidth="200.0" text="%market.item" editable="false">
                <cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="buy" minWidth="90.0" text="%market.offer.sell">
                <cellValueFactory><PropertyValueFactory property="bprice"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="sell" minWidth="90.0" text="%market.offer.buy">
                <cellValueFactory><PropertyValueFactory property="sprice"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="demand" minWidth="90.0" text="%market.offer.demand">
                <cellValueFactory><PropertyValueFactory property="demand"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="supply" minWidth="90.0" text="%market.offer.supply">
                <cellValueFactory><PropertyValueFactory property="supply"/></cellValueFactory>
            </TableColumn>
        </columns>
    </TableView>
</GridPane>
