<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import org.controlsfx.control.CheckComboBox?>
<?import org.controlsfx.glyphfont.*?>
<?import ru.trader.view.support.NumberField?>
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.trader.controllers.FilterController"
              styleClass="dialog" vgap="4" hgap="8">
        <columnConstraints>
            <ColumnConstraints minWidth="180"  maxWidth="180"/>
            <ColumnConstraints minWidth="320"  maxWidth="320"/>
        </columnConstraints>
        <Label text="%filter.title" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2"/>
        <Label text="%filter.center" GridPane.rowIndex="1"/>
        <TextField fx:id="centerText" GridPane.columnIndex="1" GridPane.rowIndex="1" minWidth="250"/>
        <Label text="%filter.radius" GridPane.rowIndex="2" />
        <NumberField fx:id="radius" GridPane.columnIndex="1" GridPane.rowIndex="2" />
        <Label text="%filter.distance" GridPane.rowIndex="3" />
        <NumberField fx:id="distance" GridPane.columnIndex="1" GridPane.rowIndex="3" />
        <HBox GridPane.rowIndex="4" GridPane.columnSpan="2" spacing="10" alignment="CENTER">
            <VBox prefWidth="200" alignment="CENTER">
                <Label text="%market.station.type"/>
                <CheckComboBox fx:id="stationTypes" maxWidth="200" />
            </VBox>
            <VBox prefWidth="200" alignment="CENTER">
                <Label text="%market.station.services"/>
                <CheckComboBox fx:id="services" maxWidth="200" />
            </VBox>
        </HBox>
        <HBox GridPane.rowIndex="5" GridPane.columnSpan="2" spacing="10" alignment="CENTER">
            <VBox prefWidth="200" alignment="CENTER">
                <Label text="%market.government"/>
                <CheckComboBox fx:id="governments" maxWidth="200" />
            </VBox>
            <VBox prefWidth="200" alignment="CENTER">
                <Label text="%market.allegiance"/>
                <CheckComboBox fx:id="factions" maxWidth="200" />
            </VBox>
        </HBox>
        <Label text="%filter.excludes" GridPane.rowIndex="6" />
        <VBox GridPane.rowIndex="7" spacing="4">
            <TextField fx:id="systemText" minWidth="180"/>
            <ComboBox fx:id="station" minWidth="180"/>
            <HBox spacing="2" alignment="BASELINE_RIGHT">
                <Button prefWidth="30" onAction="#add"><graphic><Glyph text="FontAwesome|PLUS"/></graphic></Button>
                <Button prefWidth="30" onAction="#remove"><graphic><Glyph text="FontAwesome|MINUS"/></graphic></Button>
                <Button prefWidth="30" onAction="#clean"><graphic><Glyph text="FontAwesome|TRASH_ALT"/></graphic></Button>
            </HBox>
        </VBox>
        <ListView fx:id="excludes" GridPane.rowIndex="7" GridPane.columnIndex="1" maxHeight="120"/>

    <Label text="%filter.stations" GridPane.rowIndex="8" />
    <VBox GridPane.rowIndex="9" spacing="4">
        <TextField fx:id="vFilterSystemText" minWidth="180"/>
        <ComboBox fx:id="vFilterStation" minWidth="180"/>
        <HBox spacing="2" alignment="BASELINE_RIGHT">
            <Button prefWidth="30" onAction="#addVendorFilter"><graphic><Glyph text="FontAwesome|PLUS"/></graphic></Button>
            <Button prefWidth="30" onAction="#editVendorFilter"><graphic><Glyph text="FontAwesome|EDIT"/></graphic></Button>
            <Button prefWidth="30" onAction="#removeVendorFilter"><graphic><Glyph text="FontAwesome|MINUS"/></graphic></Button>
            <Button prefWidth="30" onAction="#cleanVendorFilters"><graphic><Glyph text="FontAwesome|TRASH_ALT"/></graphic></Button>
        </HBox>
        <Button prefWidth="180" text="%filter.stations.global" onAction="#editDefaultVendorFilter"/>
    </VBox>
    <ListView fx:id="vFilters" GridPane.rowIndex="9" GridPane.columnIndex="1" maxHeight="120"/>


</GridPane>

