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

<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>

<VBox spacing="10" xmlns:fx="http://javafx.com/fxml"
      fx:controller="com.zhangmeng.online.exam.ui.controller.UserListController">
    <padding>
        <Insets top="10" right="10" bottom="10" left="10"/>
    </padding>
    <children>
        <HBox spacing="10" alignment="CENTER_LEFT">
            <TextField fx:id="searchField" promptText="输入关键字搜索..." HBox.hgrow="ALWAYS"/>
            <Button text="搜索" onAction="#handleSearch"/>
            <Region HBox.hgrow="ALWAYS"/>
            <Button fx:id="addButton" text="添加用户" onAction="#handleAdd"/>
        </HBox>
        <TableView fx:id="userTable" VBox.vgrow="ALWAYS">
            <columns>
                <TableColumn fx:id="idColumn" text="ID" prefWidth="50"/>
                <TableColumn fx:id="usernameColumn" text="用户名" prefWidth="100"/>
                <TableColumn fx:id="nameColumn" text="姓名" prefWidth="100"/>
                <TableColumn fx:id="emailColumn" text="邮箱" prefWidth="150"/>
                <TableColumn fx:id="statusColumn" text="状态" prefWidth="80"/>
                <TableColumn fx:id="actionColumn" text="操作" prefWidth="150"/>
            </columns>
        </TableView>
    </children>
</VBox>