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

<!--
/*
 * Copyright (C) 2018-2021 Andrew Gegg
 *
 * This file is part of the Garden Notebook application
 *
 * The Garden Notebook application is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/*
    Change Log
    2.4.0   Support MS SQLServer
    2.8.1   Versioned JSON dumps
            Help system (first pass)
    3.0.0   Give path to most recent JSON dump
 */

-->

<?import java.net.URL?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.control.Spinner?>
<?import javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.control.Tooltip?>

<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
         prefWidth="600.0" type="javafx.scene.layout.AnchorPane" xmlns="http://javafx.com/javafx/8.0.141"
         xmlns:fx="http://javafx.com/fxml/1">
    <stylesheets>
        <URL value="@notebook.css"/>
    </stylesheets>
    <BorderPane layoutX="25.0" layoutY="14.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="5.0"
                AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0">
        <center>
            <TabPane id="tabPane" fx:id="tabPane" prefHeight="200.0" prefWidth="200.0"
                     tabClosingPolicy="UNAVAILABLE" BorderPane.alignment="CENTER">
                <Tab id="generalTab" fx:id="generalTab" disable="false" text="%tab.config.general">
                    <AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
                                minHeight="0.0" minWidth="0.0" prefHeight="247.0" prefWidth="590.0">
                        <GridPane hgap="5.0" layoutX="24.0" layoutY="14.0" AnchorPane.bottomAnchor="0.0"
                                  AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
                                  AnchorPane.topAnchor="0.0">
                            <columnConstraints>
                                <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
                                                   minWidth="10.0"/>
                                <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
                                <ColumnConstraints hgrow="ALWAYS" minWidth="10.0"/>
                            </columnConstraints>
                            <rowConstraints>
<!--                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>-->
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
                            </rowConstraints>
