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

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<BorderPane id="root" fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="700.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
    <top>
        <HBox alignment="CENTER_LEFT" prefHeight="40.0" prefWidth="900.0" spacing="10.0">
            <Button mnemonicParsing="false" onAction="#onTableCreateNewAction" text="新建">
                <HBox.margin>
                    <Insets left="10.0" />
                </HBox.margin>
            </Button>
            <Button mnemonicParsing="false" onAction="#onTableRefreshAction" text="刷新">
                <HBox.margin>
                    <Insets left="10.0" />
                </HBox.margin>
            </Button>
            <Button mnemonicParsing="false" onAction="#onTableDeleteAction" text="删除">
                <HBox.margin>
                    <Insets left="10.0" />
                </HBox.margin>
            </Button>
            <TextField fx:id="searchField" promptText="搜索..." HBox.hgrow="ALWAYS">
                <HBox.margin>
                    <Insets left="10.0" right="10.0" />
                </HBox.margin>
            </TextField>
        </HBox>
    </top>
    <center>
        <TableView fx:id="table" prefHeight="600.0" prefWidth="900.0">
            <columns>
                <TableColumn fx:id="idColumn" prefWidth="80.0" text="ID" />
                <TableColumn fx:id="codeColumn" prefWidth="120.0" text="发票编号" />
                <TableColumn fx:id="nameColumn" prefWidth="150.0" text="发票名称" />
                <TableColumn fx:id="contractColumn" prefWidth="100.0" text="合同ID" />
                <TableColumn fx:id="contractItemColumn" prefWidth="100.0" text="合同项目ID" />
            </columns>
        </TableView>
    </center>
    <bottom>
        <HBox alignment="CENTER" prefHeight="40.0" prefWidth="900.0" spacing="10.0">
            <Label fx:id="pageInfoLabel" text="第 1 页，共 1 页" />
            <Button mnemonicParsing="false" onAction="#onPrevPageAction" text="上一页" />
            <Button mnemonicParsing="false" onAction="#onNextPageAction" text="下一页" />
            <Button mnemonicParsing="false" onAction="#onFirstPageAction" text="首页" />
            <Button mnemonicParsing="false" onAction="#onLastPageAction" text="末页" />
            <TextField fx:id="pageField" prefWidth="60.0" text="1" />
            <Button mnemonicParsing="false" onAction="#onGotoPageAction" text="跳转" />
        </HBox>
    </bottom>
</BorderPane>