package com.zhangmeng.online.exam.ui.api.form;

import com.zhangmeng.online.exam.ui.api.ApiUtils;
import com.zhangmeng.online.exam.ui.api.DataLoad;
import com.zhangmeng.online.exam.ui.api.form.base.Form;
import com.zhangmeng.online.exam.ui.api.model.UserDataLoad;
import com.zhangmeng.online.exam.ui.components.DynamicTableComponent;
import com.zhangmeng.online.exam.ui.components.callBack.DynamicTableComponentCallBack;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.ObservableList;
import javafx.scene.control.*;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

/**
 * @author zm
 * @date 2025/3/15 11:38
 * @version: 1.0
 */
public class RoleForm extends Form {

    public RoleForm() {
        Label label1 = new Label("类型:");
        label1.setLayoutX(135.0);
        label1.setLayoutY(84.0);
        Label label2 = new Label("角色名称:");
        label2.setLayoutX(130.0);
        label2.setLayoutY(145.0);
        Label label3 = new Label("角色描述:");
        label3.setLayoutX(123.0);
        label3.setLayoutY(209.0);

        ChoiceBox choiceBox = new ChoiceBox();
        choiceBox.setLayoutX(200);
        choiceBox.setLayoutY(80.0);
        choiceBox.setPrefHeight(23.0);
        choiceBox.setPrefWidth(229.0);
        choiceBox.getItems().addAll("管理员", "教师", "学生");
        choiceBox.setTooltip(new Tooltip("请选择类型"));

        TextField textField1 = new TextField();
        textField1.setLayoutX(200.0);
        textField1.setLayoutY(141.0);
        textField1.setPrefHeight(23.0);
        textField1.setPrefWidth(229.0);

        TextField textField2 = new TextField();
        textField2.setLayoutX(200);
        textField2.setLayoutY(205.0);
        textField2.setPrefHeight(23.0);
        textField2.setPrefWidth(229.0);

        Button button1 = new Button("保存");
        button1.setLayoutX(267.0);
        button1.setLayoutY(289.0);
        button1.setMnemonicParsing(false);
        button1.setText("保存");

        this.getChildren().addAll(label1, label2, label3, choiceBox, textField1, textField2, button1);

    }
}
