<?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.0.1   Updated Copyright and version
        2.1.0   Updated version
                Added display of current database connection
        2.2.1   Show directory for hsqldb
        2.4.0   Use version string in TopController
        2.6.0   Change dates on Copyright string - it's for the application, not just this page!
        3.0.6   Change dates on Copyright string - it's for the application, not just this page!
        3.1.0   Change dates on Copyright string - it's for the application, not just this page!
*/

-->

<?import java.net.URL?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TextArea?>
<?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?>

<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">
        <bottom>
            <ButtonBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER">
                <buttons>
                    <Button cancelButton="true" mnemonicParsing="false" onAction="#btnCloseOnAction"
                            text="%btn.about.close" styleClass="notebook-cmd-button"/>
                </buttons>
            </ButtonBar>
        </bottom>
        <center>
            <TabPane maxHeight="1.7976931348623157E308" prefHeight="347.0" prefWidth="590.0"
                     tabClosingPolicy="UNAVAILABLE" BorderPane.alignment="CENTER">
                <Tab id="mysqlTab" fx:id="mysqlTab" text="%tab.about.general">
                    <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="CENTER" hgrow="SOMETIMES"
                                                   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="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 style="-fx-font-weight: bold; -fx-font-size: 150%;"
                                   text="Garden Notebook"/>
                            <Label fx:id="lblNotebookVersion" text="Version 3.1.0"
                                   GridPane.rowIndex="1"/>
                            <Label text="Copyright (C) 2018-2023 Andrew Gegg." GridPane.rowIndex="2"/>
                            <Label text="This is free software" GridPane.rowIndex="3"/>
                            <Label text="Issued under the GNU General Public Licence, version 3."
                                   GridPane.rowIndex="4"/>
                            <Label text="Web site: https://gardennotebook.co.uk" GridPane.rowIndex="5"/>
                            <GridPane fx:id="dbDetails" visible="false" hgap="5.0"
                                      GridPane.rowIndex="6"
                                      maxWidth="-Infinity"> <!-- -Infinity is USE_PREF_SIZE -->
                                <columnConstraints>
                                    <ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
                                    <ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
                                    <ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
                                    <ColumnConstraints hgrow="SOMETIMES" 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="SOMETIMES"/>
                                    <RowConstraints minHeight="10.0" prefHeight="30.0"
                                                    vgrow="ALWAYS"/>
                                </rowConstraints>
                                <Label text="%lbl.about.dbrdbms" alignment="CENTER_RIGHT"
                                       GridPane.halignment="RIGHT"/>
                                <Label fx:id="dbActiveRDBMS" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="1"/>
                                <Label text="%lbl.about.dbversion" alignment="CENTER_RIGHT"
                                       GridPane.halignment="RIGHT" GridPane.columnIndex="2"/>
                                <Label fx:id="dbVersion" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="3"/>

                                <Label fx:id="dbHostLbl" text="%lbl.config.host"
                                       alignment="CENTER_RIGHT" GridPane.halignment="RIGHT"
                                       GridPane.rowIndex="1"/>
                                <Label fx:id="dbHost" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="1" GridPane.rowIndex="1"/>
                                <Label fx:id="dbPortLbl" text="%lbl.config.port"
                                       alignment="CENTER_RIGHT" GridPane.halignment="RIGHT"
                                       GridPane.columnIndex="2" GridPane.rowIndex="1"/>
                                <Label fx:id="dbPort" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="3" GridPane.rowIndex="1"/>

                                <Label fx:id="dbDirectoryLbl" text="%lbl.config.directory"
                                       alignment="CENTER_RIGHT" GridPane.halignment="RIGHT"
                                       GridPane.rowIndex="1"/>
                                <Label fx:id="dbDirectory" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="1" GridPane.rowIndex="1"
                                       GridPane.ColumnSpan="3"/>

                                <Label text="%lbl.config.user" alignment="CENTER_RIGHT"
                                       GridPane.halignment="RIGHT" GridPane.rowIndex="2"/>
                                <Label fx:id="dbUser" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="1" GridPane.rowIndex="2"/>

                                <Label text="%lbl.config.database" alignment="CENTER_RIGHT"
                                       GridPane.halignment="RIGHT" GridPane.rowIndex="3"/>
                                <Label fx:id="dbDatabase" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="1" GridPane.rowIndex="3"/>
                                <Label fx:id="dbSchemaLbl" text="%lbl.config.schema"
                                       alignment="CENTER_RIGHT" GridPane.halignment="RIGHT"
                                       GridPane.columnIndex="2" GridPane.rowIndex="3"/>
                                <Label fx:id="dbSchema" text="unknown"
                                       style="-fx-background-color: lightgrey;"
                                       GridPane.columnIndex="3" GridPane.rowIndex="3"/>
                            </GridPane>
                        </GridPane>
                    </AnchorPane>
                </Tab>
                <Tab 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>
                            <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"/>
                        </GridPane>
                    </AnchorPane>
                </Tab>
            </TabPane>
        </center>
    </BorderPane>
</fx:root>
