1. 新增了多窗口切换功能

2. 新增多个example示例可供使用参考
3. 修正信号收发机制的bug
4. 规范化部分代码,并加以部分注释
5. 修改README
This commit is contained in:
suisui
2019-12-10 23:04:44 +08:00
parent 5cc7e57a88
commit c0684c7501
44 changed files with 1438 additions and 1528 deletions

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.Pane?>
<fx:root prefHeight="191.0" prefWidth="607.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.edu.scau.biubiusuisui.example.actionDemo.MainController">
<children>
<TextField fx:id="time" layoutX="108.0" layoutY="28.0" prefHeight="28.0" prefWidth="330.0" />
<Label fx:id="us" layoutX="108.0" layoutY="75.0" prefHeight="24.0" prefWidth="330.0" text="US:" />
<Label fx:id="jp" layoutX="108.0" layoutY="107.0" prefHeight="24.0" prefWidth="330.0" text="JP:" />
<Label fx:id="uk" layoutX="108.0" layoutY="142.0" prefHeight="24.0" prefWidth="330.0" text="UK:" />
<Label layoutX="67.0" layoutY="77.0" text="US" />
<Label layoutX="69.0" layoutY="109.0" text="JP" />
<Label layoutX="66.0" layoutY="144.0" text="UK" />
</children>
</fx:root>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.Pane?>
<fx:root prefHeight="191.0" prefWidth="607.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.edu.scau.biubiusuisui.example.actionDemo.MainController">
<children>
<TextField fx:id="time" layoutX="108.0" layoutY="28.0" prefHeight="28.0" prefWidth="330.0"/>
<Label fx:id="us" layoutX="108.0" layoutY="75.0" prefHeight="24.0" prefWidth="330.0" text="US:"/>
<Label fx:id="jp" layoutX="108.0" layoutY="107.0" prefHeight="24.0" prefWidth="330.0" text="JP:"/>
<Label fx:id="uk" layoutX="108.0" layoutY="142.0" prefHeight="24.0" prefWidth="330.0" text="UK:"/>
<Label layoutX="67.0" layoutY="77.0" text="US"/>
<Label layoutX="69.0" layoutY="109.0" text="JP"/>
<Label layoutX="66.0" layoutY="144.0" text="UK"/>
</children>
</fx:root>

View File

@@ -3,10 +3,9 @@
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.Pane?>
<fx:root prefHeight="600.0" prefWidth="800.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.edu.scau.biubiusuisui.example.listDemo.MainController">
<children>
<ListView fx:id="list" layoutX="32.0" layoutY="62.0" prefHeight="489.0" prefWidth="728.0" />
<Button layoutX="691.0" layoutY="564.0" mnemonicParsing="false" onAction="#addName" text="Button" />
</children>
<children>
<ListView fx:id="userNameListView" layoutX="144.0" layoutY="46.0" prefHeight="457.0" prefWidth="423.0"/>
<Button layoutX="602.0" layoutY="489.0" mnemonicParsing="false" onAction="#addUserName" text="addUserName"/>
</children>
</fx:root>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import cn.edu.scau.biubiusuisui.example.mqDemo.TopBarController?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
prefWidth="600.0" type="Pane" xmlns="http://javafx.com/javafx/10.0.2-internal"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.edu.scau.biubiusuisui.example.mqDemo.MainController">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
<TopBarController/>
<TextArea fx:id="outTA" editable="false" prefHeight="350.0" prefWidth="600.0" wrapText="true"/>
</children>
</VBox>
</children>
</fx:root>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="50.0"
prefWidth="600.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="cn.edu.scau.biubiusuisui.example.mqDemo.TopBarController">
<children>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="600.0" spacing="20.0">
<children>
<Button mnemonicParsing="false" onAction="#indexClick" prefHeight="50.0" prefWidth="100.0" text="首页"/>
<Button mnemonicParsing="false" onAction="#scoreClick" prefHeight="50.0" prefWidth="100.0" text="积分中心"/>
<Button mnemonicParsing="false" onAction="#questionClick" prefHeight="50.0" prefWidth="100.0"
text="问答中心"/>
<Button mnemonicParsing="false" onAction="#selfClick" prefHeight="50.0" prefWidth="100.0" text="个人中心"/>
</children>
</HBox>
</children>
</fx:root>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
prefWidth="400.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label layoutX="103.0" layoutY="100.0" text="这是一个弹窗......">
<font>
<Font size="24.0"/>
</font>
</Label>
</children>
</fx:root>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0"
prefWidth="800.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="cn.edu.scau.biubiusuisui.example.redirectDemo.LoginController">
<children>
<VBox alignment="CENTER" layoutX="265.0" layoutY="100.0" prefHeight="300.0" prefWidth="250.0" spacing="10.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="250.0" text="登录">
<font>
<Font size="27.0"/>
</font>
</Label>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="50.0" text="用户名:"/>
<TextField fx:id="usernameTF"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="50.0" text="密码:"/>
<PasswordField fx:id="passwordPF"/>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="200.0">
<children>
<Label onMouseClicked="#registerClick" prefHeight="50.0" text="还没有账户,去注册" underline="true">
<HBox.margin>
<Insets right="10.0"/>
</HBox.margin>
</Label>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" onAction="#redirectToDialog" text="测试弹窗的按钮">
<HBox.margin>
<Insets right="20.0"/>
</HBox.margin>
</Button>
</children>
</HBox>
</children>
</VBox>
</children>
</fx:root>

