<?xml version="1.0" encoding="UTF-8"?>


<?import javafx.scene.control.cell.PropertyValueFactory?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.VBox?>
<?import ru.trader.view.support.cells.*?>
<VBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
      fx:controller="ru.trader.db.controllers.StationsController">
    <TableView fx:id="tblStations" editable="true" VBox.vgrow="ALWAYS" prefWidth="800">
        <columns>
            <TableColumn minWidth="100" text="%market.system">
                <cellValueFactory><PropertyValueFactory property="system"/></cellValueFactory>
            </TableColumn>
            <TableColumn minWidth="200" text="%market.station.name">
                <cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="type" minWidth="100" text="%market.station.type">
                <cellValueFactory><WritablePropertyValueFactory property="type"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="government" minWidth="100" text="%market.government">
                <cellValueFactory><WritablePropertyValueFactory property="government"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="faction" minWidth="100" text="%market.allegiance">
                <cellValueFactory><WritablePropertyValueFactory property="faction"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="economic" minWidth="100" text="%market.economic">
                <cellValueFactory><WritablePropertyValueFactory property="economic"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="subEconomic" minWidth="100" text="%market.economic">
                <cellValueFactory><WritablePropertyValueFactory property="subEconomic"/></cellValueFactory>
            </TableColumn>
            <TableColumn minWidth="100" text="%market.station.distance">
                <cellValueFactory><WritablePropertyValueFactory property="distance"/></cellValueFactory>
            </TableColumn>
            <TableColumn fx:id="services" minWidth="100" text="%market.station.services">
                <cellValueFactory><PropertyValueFactory property="services"/></cellValueFactory>
            </TableColumn>
        </columns>
        <columnResizePolicy>
            <TableView fx:constant="UNCONSTRAINED_RESIZE_POLICY"/>
        </columnResizePolicy>
        <contextMenu>
            <ContextMenu>
                <items>
                    <MenuItem text="%dialog.button.add" onAction="#add" />
                    <MenuItem text="%dialog.button.edit" onAction="#edit" />
                    <MenuItem text="%dialog.button.remove" onAction="#remove" />
                </items>
            </ContextMenu>
        </contextMenu>
    </TableView>
</VBox>