<!--                            <Label text="%lbl.config.licence"/>
                            <CheckBox id="chkLicenceAgree" fx:id="chkLicenceAgree"
                                      contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false"
                                      styleClass="notebook-mandatory-field" GridPane.columnIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.licence"/>
                                </tooltip>
                            </CheckBox>
                            <Label id="lblMustAgree" fx:id="lblMustAgree" style="-fx-text-fill: red;"
                                   text="%lbl.config.mustagree" visible="false"
                                   GridPane.columnIndex="2"/> -->

                            <Label text="%lbl.config.requirelogin" GridPane.rowIndex="0"/>
                            <CheckBox id="chkRequireLogin" fx:id="chkRequireLogin"
                                      contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false"
                                      GridPane.rowIndex="0" GridPane.columnIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.requirelogin"/>
                                </tooltip>
                            </CheckBox>

                            <Label text="%lbl.config.reset" GridPane.rowIndex="1"/>
                            <Button onAction="#btnResetOnAction" text="%btn.config.reset"
                                    GridPane.columnIndex="1" GridPane.rowIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.reset"/>
                                </tooltip>
                            </Button>

                        </GridPane>
                    </AnchorPane>
                </Tab>
                <Tab id="licenceTab" fx:id="licenceTab" disable="false" text="%tab.about.licence">
                    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                        <GridPane prefHeight="297.0" prefWidth="590.0" AnchorPane.bottomAnchor="5.0"
                                  AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
                                  AnchorPane.topAnchor="5.0">
                            <columnConstraints>
                                <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
                                                   minWidth="10.0"/>
                                <ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="485.0"/>
                            </columnConstraints>
                            <rowConstraints>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                            </rowConstraints>
                            <Label alignment="TOP_RIGHT" contentDisplay="RIGHT"
                                   text="%lbl.about.licence" textAlignment="RIGHT"
                                   GridPane.valignment="TOP"/>
                            <TextArea id="txtLicence" fx:id="txtLicence" editable="false"
                                      prefWidth="200.0" wrapText="true" GridPane.columnIndex="1"
                                      GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS"/>
                            <CheckBox id="chkLicenceAgree" fx:id="chkLicenceAgree" text="%lbl.config.licence"
                                      contentDisplay="LEFT" mnemonicParsing="false"
                                      styleClass="notebook-mandatory-field" GridPane.rowIndex="1" GridPane.columnIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.licence"/>
                                </tooltip>
                            </CheckBox>
                        </GridPane>
                    </AnchorPane>
                </Tab>
                <Tab id="jsonTab" disable="false" text="%tab.config.json">
                    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                        <GridPane hgap="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
                                  AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                            <columnConstraints>
                                <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
                                                   minWidth="10.0"/>
                                <ColumnConstraints hgrow="ALWAYS" minWidth="10.0"/>
                                <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="30.0"/>
                            </columnConstraints>
                            <rowConstraints>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
                            </rowConstraints>
                            <Label text="%lbl.config.jsononexit"/>
                            <CheckBox id="chkJsonOnExit" fx:id="chkJsonOnExit"
                                      contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false"
                                      GridPane.columnIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.jsononexit"/>
                                </tooltip>
                            </CheckBox>

                            <Label text="%lbl.config.jsondumpdir" GridPane.rowIndex="1"/>
                            <TextField id="txtJSONDumpDir" fx:id="txtJSONDumpDir"
                                       onAction="#txtJSONDumpDirOnAction" GridPane.columnIndex="1"
                                       GridPane.rowIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.jsondumpdir"/>
                                </tooltip>
                            </TextField>
                            <Button onAction="#btnBrowseJSONDumpOnAction" text="%btn.config.browse"
                                    textAlignment="CENTER" GridPane.columnIndex="2"
                                    GridPane.rowIndex="1"/>

                            <Label text="%lbl.config.jsonretaindumps" GridPane.rowIndex="2"/>
                            <Spinner id="txtJSONRetainDumps" fx:id="txtJSONRetainDumps" editable="true"
                                     GridPane.columnIndex="1" GridPane.rowIndex="2">
                                <valueFactory>
                                    <SpinnerValueFactory.IntegerSpinnerValueFactory min="0" max="100"/>
                                </valueFactory>
                                <tooltip>
                                    <Tooltip text="%tip.config.jsonretaindumps"/>
                                </tooltip>
                            </Spinner>
                            <Label text="%lbl.config.jsonloaddir" GridPane.rowIndex="3"/>
                            <TextField id="txtJSONLoadDir" fx:id="txtJSONLoadDir"
                                       onAction="#txtJSONLoadDirOnAction" GridPane.columnIndex="1"
                                       GridPane.rowIndex="3">
                                <tooltip>
                                    <Tooltip text="%tip.config.jsonloaddir"/>
                                </tooltip>
                            </TextField>
                            <Button onAction="#btnBrowseJSONLoadOnAction" text="%btn.config.browse"
                                    textAlignment="CENTER" GridPane.columnIndex="2" GridPane.rowIndex="3"/>

                            <Label text="%lbl.config.mostrecentdumpdir" GridPane.rowIndex="4" />
                            <TextField id="txtJSONMostRecentDumpDir" fx:id="txtJSONMostRecentDumpDir" editable="false"
                                   GridPane.rowIndex="4" GridPane.columnIndex="1" GridPane.columnSpan="2" />
                        </GridPane>
                    </AnchorPane>
                </Tab>
                <Tab id="hsqldbTab" fx:id="hsqldbTab" text="hsqldb" disable="true">
                    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                        <GridPane hgap="5.0" prefHeight="325.0" prefWidth="590.0"
                                  AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
                                  AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                            <columnConstraints>
                                <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
                                                   minWidth="10.0"/>
                                <ColumnConstraints hgrow="ALWAYS" minWidth="10.0"/>
                                <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" minWidth="30.0"/>
                            </columnConstraints>
                            <rowConstraints>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
                            </rowConstraints>
                            <!--                                    <Label text="%lbl.config.host" />
                                                                                <TextField id="txthsqldbHost" fx:id="txthsqldbHost" GridPane.columnIndex="1" />
                                                                                <Label text="%lbl.config.port" GridPane.rowIndex="1" />
                                                                                <TextField id="txthsqldbPort" fx:id="txthsqldbPort" GridPane.columnIndex="1" GridPane.rowIndex="1" />
                                            -->
                            <Label text="%lbl.config.directory" GridPane.rowIndex="0"/>
                            <TextField id="txthsqldbDirectory" fx:id="txthsqldbDirectory"
                                       onAction="#txthsqldbDirectoryOnAction" GridPane.columnIndex="1"
                                       GridPane.rowIndex="0">
                                <tooltip>
                                    <Tooltip text="%tip.config.hsqldbdirectory"/>
                                </tooltip>
                            </TextField>
                            <Button onAction="#btnBrowsehsqldbDirectoryOnAction"
                                    text="%btn.config.browse" textAlignment="CENTER"
                                    GridPane.columnIndex="2" GridPane.rowIndex="0"/>

                            <Label text="%lbl.config.database" GridPane.rowIndex="1"/>
                            <TextField id="txthsqldbDatabase" fx:id="txthsqldbDatabase" disable="true"
                                       GridPane.columnIndex="1" GridPane.rowIndex="1"/>

                            <Label text="%lbl.config.createdirectory" GridPane.rowIndex="2"/>
                            <GridPane hgap="5.0" GridPane.rowIndex="2" GridPane.columnIndex="1">
                                <columnConstraints>
                                    <ColumnConstraints halignment="LEFT" hgrow="NEVER" minWidth="10.0"/>
                                    <ColumnConstraints halignment="LEFT" hgrow="SOMETIMES"
                                                       minWidth="10.0"/>
                                </columnConstraints>
                                <rowConstraints>
                                    <RowConstraints minHeight="10.0" prefHeight="30.0"
                                                    vgrow="SOMETIMES"/>
                                </rowConstraints>
                                <RadioButton text="%lbl.config.createdirectory.empty"
                                             id="chkhsqlCreateEmpty" fx:id="chkhsqlCreateEmpty"
                                             disable="true" contentDisplay="RIGHT">
                                    <toggleGroup>
                                        <ToggleGroup fx:id="hsqldbCreate"/>
                                    </toggleGroup>
                                    <tooltip>
                                        <Tooltip text="%tip.config.hsqldbempty"/>
                                    </tooltip>
                                </RadioButton>
                                <RadioButton text="%lbl.config.createdirectory.init"
                                             id="chkhsqlCreateInit" fx:id="chkhsqlCreateInit"
                                             disable="true" toggleGroup="$hsqldbCreate"
                                             contentDisplay="RIGHT" GridPane.columnIndex="1">
                                    <tooltip>
                                        <Tooltip text="%tip.config.hsqldbinit"/>
                                    </tooltip>
                                </RadioButton>
                            </GridPane>

                            <Label text="%lbl.config.user" GridPane.rowIndex="3"/>
                            <TextField id="txthsqldbUser" fx:id="txthsqldbUser" GridPane.columnIndex="1"
                                       GridPane.rowIndex="3">
                                <tooltip>
                                    <Tooltip text="%tip.config.username"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.password" GridPane.rowIndex="4"/>
                            <PasswordField id="txthsqldbPassword" fx:id="txthsqldbPassword"
                                           GridPane.columnIndex="1" GridPane.rowIndex="4">
                                <tooltip>
                                    <Tooltip text="%tip.config.password"/>
                                </tooltip>
                            </PasswordField>

                            <Label text="%lbl.config.usemysql" GridPane.rowIndex="5"/>
                            <RadioButton id="chkhsqldbUse" fx:id="chkhsqldbUse" mnemonicParsing="false"
                                         onAction="#chkhsqldbUseOnAction" prefHeight="23.0"
                                         prefWidth="13.0" GridPane.columnIndex="1"
                                         GridPane.rowIndex="5">
                                <toggleGroup>
                                    <ToggleGroup fx:id="dbSelection"/>
                                </toggleGroup>
                                <tooltip>
                                    <Tooltip text="%tip.config.usethis"/>
                                </tooltip>
                            </RadioButton>

                            <Label text="%lbl.config.cache" GridPane.rowIndex="6"/>
                            <CheckBox id="chkhsqldbCache" fx:id="chkhsqldbCache"
                                      contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false"
                                      GridPane.columnIndex="1" GridPane.rowIndex="6">
                                <tooltip>
                                    <Tooltip text="%tip.config.cache"/>
                                </tooltip>
                            </CheckBox>
                        </GridPane>
                    </AnchorPane>
                </Tab>
                <Tab id="mssqlserverTab" fx:id="mssqlserverTab" text="MS SQLServer" disable="true">
                    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                        <GridPane hgap="5.0" prefHeight="325.0" prefWidth="590.0"
                                  AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
                                  AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                            <columnConstraints>
                                <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
                                                   minWidth="10.0"/>
                                <ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308"
                                                   minWidth="10.0" prefWidth="355.0"/>
                            </columnConstraints>
                            <rowConstraints>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
                            </rowConstraints>
                            <Label text="%lbl.config.host"/>
                            <TextField id="txtMSSQLServerHost" fx:id="txtMSSQLServerHost"
                                       GridPane.columnIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.host"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.port" GridPane.rowIndex="1"/>
                            <TextField id="txtMSSQLServerPort" fx:id="txtMSSQLServerPort"
                                       GridPane.columnIndex="1" GridPane.rowIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.port"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.database" GridPane.rowIndex="2"/>
                            <TextField id="txtMSSQLServerDatabase" fx:id="txtMSSQLServerDatabase"
                                       GridPane.columnIndex="1" GridPane.rowIndex="2">
                                <tooltip>
                                    <Tooltip text="%tip.config.database"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.user" GridPane.rowIndex="3"/>
                            <TextField id="txtMSSQLServerUser" fx:id="txtMSSQLServerUser"
                                       GridPane.columnIndex="1" GridPane.rowIndex="3">
                                <tooltip>
                                    <Tooltip text="%tip.config.username"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.password" GridPane.rowIndex="4"/>
                            <PasswordField id="txtMSSQLServerPassword" fx:id="txtMSSQLServerPassword"
                                           GridPane.columnIndex="1" GridPane.rowIndex="4">
                                <tooltip>
                                    <Tooltip text="%tip.config.password"/>
                                </tooltip>
                            </PasswordField>

                            <Label text="%lbl.config.timeout" GridPane.rowIndex="5"/>
                            <Spinner id="txtMSSQLServerTimeout" fx:id="txtMSSQLServerTimeout"
                                     editable="true" GridPane.columnIndex="1" GridPane.rowIndex="5">
                                <valueFactory>
                                    <SpinnerValueFactory.IntegerSpinnerValueFactory min="1"
                                                                                    max="10000"/>
                                </valueFactory>
                                <tooltip>
                                    <Tooltip text="%tip.config.timeout"/>
                                </tooltip>
                            </Spinner>

                            <Label text="%lbl.config.usemysql" GridPane.rowIndex="6"/>
                            <RadioButton id="chkMSSQLServerUse" fx:id="chkMSSQLServerUse"
                                         mnemonicParsing="false" onAction="#chkMSSQLServerUseOnAction"
                                         toggleGroup="$dbSelection" prefHeight="23.0" prefWidth="21.0"
                                         GridPane.columnIndex="1" GridPane.rowIndex="6">
                                <tooltip>
                                    <Tooltip text="%tip.config.usethis"/>
                                </tooltip>
                            </RadioButton>
                            <Label text="%lbl.config.cache" GridPane.rowIndex="7"/>
                            <CheckBox id="chkMSSQLServerCache" fx:id="chkMSSQLServerCache"
                                      contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false"
                                      GridPane.columnIndex="1" GridPane.rowIndex="7">
                                <tooltip>
                                    <Tooltip text="%tip.config.cache"/>
                                </tooltip>
                            </CheckBox>
                        </GridPane>
                    </AnchorPane>
                </Tab>
                <Tab id="mysqlTab" fx:id="mysqlTab" text="MySQL" disable="true">
                    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                        <GridPane hgap="5.0" prefHeight="325.0" prefWidth="590.0"
                                  AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
                                  AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                            <columnConstraints>
                                <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
                                                   minWidth="10.0"/>
                                <ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308"
                                                   minWidth="10.0" prefWidth="355.0"/>
                            </columnConstraints>
                            <rowConstraints>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
                            </rowConstraints>
                            <Label text="%lbl.config.host"/>
                            <TextField id="txtMySQLHost" fx:id="txtMySQLHost" GridPane.columnIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.host"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.port" GridPane.rowIndex="1"/>
                            <TextField id="txtMySQLPort" fx:id="txtMySQLPort" GridPane.columnIndex="1"
                                       GridPane.rowIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.port"/>
                                </tooltip>
                            </TextField>
                            <Label text="%lbl.config.database" GridPane.rowIndex="2"/>
                            <TextField id="txtMySQLDatabase" fx:id="txtMySQLDatabase"
                                       GridPane.columnIndex="1" GridPane.rowIndex="2">
                                <tooltip>
                                    <Tooltip text="%tip.config.database"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.user" GridPane.rowIndex="3"/>
                            <TextField id="txtMySQLUser" fx:id="txtMySQLUser" GridPane.columnIndex="1"
                                       GridPane.rowIndex="3">
                                <tooltip>
                                    <Tooltip text="%tip.config.username"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.password" GridPane.rowIndex="4"/>
                            <PasswordField id="txtMySQLPassword" fx:id="txtMySQLPassword"
                                           GridPane.columnIndex="1" GridPane.rowIndex="4">
                                <tooltip>
                                    <Tooltip text="%tip.config.password"/>
                                </tooltip>
                            </PasswordField>

                            <Label text="%lbl.config.timeout" GridPane.rowIndex="5"/>
                            <Spinner id="txtMySQLTimeout" fx:id="txtMySQLTimeout" editable="true"
                                     GridPane.columnIndex="1" GridPane.rowIndex="5">
                                <valueFactory>
                                    <SpinnerValueFactory.IntegerSpinnerValueFactory min="1"
                                                                                    max="10000"/>
                                </valueFactory>
                                <tooltip>
                                    <Tooltip text="%tip.config.timeout"/>
                                </tooltip>
                            </Spinner>

                            <Label text="%lbl.config.usemysql" GridPane.rowIndex="6"/>
                            <RadioButton id="chkMySQLUse" fx:id="chkMySQLUse" mnemonicParsing="false"
                                         onAction="#chkMySQLUseOnAction" toggleGroup="$dbSelection"
                                         prefHeight="23.0" prefWidth="21.0" GridPane.columnIndex="1"
                                         GridPane.rowIndex="6">
                                <tooltip>
                                    <Tooltip text="%tip.config.usethis"/>
                                </tooltip>
                            </RadioButton>
                            <Label text="%lbl.config.cache" GridPane.rowIndex="7"/>
                            <CheckBox id="chkMySQLCache" fx:id="chkMySQLCache"
                                      contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false"
                                      GridPane.columnIndex="1" GridPane.rowIndex="7">
                                <tooltip>
                                    <Tooltip text="%tip.config.cache"/>
                                </tooltip>
                            </CheckBox>
                        </GridPane>
                    </AnchorPane>
                </Tab>
                <Tab id="mariaDBTab" fx:id="mariaDBTab" text="MariaDB" disable="true">
                    <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
                        <GridPane hgap="5.0" prefHeight="325.0" prefWidth="590.0"
                                  AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
                                  AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                            <columnConstraints>
                                <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES"
                                                   minWidth="10.0"/>
                                <ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308"
                                                   minWidth="10.0" prefWidth="355.0"/>
                            </columnConstraints>
                            <rowConstraints>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
                                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
                            </rowConstraints>
                            <Label text="%lbl.config.host"/>
                            <TextField id="txtMariaDBHost" fx:id="txtMariaDBHost"
                                       GridPane.columnIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.host"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.port" GridPane.rowIndex="1"/>
                            <TextField id="txtMariaDBPort" fx:id="txtMariaDBPort"
                                       GridPane.columnIndex="1" GridPane.rowIndex="1">
                                <tooltip>
                                    <Tooltip text="%tip.config.port"/>
                                </tooltip>
                            </TextField>
                            <Label text="%lbl.config.database" GridPane.rowIndex="2"/>
                            <TextField id="txtMariaDBDatabase" fx:id="txtMariaDBDatabase"
                                       GridPane.columnIndex="1" GridPane.rowIndex="2">
                                <tooltip>
                                    <Tooltip text="%tip.config.database"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.user" GridPane.rowIndex="3"/>
                            <TextField id="txtMariaDBUser" fx:id="txtMariaDBUser"
                                       GridPane.columnIndex="1" GridPane.rowIndex="3">
                                <tooltip>
                                    <Tooltip text="%tip.config.username"/>
                                </tooltip>
                            </TextField>

                            <Label text="%lbl.config.password" GridPane.rowIndex="4"/>
                            <PasswordField id="txtMariaDBPassword" fx:id="txtMariaDBPassword"
                                           GridPane.columnIndex="1" GridPane.rowIndex="4">
                                <tooltip>
                                    <Tooltip text="%tip.config.password"/>
                                </tooltip>
                            </PasswordField>

                            <Label text="%lbl.config.timeout" GridPane.rowIndex="5"/>
                            <Spinner id="txtMariaDBTimeout" fx:id="txtMariaDBTimeout" editable="true"
                                     GridPane.columnIndex="1" GridPane.rowIndex="5">
                                <valueFactory>
                                    <SpinnerValueFactory.IntegerSpinnerValueFactory min="1"
                                                                                    max="10000"/>
                                </valueFactory>
                                <tooltip>
                                    <Tooltip text="%tip.config.timeout"/>
                                </tooltip>
                            </Spinner>

                            <Label text="%lbl.config.usemysql" GridPane.rowIndex="6"/>
                            <RadioButton id="chkMariaDBUse" fx:id="chkMariaDBUse"
                                         mnemonicParsing="false" onAction="#chkMariaDBUseOnAction"
                                         prefHeight="23.0" prefWidth="13.0" toggleGroup="$dbSelection"
                                         GridPane.columnIndex="1" GridPane.rowIndex="6">
                                <tooltip>
                                    <Tooltip text="%tip.config.usethis"/>
                                </tooltip>
                            </RadioButton>
                            <Label text="%lbl.config.cache" GridPane.rowIndex="7"/>
                            <CheckBox id="chkMariaDBCache" fx:id="chkMariaDBCache"
                                      contentDisplay="GRAPHIC_ONLY" mnemonicParsing="false"
                                      GridPane.columnIndex="1" GridPane.rowIndex="7">
                                <tooltip>
                                    <Tooltip text="%tip.config.cache"/>
                                </tooltip>
                            </CheckBox>
                        </GridPane>
                    </AnchorPane>
                </Tab>
            </TabPane>
        </center>
        <bottom>
            <ButtonBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER">
                <buttons>
                    <Button id="btnApply" fx:id="btnApply" defaultButton="true" mnemonicParsing="false"
                            onAction="#btnApplyOnAction" text="%btn.config.apply" styleClass="notebook-cmd-button"/>
                    <Button id="btnCancel" fx:id="btnCancel" cancelButton="true" disable="false" mnemonicParsing="false"
                            onAction="#btnCancelOnAction" text="%btn.config.cancel" styleClass="notebook-cmd-button"/>
                    <Button id="btnHelp" fx:id="btnHelp" disable="false" mnemonicParsing="false"
                            onAction="#btnHelpOnAction" text="%btn.config.help" styleClass="notebook-cmd-button"/>
                </buttons>
            </ButtonBar>
        </bottom>
    </BorderPane>
</fx:root>