View File

@@ -0,0 +1,8 @@
#content {
alignment: center;
}
#content .label {
-fx-pref-height: 50;
-fx-pref-width: 100;
}

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0"
prefWidth="600.0" stylesheets="@register.css" type="Pane" xmlns="http://javafx.com/javafx/8.0.171"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="cn.edu.scau.biubiusuisui.example.redirectDemo.RegisterController">
<children>
<VBox alignment="CENTER" layoutX="100.0" layoutY="55.0" prefHeight="350.0" prefWidth="400.0">
<children>
<HBox prefHeight="50.0" prefWidth="200.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="404.0" text="注册">
<font>
<Font size="24.0"/>
</font>
</Label>
</children>
</HBox>
<VBox id="content" alignment="CENTER" prefHeight="350.0" prefWidth="400.0">
<children>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label text="用户名:"/>
<TextField fx:id="usernameTF"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label text="电子邮箱:"/>
<TextField fx:id="emailTF"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label text="密码:"/>
<PasswordField fx:id="passwordPF"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label text="确认密码:"/>
<PasswordField fx:id="confirmPasswordPF"/>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="200.0">
<children>
<Label minWidth="150.0" onMouseClicked="#loginClick" prefWidth="151.0" text="已有账号,前往登录"
underline="true"/>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" onAction="#registerClick" text="注册">
<HBox.margin>
<Insets right="50.0"/>
</HBox.margin>
</Button>
</children>
</HBox>
</children>
</VBox>
</children>
</VBox>
</children>
</fx:root>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0"
prefWidth="600.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="cn.edu.scau.biubiusuisui.example.redirectDemo.SuccessController">
<children>
<VBox alignment="CENTER" layoutX="158.0" layoutY="80.0" prefHeight="300.0" prefWidth="250.0" spacing="10.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="250.0" text="登录成功">
<font>
<Font size="27.0"/>
</font>
</Label>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="50.0" text="用户名:"/>
<Label fx:id="usernameLabel" alignment="CENTER" prefHeight="50.0" prefWidth="150.0"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="50.0" text="密码:"/>
<Label fx:id="passwordLabel" alignment="CENTER" prefHeight="50.0" prefWidth="150.0"/>
</children>
</HBox>
</children>
</VBox>
<Button layoutX="421.0" layoutY="367.0" mnemonicParsing="false" onAction="#redirectToLogin" text="返回主界面"/>
</children>
</fx:root>