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

<!--
/*
 * Copyright (C) 2018 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
 * 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/gpl.html>.
 */

-->

<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>

<fx:root type="javafx.scene.layout.GridPane" hgap="5.0" vgap="5.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="404.0"
         prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1">
    <stylesheets>
        <URL value="@notebook.css"/>
    </stylesheets>

    <columnConstraints>
        <ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
        <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
    </columnConstraints>

    <rowConstraints>
        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="NEVER"/>
        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="NEVER"/>
        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS"/>
        <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="NEVER"/>
    </rowConstraints>

    <padding>
        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
    </padding>

    <Label text="%lbl.name" alignment="CENTER_RIGHT" prefHeight="17.0" GridPane.halignment="RIGHT" GridPane.rowIndex="0" GridPane.columnIndex="0"/>
    <TextField id="fldName" fx:id="fldName" editable="true" prefWidth="150.0" styleClass="notebook-mandatory-field" GridPane.rowIndex="0"
               GridPane.columnIndex="1"/>
    <Label text="%lbl.description" alignment="CENTER_RIGHT" prefHeight="17.0" GridPane.halignment="RIGHT" GridPane.rowIndex="1" GridPane.columnIndex="0"/>
    <TextField id="fldDescription" fx:id="fldDescription" editable="true" prefWidth="150.0" GridPane.rowIndex="1" GridPane.columnIndex="1">
        <tooltip>
            <Tooltip text="%tip.wildlifespecies.description"/>
        </tooltip>
    </TextField>
    <Label text="%lbl.comments" GridPane.halignment="RIGHT" GridPane.valignment="TOP" prefHeight="17.0" GridPane.rowIndex="2" GridPane.columnIndex="0"/>
    <TableView fx:id="tbvComment" id="tbvComment" editable="true" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.columnSpan="2147483647"
               GridPane.rowIndex="2">
        <columns>
            <TableColumn fx:id="tbvCommentDate" minWidth="50.0" prefWidth="-1.0" text="%col.comment.date"/>
            <TableColumn fx:id="tbvCommentText" minWidth="50.0" prefWidth="-1.0" text="%col.comment.text"/>
        </columns>
    </TableView>

    <ButtonBar prefHeight="40.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.rowIndex="3">
        <buttons>
            <Button id="btnCancel" cancelButton="true" mnemonicParsing="false" text="%btn.cancel" onAction="#btnCancelOnAction"
                    styleClass="notebook-cmd-button"/>
            <Button id="btnSave" fx:id="btnSave" mnemonicParsing="false" text="%btn.save" onAction="#btnSaveOnAction"
                    styleClass="notebook-cmd-button"/>   <!-- defaultButton="true" -->
            <Button id="btnDelete" fx:id="btnDelete" mnemonicParsing="false" text="%btn.delete" onAction="#btnDeleteOnAction" styleClass="notebook-cmd-button"/>
        </buttons>
    </ButtonBar>

</fx:root>
