mystyle-java-fx-tools/src/main/resources/fxml/http-server.fxml

41 lines
3.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Text?>
<AnchorPane prefHeight="649.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.zhangmeng.tools.controller.HttpServerController">
<children>
<Label layoutX="75.0" layoutY="39.0" text="服务器端口:" />
<TextField fx:id="server_port" layoutX="154.0" layoutY="35.0" prefHeight="25.0" prefWidth="281.0" />
<TextField fx:id="file_dir_root" layoutX="562.0" layoutY="35.0" prefHeight="25.0" prefWidth="281.0" />
<Label layoutX="482.0" layoutY="39.0" text="文件根目录:" />
<Text layoutX="849.0" layoutY="52.0" strokeType="OUTSIDE" strokeWidth="0.0" text="(静态文件访问)" />
<Label layoutX="471.0" layoutY="129.0" text="返回数据类型:" />
<ComboBox fx:id="data_combox" layoutX="563.0" layoutY="125.0" prefHeight="25.0" prefWidth="151.0" />
<Label layoutX="78.0" layoutY="217.0" text="接口列表:" />
<ListView fx:id="api_list" layoutX="155.0" layoutY="225.0" prefHeight="282.0" prefWidth="979.0" AnchorPane.bottomAnchor="142.0" AnchorPane.leftAnchor="155.0" AnchorPane.rightAnchor="66.0" AnchorPane.topAnchor="225.0" />
<Label layoutX="103.0" layoutY="83.0" text="接口:" />
<TextField fx:id="server_api" layoutX="154.0" layoutY="79.0" prefHeight="25.0" prefWidth="281.0" />
<Button fx:id="add_api" layoutX="779.0" layoutY="125.0" mnemonicParsing="false" text="添加接口" />
<Button fx:id="server" layoutX="470.0" layoutY="546.0" mnemonicParsing="false" text="启动服务" AnchorPane.bottomAnchor="78.0" />
<RadioButton fx:id="common_api" layoutX="572.0" layoutY="83.0" mnemonicParsing="false" text="普通接口" />
<RadioButton fx:id="file_api" layoutX="659.0" layoutY="83.0" mnemonicParsing="false" text="文件接口" />
<Label layoutX="490.0" layoutY="83.0" text="接口类型:" />
<Label layoutX="55.0" layoutY="129.0" text="返回数据来源:" />
<RadioButton fx:id="res_json" layoutX="154.0" layoutY="129.0" mnemonicParsing="false" text="文件返回(json文件)" />
<RadioButton fx:id="custom_res" layoutX="295.0" layoutY="129.0" mnemonicParsing="false" text="自定义返回内容" />
<Label layoutX="458.0" layoutY="174.0" text="自定义返回内容:" />
<TextField fx:id="custom_res_content" layoutX="562.0" layoutY="170.0" prefHeight="25.0" prefWidth="572.0" AnchorPane.leftAnchor="562.0" AnchorPane.rightAnchor="66.0" />
<Label layoutX="20.0" layoutY="174.0" text="选择返回的json文件:" />
<Button fx:id="choose_json_button" layoutX="155.0" layoutY="170.0" mnemonicParsing="false" text="Button" />
<TextField fx:id="json_file_path" layoutX="227.0" layoutY="170.0" prefHeight="25.0" prefWidth="207.0" />
<Button fx:id="stop_server" layoutX="590.0" layoutY="546.0" mnemonicParsing="false" text="停止服务" AnchorPane.bottomAnchor="78.0" />
</children>
</AnchorPane>