|
|
@@ -1,80 +1,78 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
+<?import javafx.geometry.Insets?>
|
|
|
<?import javafx.scene.control.Button?>
|
|
|
<?import javafx.scene.control.Label?>
|
|
|
<?import javafx.scene.control.ScrollPane?>
|
|
|
<?import javafx.scene.control.TextArea?>
|
|
|
-<?import javafx.scene.layout.ColumnConstraints?>
|
|
|
-<?import javafx.scene.layout.GridPane?>
|
|
|
-<?import javafx.scene.layout.RowConstraints?>
|
|
|
+<?import javafx.scene.layout.BorderPane?>
|
|
|
+<?import javafx.scene.layout.HBox?>
|
|
|
<?import javafx.scene.layout.VBox?>
|
|
|
<?import javafx.scene.text.Font?>
|
|
|
+<?import javafx.scene.effect.DropShadow?>
|
|
|
|
|
|
-<GridPane alignment="CENTER" maxHeight="300.0" maxWidth="600.0" minHeight="400.0" minWidth="600.0" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/24.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="space.anyi.chatServer.ui.controller.ServerController">
|
|
|
- <columnConstraints>
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- <ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0" prefWidth="50.0" />
|
|
|
- </columnConstraints>
|
|
|
- <rowConstraints>
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- <RowConstraints maxHeight="50.0" minHeight="10.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
|
|
- </rowConstraints>
|
|
|
- <children>
|
|
|
- <Label alignment="CENTER" maxHeight="80.0" maxWidth="600.0" minHeight="80.0" minWidth="600.0" prefHeight="80.0" prefWidth="600.0" text="聊天室 Server" GridPane.columnIndex="14" GridPane.columnSpan="12" GridPane.rowSpan="2">
|
|
|
- <font>
|
|
|
- <Font size="48.0" />
|
|
|
- </font>
|
|
|
- </Label>
|
|
|
- <ScrollPane fx:id="messagePane" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="14" GridPane.columnSpan="9" GridPane.rowIndex="2" GridPane.rowSpan="4">
|
|
|
- <content>
|
|
|
- <VBox alignment="TOP_CENTER" maxWidth="450.0" minHeight="200.0" minWidth="430.0" prefHeight="200.0" prefWidth="400.0" />
|
|
|
- </content>
|
|
|
- </ScrollPane>
|
|
|
- <ScrollPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="23" GridPane.columnSpan="3" GridPane.rowIndex="3" GridPane.rowSpan="5">
|
|
|
- <content>
|
|
|
- <VBox fx:id="userList" alignment="TOP_CENTER" prefHeight="250.0" prefWidth="150.0" />
|
|
|
- </content>
|
|
|
- </ScrollPane>
|
|
|
- <TextArea fx:id="inputMessage" maxWidth="400.0" minHeight="100.0" minWidth="400.0" prefColumnCount="1" prefHeight="200.0" prefRowCount="1" prefWidth="200.0" promptText="服务器广播信息" GridPane.columnIndex="14" GridPane.columnSpan="8" GridPane.rowIndex="6" GridPane.rowSpan="2">
|
|
|
- <font>
|
|
|
- <Font size="14.0" />
|
|
|
- </font>
|
|
|
- </TextArea>
|
|
|
- <Button fx:id="bu" alignment="CENTER" maxHeight="100.0" maxWidth="50.0" minHeight="100.0" minWidth="50.0" mnemonicParsing="false" onMouseClicked="#sendMessage" prefHeight="100.0" prefWidth="50.0" text="发送" GridPane.columnIndex="22" GridPane.rowIndex="6" GridPane.rowSpan="2" />
|
|
|
- <Label fx:id="onlineLabel" alignment="CENTER" maxHeight="50.0" maxWidth="150.0" minHeight="50.0" minWidth="150.0" prefHeight="50.0" prefWidth="150.0" style="-fx-border-color: #fff;" text="在线人数:0" GridPane.columnIndex="23" GridPane.columnSpan="3" GridPane.rowIndex="2">
|
|
|
- <font>
|
|
|
- <Font size="14.0" />
|
|
|
- </font>
|
|
|
- </Label>
|
|
|
- </children>
|
|
|
-</GridPane>
|
|
|
+<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" style="-fx-background-color: linear-gradient(to bottom right, #667eea 0%, #764ba2 100%);" xmlns="http://javafx.com/javafx/24.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="space.anyi.chatServer.ui.controller.ServerController">
|
|
|
+ <top>
|
|
|
+ <VBox alignment="CENTER" spacing="10" style="-fx-background-color: rgba(255,255,255,0.1); -fx-background-radius: 0 0 10 10;" BorderPane.alignment="CENTER">
|
|
|
+ <padding>
|
|
|
+ <Insets top="20" right="20" bottom="20" left="20" />
|
|
|
+ </padding>
|
|
|
+ <Label text="聊天室服务器" textFill="WHITE">
|
|
|
+ <font>
|
|
|
+ <Font name="System Bold" size="32.0" />
|
|
|
+ </font>
|
|
|
+ <effect>
|
|
|
+ <DropShadow radius="5.0" color="rgba(0,0,0,0.3)" />
|
|
|
+ </effect>
|
|
|
+ </Label>
|
|
|
+ <Label fx:id="onlineLabel" text="在线人数: 0" textFill="WHITE" style="-fx-background-color: rgba(255,255,255,0.2); -fx-background-radius: 15; -fx-padding: 5 15 5 15;">
|
|
|
+ <font>
|
|
|
+ <Font name="System" size="14.0" />
|
|
|
+ </font>
|
|
|
+ </Label>
|
|
|
+ </VBox>
|
|
|
+ </top>
|
|
|
+ <center>
|
|
|
+ <HBox spacing="20" BorderPane.alignment="CENTER">
|
|
|
+ <padding>
|
|
|
+ <Insets top="10" right="20" bottom="10" left="20" />
|
|
|
+ </padding>
|
|
|
+ <VBox spacing="10" prefWidth="600" maxWidth="600">
|
|
|
+ <Label text="系统消息" textFill="WHITE">
|
|
|
+ <font>
|
|
|
+ <Font name="System Bold" size="16.0" />
|
|
|
+ </font>
|
|
|
+ </Label>
|
|
|
+ <ScrollPane fx:id="messagePane" style="-fx-background-color: rgba(255,255,255,0.9); -fx-background-radius: 10;" prefHeight="350" prefWidth="580">
|
|
|
+ <content>
|
|
|
+ <VBox alignment="TOP_LEFT" spacing="5" style="-fx-padding: 10;" />
|
|
|
+ </content>
|
|
|
+ </ScrollPane>
|
|
|
+ <HBox spacing="10" alignment="CENTER_LEFT">
|
|
|
+ <TextArea fx:id="inputMessage" promptText="输入广播消息..." style="-fx-background-color: rgba(255,255,255,0.9); -fx-background-radius: 10; -fx-border-color: rgba(255,255,255,0.3); -fx-border-radius: 10;" prefHeight="60" prefWidth="500" wrapText="true">
|
|
|
+ <font>
|
|
|
+ <Font size="14.0" />
|
|
|
+ </font>
|
|
|
+ </TextArea>
|
|
|
+ <Button fx:id="bu" mnemonicParsing="false" onMouseClicked="#sendMessage" text="发送" style="-fx-background-color: #4CAF50; -fx-text-fill: white; -fx-background-radius: 10; -fx-font-weight: bold;" prefHeight="60" prefWidth="70">
|
|
|
+ <font>
|
|
|
+ <Font size="14.0" />
|
|
|
+ </font>
|
|
|
+ </Button>
|
|
|
+ </HBox>
|
|
|
+ </VBox>
|
|
|
+ <VBox spacing="10" prefWidth="150" maxWidth="150">
|
|
|
+ <Label text="在线用户" textFill="WHITE">
|
|
|
+ <font>
|
|
|
+ <Font name="System Bold" size="16.0" />
|
|
|
+ </font>
|
|
|
+ </Label>
|
|
|
+ <ScrollPane style="-fx-background-color: rgba(255,255,255,0.9); -fx-background-radius: 10;" prefHeight="350" prefWidth="140">
|
|
|
+ <content>
|
|
|
+ <VBox fx:id="userList" alignment="TOP_CENTER" spacing="5" style="-fx-padding: 10;" />
|
|
|
+ </content>
|
|
|
+ </ScrollPane>
|
|
|
+ </VBox>
|
|
|
+ </HBox>
|
|
|
+ </center>
|
|
|
+</BorderPane>
|