update:调整项目结构,将example独立抽离module

This commit is contained in:
suisui
2021-09-16 00:40:18 +08:00
parent 3543f8acd3
commit 2fc8a622ab
140 changed files with 101 additions and 5 deletions

View File

Binary file not shown.

View File

23
javafx-plus-demo/pom.xml Normal file
View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gitee.Biubiuyuyu</groupId>
<artifactId>javafx-plus-demo</artifactId>
<version>1.3.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<javafx-plus.version>1.3.0-SNAPSHOT</javafx-plus.version>
</properties>
<dependencies>
<dependency>
<groupId>com.gitee.Biubiuyuyu</groupId>
<artifactId>javafx-plus</artifactId>
<version>${javafx-plus.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,21 @@
package cn.edu.scau.biubiusuisui.example.bindDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author jack
* @author suisui
* @version 1.2
* @date 2020/5/1 1:43
* @since JavaFX2.0 JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.bindDemo")
public class BindDemo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
FXPlusApplication.start(BindDemo.class);
}
}

View File

@@ -0,0 +1,130 @@
package cn.edu.scau.biubiusuisui.example.bindDemo;
import cn.edu.scau.biubiusuisui.annotation.FXBind;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
import java.net.URL;
import java.util.ResourceBundle;
/**
* @author jack
* @author suisui
* @version 1.2
* @date 2020/5/1 1:43
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/bindDemo/bindDemo.fxml")
@FXWindow(title = "bindDemo", mainStage = true)
// TODO 待完善
public class MainController extends FXBaseController implements Initializable {
// View bind to View
@FXML
@FXBind("text=${inputTF.text}")
private Label inputLabel;
@FXML
private TextField inputTF;
// View bind to a Java Bean
@FXML
private Label usernameLabel;
@FXML
private Label userPswLabel;
@FXML
private Label ageLabel;
@FXML
private Label enableLabel;
@FXML
private TextField usernameTF;
@FXML
private PasswordField pswPF;
@FXML
private TextField ageTF;
@FXML
private ToggleGroup enableButtons;
//
// @FXData
// @FXBind({
// "name=${usernameTF.text}",
// "password=${pswPF.text}",
// "age=${ageTF.text}",
// "isEnable=${enableButtons.getSelectedToggle().getUserData()}"
// })
// private User user = new User();
private UserPropertyEntity user = new UserPropertyEntity();
// View bind to Expression
@FXML
private TextField money;
@FXML
@FXBind("text=${@toUs(money.text)}")
private Label us;
@FXML
@FXBind("text=${@toJp(money.text)}")
private Label jp;
@FXML
@FXBind("text=${@toUk(money.text)}")
private Label uk;
@Override
public void initialize(URL location, ResourceBundle resources) {
money.setText("0");
money.textProperty().addListener(new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
if (null == newValue || "".equals(newValue)) {
money.setText("0");
} else if (!newValue.matches("^[0-9]*$")) {
money.setText(oldValue);
}
}
});
}
@FXML
public void clickToShowInfo() {
RadioButton button = (RadioButton) enableButtons.getSelectedToggle();
System.out.println(button.getText());
usernameLabel.setText(user.getName());
userPswLabel.setText(user.getPassword());
ageLabel.setText(Integer.toString(user.getAge()));
enableLabel.setText(Boolean.toString(user.getEnable()));
}
public String toUs(String value) {
double money = Double.valueOf(value);
double percent = 0.1454;
return String.valueOf(money * percent);
}
public String toJp(String value) {
double money = Double.valueOf(value);
double percent = 15.797;
return String.valueOf(money * percent);
}
public String toUk(String value) {
double money = Double.valueOf(value);
double percent = 0.1174;
return String.valueOf(money * percent);
}
}

View File

@@ -0,0 +1,38 @@
package cn.edu.scau.biubiusuisui.example.bindDemo;
/**
* @author suisui
* @version 1.2
* @description 详细信息
* @date 2020/4/6 00:29
* @since JavaFX2.0 JDK1.8
*/
public class Profile {
private String birthday;
private String address;
private String avatar;
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
}

View File

@@ -0,0 +1,88 @@
package cn.edu.scau.biubiusuisui.example.bindDemo;
import cn.edu.scau.biubiusuisui.annotation.FXEntity;
import cn.edu.scau.biubiusuisui.annotation.FXField;
import java.util.List;
/**
* @author suisui
* @version 1.2
* @date 2020/4/5 12:19
* @since JavaFX2.0 JDK1.8
*/
@FXEntity
public class User {
@FXField
private String name;
@FXField
private String password;
@FXField
private Integer age;
@FXField
private List<Double> scores;
@FXField
private Double gpa;//平均分
@FXField
private Profile profile;
@FXField
private boolean isEnable;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public List<Double> getScores() {
return scores;
}
public void addScore(double score) {
this.scores.add(score);
}
public Profile getProfile() {
return profile;
}
public void setProfile(Profile profile) {
this.profile = profile;
}
public boolean isEnable() {
return isEnable;
}
public void setEnable(boolean enable) {
isEnable = enable;
}
public double getGpa() {
double sum = 0;
for (double score : scores) {
sum += score;
}
gpa = sum / scores.size();
return gpa;
}
}

View File

@@ -0,0 +1,105 @@
package cn.edu.scau.biubiusuisui.example.bindDemo;
import javafx.beans.property.*;
import javafx.collections.ObservableList;
/**
* @author suisui
* @version 1.2
* @description User的JavaFXBean
* @date 2020/4/6 14:30
* @since JavaFX2.0 JDK1.8
*/
public class UserPropertyEntity {
private SimpleStringProperty name;
private SimpleStringProperty password;
private SimpleIntegerProperty age;
private SimpleListProperty<Double> scores;
private SimpleDoubleProperty gpa;//平均分
private SimpleObjectProperty<Profile> profile;
private SimpleBooleanProperty enable;
public String getName() {
return name.get();
}
public SimpleStringProperty nameProperty() {
return name;
}
public void setName(String name) {
this.name.set(name);
}
public String getPassword() {
return password.get();
}
public SimpleStringProperty passwordProperty() {
return password;
}
public void setPassword(String password) {
this.password.set(password);
}
public int getAge() {
return age.get();
}
public SimpleIntegerProperty ageProperty() {
return age;
}
public void setAge(int age) {
this.age.set(age);
}
public ObservableList<Double> getScores() {
return scores.get();
}
public SimpleListProperty<Double> scoresProperty() {
return scores;
}
public void setScores(ObservableList<Double> scores) {
this.scores.set(scores);
}
public double getGpa() {
return gpa.get();
}
public SimpleDoubleProperty gpaProperty() {
return gpa;
}
public void setGpa(double gpa) {
this.gpa.set(gpa);
}
public Profile getProfile() {
return profile.get();
}
public SimpleObjectProperty<Profile> profileProperty() {
return profile;
}
public void setProfile(Profile profile) {
this.profile.set(profile);
}
public boolean getEnable() {
return enable.get();
}
public SimpleBooleanProperty enableProperty() {
return enable;
}
public void setEnable(boolean enable) {
this.enable.set(enable);
}
}

View File

@@ -0,0 +1,22 @@
package cn.edu.scau.biubiusuisui.example.firstDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author jack
* @author suisui
* @version 1.0
* @description 第一个示例
* @date 2020/1/1 23:06
* @since JavaFX2.0 JDK1.8
*/
@FXScan(base = {"cn.edu.scau.biubiusuisui.example.firstDemo"}) //会扫描带FXController和FXEntity的类进行初始化
public class FirstDemo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
FXPlusApplication.start(FirstDemo.class); //其他配置和JavaFX相同这里要调用FXPlusAppcalition的start方法开始FX-plus加强
}
}

View File

@@ -0,0 +1,57 @@
package cn.edu.scau.biubiusuisui.example.firstDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXPlusContext;
import cn.edu.scau.biubiusuisui.factory.FXEntityFactory;
import javafx.beans.property.Property;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.ListView;
import java.net.URL;
import java.util.ResourceBundle;
/**
* @author jack
* @author suisui
* @version 1.0
* @description 示例的主窗口
* @date 2020/1/1 23:06
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/firstDemo/firstDemo.fxml")
@FXWindow(title = "firstDemo", mainStage = true)
public class MainController extends FXBaseController implements Initializable {
@FXML
private Button addHelloButton;
@FXML
private Button deleteHelloButton;
@FXML
private ListView<String> list;
private Student student;
@FXML
void addWord(ActionEvent event) {
student.addList("hello");
}
@FXML
void delWord(ActionEvent event) {
student.delList("hello");
}
@Override
public void initialize(URL location, ResourceBundle resources) {
student = (Student) FXEntityFactory.wrapFXBean(Student.class); // 从工厂中拿到将JavaBean转换得到的JavaFXBean
Property listProperty = FXPlusContext.getEntityPropertyByName(student, "list");
list.itemsProperty().bind(listProperty);
}
}

View File

@@ -0,0 +1,34 @@
package cn.edu.scau.biubiusuisui.example.firstDemo;
import cn.edu.scau.biubiusuisui.annotation.FXEntity;
import cn.edu.scau.biubiusuisui.annotation.FXField;
import java.util.ArrayList;
import java.util.List;
/**
* @author suisui
* @version 1.0
* @description
* @date 2020/1/1 23:07
* @since JavaFX2.0 JDK1.8
*/
@FXEntity
public class Student {
@FXField //标记该属性是否被生成对应的Property
private int age = 0;
@FXField
private List<String> list = new ArrayList<>();
public void addList(String word) {
list.add(word);
}
public void delList(String word) {
list.remove(word);
}
}

View File

@@ -0,0 +1,52 @@
package cn.edu.scau.biubiusuisui.example.langDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXRedirect;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXPlusLocale;
import javafx.fxml.FXML;
/**
* @author suisui
* @description 中文界面
* @date 2020/5/3 16:23
* @since JDK1.8
*/
@FXWindow(mainStage = true, title = "languageDemo")
@FXController(path = "fxml/langDemo/langDemo.fxml", locale = FXPlusLocale.SIMPLIFIED_CHINESE)
public class ChineseController extends FXBaseController {
private String title = "languageDemo";
private int count = 0;
@FXML
public void clickToChinese() {
redirect("ChineseController");
}
@FXML
public void clickToEnglish() {
redirect("EnglishController");
}
@FXML
public void clickToKorean() {
redirect("KoreanController");
}
/**
* 测试是否setWindowTitle接口
*/
@FXML
public void changeTitleClick() {
this.setWindowTitle(this.title + count);
count++;
}
@FXRedirect
public String redirect(String name) {
return name;
}
}

View File

@@ -0,0 +1,50 @@
package cn.edu.scau.biubiusuisui.example.langDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXRedirect;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXPlusLocale;
import javafx.fxml.FXML;
/**
* @author suisui
* @description 英文界面
* @date 2020/5/3 19:54
* @since JDK1.8
*/
@FXWindow(mainStage = false, title = "languageDemo")
@FXController(path = "fxml/langDemo/langDemo.fxml", locale = FXPlusLocale.ENGLISH)
public class EnglishController extends FXBaseController {
private String title = "languageDemo";
private int count = 0;
@FXML
public void clickToChinese() {
redirect("ChineseController");
}
@FXML
public void clickToEnglish() {
redirect("EnglishController");
}
@FXML
public void clickToKorean() {
redirect("KoreanController");
}
/**
* 测试是否setWindowTitle接口
*/
@FXML
public void changeTitleClick() {
this.setWindowTitle(this.title + count);
count++;
}
@FXRedirect
public String redirect(String name) {
return name;
}
}

View File

@@ -0,0 +1,51 @@
package cn.edu.scau.biubiusuisui.example.langDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXRedirect;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXPlusLocale;
import javafx.fxml.FXML;
/**
* @author suisui
* @description 法语界面
* @date 2020/5/4 14:01
* @since JDK1.8
*/
@FXWindow(mainStage = false, title = "languageDemo")
@FXController(path = "fxml/langDemo/langDemo.fxml", locale = FXPlusLocale.KOREAN)
public class KoreanController extends FXBaseController {
private String title = "languageDemo";
private int count = 0;
@FXML
public void clickToChinese() {
redirect("ChineseController");
}
@FXML
public void clickToEnglish() {
redirect("EnglishController");
}
@FXML
public void clickToKorean() {
redirect("KoreanController");
}
/**
* 测试是否setWindowTitle接口
*/
@FXML
public void changeTitleClick() {
this.setWindowTitle(this.title + count);
count++;
}
@FXRedirect
public String redirect(String name) {
return name;
}
}

View File

@@ -0,0 +1,21 @@
package cn.edu.scau.biubiusuisui.example.langDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author suisui
* @description 测试语言国际化的Demo
* @date 2020/5/3 09:57
* @since JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.langDemo")
public class LanguageDemo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
FXPlusApplication.start(getClass());
}
}

View File

@@ -0,0 +1,48 @@
package cn.edu.scau.biubiusuisui.example.lifeDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXPlusLocale;
import cn.edu.scau.biubiusuisui.log.FXPlusLogger;
import cn.edu.scau.biubiusuisui.log.FXPlusLoggerFactory;
import cn.edu.scau.biubiusuisui.log.IFXPlusLogger;
/**
* @author suisui
* @version 1.2
* @description 弹窗
* @date 2020/5/1 13:49
* @since JavaFX2.0 JDK1.8
*/
@FXWindow(title = "Dialog")
@FXController(path = "fxml/lifeDemo/dialog.fxml", locale = FXPlusLocale.SIMPLIFIED_CHINESE)
public class DialogController extends FXBaseController {
private static IFXPlusLogger logger = FXPlusLoggerFactory.getLogger(DialogController.class);
@Override
public void initialize() throws Exception {
logger.info("DialogController----initialize");
}
@Override
public void onLoad() throws Exception {
logger.info("DialogController----onLoad");
}
@Override
public void onShow() throws Exception {
logger.info("DialogController----onShow");
}
@Override
public void onClose() throws Exception {
logger.info("DialogController----onClose");
}
@Override
public void onHide() throws Exception {
logger.info("DialogController----onHide");
}
}

View File

@@ -0,0 +1,42 @@
package cn.edu.scau.biubiusuisui.example.lifeDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import cn.edu.scau.biubiusuisui.log.FXPlusLoggerFactory;
import cn.edu.scau.biubiusuisui.log.IFXPlusLogger;
import cn.edu.scau.biubiusuisui.utils.LogUtil;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.stage.Stage;
/**
* @author suisui
* @version 1.2
* @description 测试生命周期的Demo
* @date 2020/5/1 11:50
* @since JavaFX2.0 JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.lifeDemo")
public class LifeDemo extends Application {
private static IFXPlusLogger logger = FXPlusLoggerFactory.getLogger(LifeDemo.class);
@Override
public void start(Stage primaryStage) throws Exception {
logger.info("LifeDemo---start");
// Platform.setImplicitExit(false); //设置当关闭最后一个Stage时JavaFX应用程序不会自动退出
FXPlusApplication.start(getClass());
}
@Override
public void init() throws Exception {
logger.info("LifeDemo---init");
}
@Override
public void stop() throws Exception {
logger.info("LifeDemo---stop");
}
}

View File

@@ -0,0 +1,74 @@
package cn.edu.scau.biubiusuisui.example.lifeDemo;
import cn.edu.scau.biubiusuisui.annotation.FXRedirect;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXPlusLocale;
import cn.edu.scau.biubiusuisui.log.FXPlusLoggerFactory;
import cn.edu.scau.biubiusuisui.log.IFXPlusLogger;
import javafx.fxml.FXML;
/**
* @author suisui
* @version 1.2
* @description 主窗口
* @date 2020/5/1 11:53
* @since JavaFX2.0 JDK1.8
*/
@FXWindow(mainStage = true, title = "lifeDemo", icon = "image/icon.png")
@FXController(path = "fxml/lifeDemo/lifeMain.fxml", locale = FXPlusLocale.SIMPLIFIED_CHINESE)
public class MainController extends FXBaseController {
private static IFXPlusLogger logger = FXPlusLoggerFactory.getLogger(FXBaseController.class);
@Override
public void initialize() throws Exception {
logger.info("MainController----initialize");
}
@Override
public void onShow() throws Exception {
logger.info("MainController----onShow");
}
@Override
public void onLoad() throws Exception {
logger.info("MainController----onLoad");
}
@Override
public void onClose() throws Exception {
logger.info("MainController----onClose");
}
@Override
public void onHide() throws Exception {
logger.info("MainController----onHide");
}
@FXML
public void go() {
redirectToDialog();
}
@FXML
public void goAndClose() {
redirectToDialogAndClose();
}
/**
* 弹窗不关闭窗口
*/
@FXRedirect(close = false)
public String redirectToDialog() {
return "DialogController";
}
/**
* 弹窗并关闭本窗口
*/
@FXRedirect()
public String redirectToDialogAndClose() {
return "DialogController";
}
}

View File

@@ -0,0 +1,44 @@
package cn.edu.scau.biubiusuisui.example.lifeDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXPlusLocale;
import cn.edu.scau.biubiusuisui.log.FXPlusLoggerFactory;
import cn.edu.scau.biubiusuisui.log.IFXPlusLogger;
/**
* @author suisui
* @version 1.2
* @description 子组件
* @date 2020/5/1 13:48
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/lifeDemo/subBar.fxml", locale = FXPlusLocale.SIMPLIFIED_CHINESE)
public class SubController extends FXBaseController {
private static IFXPlusLogger logger = FXPlusLoggerFactory.getLogger(SubController.class);
@Override
public void initialize() throws Exception {
logger.info("SubController----initialize");
}
@Override
public void onShow() throws Exception {
logger.info("SubController----onShow");
}
@Override
public void onLoad() throws Exception {
logger.info("SubController----onLoad");
}
@Override
public void onClose() throws Exception {
logger.info("SubController----onClose");
}
@Override
public void onHide() throws Exception {
logger.info("SubController----onHide");
}
}

View File

@@ -0,0 +1,20 @@
package cn.edu.scau.biubiusuisui.example.listDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author jack
* @version 1.0
* @date 2019/7/27 1:43
* @since JavaFX2.0 JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.listDemo")
public class ListDemo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
FXPlusApplication.start(getClass());
}
}

View File

@@ -0,0 +1,46 @@
package cn.edu.scau.biubiusuisui.example.listDemo;
import cn.edu.scau.biubiusuisui.annotation.FXBind;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXData;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.ListView;
import java.util.List;
/**
* @author jack
* @version 1.0
* @date 2019/7/27 1:43
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/listDemo/listDemo.fxml")
@FXWindow(title = "listDemo", mainStage = true)
public class MainController extends FXBaseController {
private static int count = 0;
@FXData
User user = new User();
@FXML
@FXBind("items=${@toList(user.names)}")
private ListView<String> userNameListView;
@FXML
public void addUserName() {
user.addNames("Jack\t" + (count++));
}
public ObservableList toList(List list) {
if (list == null) {
return null;
}
return FXCollections.observableList(list);
}
}

View File

@@ -0,0 +1,60 @@
package cn.edu.scau.biubiusuisui.example.listDemo;
import cn.edu.scau.biubiusuisui.annotation.FXEntity;
import cn.edu.scau.biubiusuisui.annotation.FXField;
import java.util.ArrayList;
import java.util.List;
/**
* @author jack
* @version 1.0
* @date 2019/7/27 12:19
* @since JavaFX2.0 JDK1.8
*/
@FXEntity
public class User {
@FXField
private String name;
@FXField
private String password;
@FXField
private List<String> names = new ArrayList<>();
public User() {
// names.add("hello ");
// names.add("test");
}
public void addNames(String name) {
names.add(name);
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public List<String> getNames() {
return names;
}
public void setNames(ArrayList<String> names) {
this.names = names;
}
}

View File

@@ -0,0 +1,36 @@
package cn.edu.scau.biubiusuisui.example.logDemo;
import cn.edu.scau.biubiusuisui.example.lifeDemo.LifeDemo;
import cn.edu.scau.biubiusuisui.log.FXPlusLoggerFactory;
import cn.edu.scau.biubiusuisui.log.IFXPlusLogger;
import cn.edu.scau.biubiusuisui.utils.LogUtil;
/**
* @author suisui
* @description 测试日志的Demo
* @date 2020/5/2 19:58
* @since JDK1.8
*/
public class LogDemo {
private static IFXPlusLogger logger = FXPlusLoggerFactory.getLogger(LogDemo.class);
public void testLogger() {
logger.info("info");
logger.error("error");
logger.debug("debug");
logger.warn("warn");
}
public void testLogUtil() {
LogUtil.info("info");
LogUtil.error("error");
LogUtil.debug("debug");
LogUtil.warn("warn");
}
public static void main(String[] args) {
LogDemo demo = new LogDemo();
demo.testLogger();
demo.testLogUtil();
}
}

View File

@@ -0,0 +1,33 @@
package cn.edu.scau.biubiusuisui.example.mqDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author suisui
* @version 1.1
* @description
* @date 2019/12/8 13:17
* @since JavaFX2.0 JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.mqDemo")
public class MQDemo extends Application {
@Override
public void init() throws Exception {
System.out.println("application init");
}
@Override
public void start(Stage primaryStage) throws Exception {
System.out.println("application start");
FXPlusApplication.start(MQDemo.class);
}
@Override
public void stop() throws Exception {
System.out.println("application stop");
}
}

View File

@@ -0,0 +1,35 @@
package cn.edu.scau.biubiusuisui.example.mqDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXReceiver;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import javafx.fxml.FXML;
import javafx.scene.control.TextArea;
/**
* @author suisui
* @version 1.2
* @description 主界面
* @date 2019/12/8 13:17
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/mqDemo/main.fxml")
@FXWindow(mainStage = true, title = "MQDemo")
public class MainController extends FXBaseController {
@FXML
private TextArea outTA;
/**
* 接收者必须指定要订阅的[发送者类名:方法名]
* 发送函数的返回值会注入到接收函数的参数中
*
* @param msg
*/
@FXReceiver(name = "TopBarController:sendToMain")
public void handleTopBar(String msg) {
// 处理导航栏的点击事件
outTA.appendText(msg + "\n");
}
}

View File

@@ -0,0 +1,48 @@
package cn.edu.scau.biubiusuisui.example.mqDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXSender;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import javafx.fxml.FXML;
/**
* @author suisui
* @version 1.1
* @description 导航栏示例
* @date 2019/12/8 13:17
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/mqDemo/topBar.fxml")
public class TopBarController extends FXBaseController {
@FXML
public void indexClick() {
sendToMain("点击[首页]");
}
@FXML
public void scoreClick() {
sendToMain("点击[积分中心]");
}
@FXML
public void questionClick() {
sendToMain("点击[问答中心]");
}
@FXML
public void selfClick() {
sendToMain("点击[个人中心]");
}
/**
* 系统会通过发射信号,调用所有订阅这个发射信号函数的方法,从而响应信号
*
* @param msg
* @return
*/
@FXSender //标注为信号发射函数
public String sendToMain(String msg) {
return msg;
}
}

View File

@@ -0,0 +1,18 @@
package cn.edu.scau.biubiusuisui.example.redirectDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
/**
* @author suisui
* @version 1.1
* @description
* @date 2019/12/4 21:00
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/redirectDemo/dialog.fxml")
@FXWindow(title = "弹窗")
public class DialogController extends FXBaseController {
}

View File

@@ -0,0 +1,74 @@
package cn.edu.scau.biubiusuisui.example.redirectDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXRedirect;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXRedirectParam;
import javafx.fxml.FXML;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import java.util.Date;
/**
* @author suisui
* @version 1.1
* @description
* @date 2019/12/3 11:53
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/redirectDemo/login.fxml")
@FXWindow(title = "redirectDemo", mainStage = true)
public class LoginController extends FXBaseController {
@FXML
private TextField usernameTF;
@FXML
private PasswordField passwordPF;
@FXML
public void registerClick() {
redirectToRegister();
}
@FXRedirect
public String redirectToRegister() {
return "RegisterController";
}
@FXML
@FXRedirect(close = false) //弹窗
public String redirectToDialog() {
return "DialogController";
}
@FXML
@FXRedirect //登录成功 Query方式
public String redirectToSuccessWithQuery() {
return "SuccessController?showType=0&username=" + usernameTF.getText() + "&password=" + passwordPF.getText();
}
@FXML
@FXRedirect //登录成功 Param方式
public FXRedirectParam redirectToSuccessWithParam() {
FXRedirectParam params = new FXRedirectParam("SuccessController");
params.addParam("username", usernameTF.getText());
params.addParam("password", passwordPF.getText());
params.addQuery("showType", "0");
return params;
}
@FXML
@FXRedirect
public FXRedirectParam redirectToSuccessWithAll() {
FXRedirectParam params = new FXRedirectParam("SuccessController");
params.addParam("username", usernameTF.getText());
params.addParam("password", passwordPF.getText());
params.addQuery("token", new Date().toString());
params.addQuery("showType", "0");
return params;
}
}

View File

@@ -0,0 +1,22 @@
package cn.edu.scau.biubiusuisui.example.redirectDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author suisui
* @version 1.1
* @description 测试重定向功能的Application
* @date 2019/12/3 11:52
* @since JavaFX2.0 JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.redirectDemo")
public class RedirectDemo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
FXPlusApplication.start(RedirectDemo.class);
}
}

View File

@@ -0,0 +1,91 @@
package cn.edu.scau.biubiusuisui.example.redirectDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXRedirect;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import cn.edu.scau.biubiusuisui.entity.FXRedirectParam;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
/**
* @author suisui
* @version 1.1
* @description
* @date 2019/12/4 00:07
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/redirectDemo/register.fxml")
@FXWindow(title = "register")
public class RegisterController extends FXBaseController {
@FXML
private TextField usernameTF;
@FXML
private TextField emailTF;
@FXML
private PasswordField passwordPF;
@FXML
private PasswordField confirmPasswordPF;
@FXML
public void registerClick() {
if (validate()) {
UserEntity userEntity = new UserEntity();
userEntity.setUsername(usernameTF.getText());
userEntity.setPassword(passwordPF.getText());
userEntity.setEmail(emailTF.getText());
redirectToRegisterSuccess(userEntity);
}
}
@FXML
public void loginClick() {
redirectToLogin();
}
@FXRedirect
public String redirectToLogin() {
return "LoginController";
}
@FXRedirect
public FXRedirectParam redirectToRegisterSuccess(UserEntity userEntity) {
FXRedirectParam fxRedirectParam = new FXRedirectParam("SuccessController");
fxRedirectParam.addQuery("showType", "1");
fxRedirectParam.addParam("user", userEntity);
return fxRedirectParam;
}
// 校验
private boolean validate() {
boolean retCode = false;
if (null != passwordPF.getText() && null != confirmPasswordPF.getText()) {
if (!passwordPF.getText().equals(confirmPasswordPF.getText())) {
retCode = false;
new Alert(Alert.AlertType.ERROR, "两次密码不一致");
} else {
retCode = true;
}
} else if (null == usernameTF.getText()) {
retCode = false;
new Alert(Alert.AlertType.ERROR, "用户名不能为空");
} else if (null == emailTF.getText()) {
retCode = false;
new Alert(Alert.AlertType.ERROR, "邮箱不能为空");
}
return retCode;
}
private void clearAllInput() {
usernameTF.setText("");
emailTF.setText("");
passwordPF.setText("");
confirmPasswordPF.setText("");
}
}

View File

@@ -0,0 +1,71 @@
package cn.edu.scau.biubiusuisui.example.redirectDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXRedirect;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
/**
* @author suisui
* @version 1.1
* @description 登录成功的Controller
* @date 2019/12/3 12:43
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/redirectDemo/success.fxml")
@FXWindow(title = "success")
public class SuccessController extends FXBaseController {
@FXML
private Label title;
@FXML
private Label usernameLabel;
@FXML
private Label passwordLabel;
@FXML
private Label tokenLabel;
@FXML
@FXRedirect
public String redirectToLogin() {
return "LoginController";
}
@Override
public void onShow() {
try {
super.onShow();
} catch (Exception e) {
e.printStackTrace();
}
if (this.getQuery().get("showType") != null) {
String showType = (String) this.getQuery().get("showType");
if (showType.equals("1")) { //注册
title.setText("注册成功");
if (this.getParam().get("user") != null) {
UserEntity userEntity = (UserEntity) this.getParam().get("user");
usernameLabel.setText(userEntity.getUsername());
passwordLabel.setText(userEntity.getPassword());
}
} else { //登录
title.setText("登录成功");
// 此处为演示多种方式数据传递才进行多次赋值实际应用时应根据数据API进行相应的数据获取操作
if (this.getQuery().size() > 1) { //query方式传递
usernameLabel.setText(String.valueOf(this.getQuery().get("username")));
passwordLabel.setText(String.valueOf(this.getQuery().get("password")));
tokenLabel.setText(String.valueOf(this.getQuery().get("token")));
}
if (this.getParam().size() > 1) { //param方式传递
usernameLabel.setText(String.valueOf(this.getParam().get("username")));
passwordLabel.setText(String.valueOf(this.getParam().get("password")));
}
}
}
}
}

View File

@@ -0,0 +1,39 @@
package cn.edu.scau.biubiusuisui.example.redirectDemo;
/**
* @author suisui
* @version 1.1
* @description 简单的用户实体
* @date 2020/1/14 22:39
* @since JavaFX2.0 JDK1.8
*/
public class UserEntity {
private String username;
private String password;
private String email;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}

View File

@@ -0,0 +1,24 @@
package cn.edu.scau.biubiusuisui.example.resizableDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import javafx.fxml.FXML;
import javafx.stage.StageStyle;
/**
* @author suisui
* @version 1.2
* @description 主控制器
* @date 2020/4/5 00:05
* @since JavaFX2.0 JDK1.8
*/
@FXController(path = "fxml/resizableDemo/resizableDemo.fxml")
@FXWindow(mainStage = true, title = "resizableDemo", draggable = true, resizable = true, style = StageStyle.UNDECORATED)
public class MainController extends FXBaseController {
@FXML
public void closeWindowClick() {
this.closeStage();
}
}

View File

@@ -0,0 +1,21 @@
package cn.edu.scau.biubiusuisui.example.resizableDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author suisui
* @version 1.0
* @description 缩放和拖拽的示例
* @date 2020/4/5 00:04
* @since JavaFX2.0 JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.resizableDemo")
public class ResizableDemo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
FXPlusApplication.start(ResizableDemo.class);
}
}

View File

@@ -0,0 +1,53 @@
package cn.edu.scau.biubiusuisui.example.windowDemo;
import cn.edu.scau.biubiusuisui.annotation.FXController;
import cn.edu.scau.biubiusuisui.annotation.FXWindow;
import cn.edu.scau.biubiusuisui.entity.FXBaseController;
import javafx.fxml.FXML;
import javafx.scene.control.ToggleButton;
import javafx.stage.StageStyle;
/**
* @author suisui
* @description 测试Controller
* @date 2020/8/29 09:41
* @since JDK1.8
*/
@FXWindow(mainStage = true, title = "windowDemo", icon = "image/icon.png", style = StageStyle.UNDECORATED)
@FXController(path = "fxml/windowDemo/windowDemo.fxml")
public class DemoController extends FXBaseController {
private String title = "windowDemo -- ";
private int count = 0;
private String iconStr = "image/icon2.png";
private String iconStr2 = "image/icon3.png";
@FXML
private ToggleButton canResizableTB;
@Override
public void initialize() throws Exception {
canResizableTB.selectedProperty().addListener(e -> {
this.setDragAndResize(true, canResizableTB.isSelected());
});
}
/**
* 修改标题点击事件
*/
@FXML
public void changeTitleClick() {
this.setWindowTitle(title + count);
count++;
}
/**
* 字符串修改图标
*/
@FXML
public void changeIconClick() {
this.setIcon(count % 2 == 0 ? iconStr : iconStr2);
count++;
}
}

View File

@@ -0,0 +1,20 @@
package cn.edu.scau.biubiusuisui.example.windowDemo;
import cn.edu.scau.biubiusuisui.annotation.FXScan;
import cn.edu.scau.biubiusuisui.config.FXPlusApplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
* @author suisui
* @description 测试开放设置部分FXWindow属性的接口
* @date 2020/8/29 09:40
* @since JDK1.8
*/
@FXScan(base = "cn.edu.scau.biubiusuisui.example.windowDemo")
public class FXWindowDemo extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
FXPlusApplication.start(FXWindowDemo.class);
}
}

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<fx:root id="haha" prefHeight="253.0" prefWidth="625.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.expressionDemo.Main2">
<children>
<Label fx:id="label" layoutX="33.0" layoutY="53.0" prefHeight="37.0" prefWidth="100.0" text="账号:">
<font>
<Font size="20.0" />
</font>
</Label>
<TextField fx:id="usr" layoutX="162.0" layoutY="57.0" prefHeight="30.0" prefWidth="277.0" />
<Button fx:id="resetBtn" layoutX="33.0" layoutY="187.0" mnemonicParsing="false" onAction="#reset" text="重置" />
<Label layoutX="33.0" layoutY="116.0" prefHeight="27.0" prefWidth="69.0" text="密码">
<font>
<Font size="20.0" />
</font>
</Label>
<Button fx:id="loginBtn" layoutX="370.0" layoutY="187.0" mnemonicParsing="false" onAction="#login" text="登录" />
<Label fx:id="usrMsg" layoutX="450.0" layoutY="62.0" prefHeight="19.0" prefWidth="157.0" />
<PasswordField fx:id="psw" layoutX="162.0" layoutY="128.0" prefHeight="30.0" prefWidth="277.0" />
<Label fx:id="pswMsg" layoutX="450.0" layoutY="133.0" prefHeight="20.0" prefWidth="157.0" />
</children>
</fx:root>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import cn.edu.scau.biubiusuisui.example.bindDemo.MainController?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.Pane?>
<fx:root prefHeight="709.0" prefWidth="995.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.expressionDemo.Main2">
<children>
<Button fx:id="btn" layoutX="793.0" layoutY="146.0" mnemonicParsing="false" text="Button" />
<MainController layoutX="85.0" layoutY="123.0" />
</children>
</fx:root>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<fx:root id="haha" prefHeight="253.0" prefWidth="625.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.springExpressionDemo.SpringExpressionDemoController">
<children>
<Label fx:id="label" layoutX="33.0" layoutY="53.0" prefHeight="37.0" prefWidth="100.0" text="账号:">
<font>
<Font size="20.0" />
</font>
</Label>
<TextField fx:id="usr" layoutX="162.0" layoutY="57.0" prefHeight="30.0" prefWidth="277.0" />
<Button fx:id="resetBtn" layoutX="33.0" layoutY="187.0" mnemonicParsing="false" onAction="#reset" text="重置" />
<Label layoutX="33.0" layoutY="116.0" prefHeight="27.0" prefWidth="69.0" text="密码">
<font>
<Font size="20.0" />
</font>
</Label>
<Button fx:id="loginBtn" layoutX="370.0" layoutY="187.0" mnemonicParsing="false" onAction="#login" text="登录" />
<Label fx:id="usrMsg" layoutX="450.0" layoutY="62.0" prefHeight="19.0" prefWidth="157.0" />
<PasswordField fx:id="psw" layoutX="162.0" layoutY="128.0" prefHeight="30.0" prefWidth="277.0" />
<Label fx:id="pswMsg" layoutX="450.0" layoutY="133.0" prefHeight="20.0" prefWidth="157.0" />
</children>
</fx:root>

View File

@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<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.bindDemo.MainController">
<children>
<TabPane prefHeight="600.0" prefWidth="800.0">
<tabs>
<Tab text="View&amp;View">
<content>
<Pane prefHeight="200.0" prefWidth="200.0">
<children>
<TextField fx:id="inputTF" layoutX="250.0" layoutY="105.0" promptText="请输入"/>
<Text layoutX="204.0" layoutY="123.0" strokeType="OUTSIDE" strokeWidth="0.0"
text="Name: "/>
<Label fx:id="inputLabel" layoutX="457.0" layoutY="109.0" prefHeight="150.0"
prefWidth="289.0" wrapText="true">
<font>
<Font size="16.0"/>
</font>
</Label>
</children>
</Pane>
</content>
</Tab>
<Tab text="VIew&amp;Bean">
<content>
<Pane prefHeight="200.0" prefWidth="200.0">
<children>
<VBox layoutX="47.0" layoutY="154.0" prefHeight="229.0" prefWidth="353.0">
<children>
<HBox alignment="CENTER" prefHeight="60.0" prefWidth="800.0">
<children>
<Label prefWidth="40.0" text="用户名"/>
<TextField fx:id="usernameTF"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="60.0" prefWidth="800.0">
<children>
<Label prefWidth="40.0" text="密码"/>
<PasswordField fx:id="pswPF"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="60.0" prefWidth="800.0">
<children>
<Label prefWidth="40.0" text="年龄"/>
<TextField fx:id="ageTF"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="60.0" prefWidth="353.0" spacing="20.0">
<children>
<Label prefHeight="40.0" text="是否有效"/>
<RadioButton mnemonicParsing="false" text="是">
<toggleGroup>
<ToggleGroup fx:id="enableButtons"/>
</toggleGroup>
</RadioButton>
<RadioButton mnemonicParsing="false" text="否"
toggleGroup="$enableButtons"/>
</children>
</HBox>
</children>
</VBox>
<VBox layoutX="381.0" layoutY="124.0" prefHeight="203.0" prefWidth="353.0"
spacing="5.0">
<children>
<Label alignment="CENTER" prefHeight="26.0" prefWidth="359.0" text="输入的用户信息"
textAlignment="CENTER">
<font>
<Font size="20.0"/>
</font>
</Label>
<HBox alignment="CENTER_LEFT" prefHeight="60.0" prefWidth="800.0">
<children>
<Label prefWidth="60.0" text="用户名:"/>
<Label fx:id="usernameLabel"/>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="60.0" prefWidth="800.0">
<children>
<Label prefWidth="60.0" text="密码:"/>
<Label fx:id="userPswLabel"/>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="60.0" prefWidth="800.0">
<children>
<Label prefWidth="60.0" text="年龄:"/>
<Label fx:id="ageLabel"/>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="60.0" prefWidth="800.0">
<children>
<Label fx:id="enableLabel" prefWidth="60.0" text="是否有效:"/>
<Label fx:id="userPswLabel2"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" onAction="#clickToShowInfo"
text="点击显示"/>
</children>
</HBox>
</children>
</VBox>
</children>
</Pane>
</content>
</Tab>
<Tab text="Expression2View">
<content>
<AnchorPane>
<children>
<Pane layoutX="128.0" layoutY="118.0">
<children>
<TextField fx:id="money" layoutX="54.0" layoutY="29.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>
</Pane>
</children>
</AnchorPane>
</content>
</Tab>
</tabs>
</TabPane>
</children>
</fx:root>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.Pane?>
<fx:root prefHeight="400.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.firstDemo.MainController">
<children>
<Button fx:id="addHelloButton" layoutX="432.0" layoutY="83.0" mnemonicParsing="false" onAction="#addWord"
text="add"/>
<Button fx:id="deleteHelloButton" layoutX="432.0" layoutY="151.0" mnemonicParsing="false" onAction="#delWord"
text="del"/>
<ListView fx:id="list" layoutX="42.0" layoutY="51.0" prefHeight="275.0" prefWidth="334.0"/>
</children>
</fx:root>

View File

@@ -0,0 +1 @@
console.log('123123');

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
prefWidth="600.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="%register">
<font>
<Font size="27.0"/>
</font>
</Text>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="%register.username"/>
<TextField/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="%register.password"/>
<TextField/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="%register.confirmPassword"/>
<TextField/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="%register.email"/>
<TextField/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="%register.phone"/>
<TextField/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
<children>
<Button mnemonicParsing="false" text="%register"/>
<Button mnemonicParsing="false" onAction="#clickToChinese" text="%chinese"/>
<Button mnemonicParsing="false" onAction="#clickToEnglish" text="%english"/>
<Button mnemonicParsing="false" onAction="#clickToKorean" text="%korean"/>
<Button mnemonicParsing="false" onAction="#changeTitleClick" text="修改"/>
</children>
</HBox>
</children>
</VBox>
</children>
</fx:root>

View File

@@ -0,0 +1,16 @@
login=login
login.username=Username
login.password=Password
login.button=Login
register=Register
register.username=Username
register.password=password
register.confirmPassword=Confirm Password
register.phone=Phone
register.email=Email
password=Password
email=Email
phone=Phone
korean=\ud55c\uad6d\uc5b4
chinese=\u4e2d\u6587
english=English

View File

@@ -0,0 +1,32 @@
login=\ub85c\uadf8\uc778
login.username=\uc544\uc774\ub514
login.password=\ube44\ubc00\ubc88\ud638
login.button=\ub85c\uadf8\uc778
register=\uac00\uc785
register.username=\uc544\uc774\ub514
register.password=\ube44\ubc00\ubc88\ud638
register.confirmPassword=\ube44\ubc00\ubc88\ud638 \ud655\uc778
register.phone=\ud734\ub300 \uc804\ud654
register.email=\uc6b0\ud3b8\ud568
password=\ube44\ubc00\ubc88\ud638
email=\uc6b0\ud3b8\ud568
phone=\ud734\ub300 \uc804\ud654
korean=\ud55c\uad6d\uc5b4
chinese=\u4e2d\u6587
english=English
#login=로그인
#login.username=아이디
#login.password=비밀번호
#login.button=로그인
#register=가입
#register.username=아이디
#register.password=비밀번호
#register.confirmPassword=비밀번호 확인
#register.phone=휴대 전화
#register.email=우편함
#password=비밀번호
#email=우편함
#phone=휴대 전화
#korean=한국어
#chinese=中文
#english=English

View File

@@ -0,0 +1,16 @@
login=\u767b\u5f55
login.username=\u7528\u6237\u540d
login.password=\u5bc6\u7801
login.button=\u70b9\u51fb\u767b\u5f55
register=\u6ce8\u518c
register.username=\u7528\u6237\u540d
register.password=\u5bc6\u7801
register.confirmPassword=\u786e\u8ba4\u5bc6\u7801
register.email=\u90ae\u7bb1
register.phone=\u624b\u673a
password=\u5bc6\u7801
email=\u90ae\u7bb1
phone=\u624b\u673a
korean=\ud55c\uad6d\uc5b4
chinese=\u4e2d\u6587
english=English

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<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>
<Text layoutX="165.0" layoutY="192.0" strokeType="OUTSIDE" strokeWidth="0.0" text="%dialog">
<font>
<Font size="35.0"/>
</font>
</Text>
</children>
</fx:root>

View File

@@ -0,0 +1 @@
dialog=Dialog

View File

@@ -0,0 +1 @@
dialog=\u5f39\u7a97

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import cn.edu.scau.biubiusuisui.example.lifeDemo.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
prefWidth="600.0" style="-fx-background-color: #905a3d;" 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.lifeDemo.MainController">
<children>
<SubController/>
<Text layoutY="221.0" strokeType="OUTSIDE" strokeWidth="0.0" text="%parentController" textAlignment="CENTER"
wrappingWidth="600.0">
<font>
<Font size="34.0"/>
</font>
</Text>
<Button layoutX="147.0" layoutY="338.0" mnemonicParsing="false" onAction="#go" prefHeight="29.0"
prefWidth="142.0" text="%button.go">
<font>
<Font size="15.0"/>
</font>
</Button>
<Button layoutX="318.0" layoutY="338.0" mnemonicParsing="false" onAction="#goAndClose"
text="%button.goAndClose">
<font>
<Font size="15.0"/>
</font>
</Button>
</children>
</fx:root>

View File

@@ -0,0 +1,3 @@
button.goAndClose=goto Dialog and close this window
button.go=goto Dialog
parentController=Parent Component

View File

@@ -0,0 +1,3 @@
button.goAndClose=\u8df3\u8f6c\u5e76\u5173\u95ed\u6b64\u7a97\u53e3
button.go=\u5f39\u7a97
parentController=\u7236\u7ec4\u4ef6

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0"
prefWidth="600.0" style="-fx-background-color: #fedcbd;" type="Pane" xmlns="http://javafx.com/javafx/8.0.171"
xmlns:fx="http://javafx.com/fxml/1">
<children>
<Text layoutY="57.0" strokeType="OUTSIDE" strokeWidth="0.0" text="%childrenController" textAlignment="CENTER"
wrappingWidth="600.0">
<font>
<Font size="34.0"/>
</font>
</Text>
</children>
</fx:root>

View File

@@ -0,0 +1 @@
childrenController=Children Component

View File

@@ -0,0 +1 @@
childrenController=\u5b50\u7ec4\u4ef6

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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="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,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.shape.Circle?>
<fx:root prefHeight="600.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.moveDemo.Main2">
<children>
<Circle fx:id="circle" fill="DODGERBLUE" layoutX="99.0" layoutY="191.0" radius="39.0" stroke="BLACK" strokeType="INSIDE" />
<TextField layoutX="199.0" layoutY="310.0" text="123" fx:id="xinput" />
<TextField fx:id="yinput" layoutX="199.0" layoutY="367.0" text="123" />
<Label layoutX="14.0" layoutY="315.0" text="X" />
<Label layoutX="14.0" layoutY="372.0" text="Y" />
<Button layoutX="148.0" layoutY="310.0" mnemonicParsing="false" text="-" fx:id="xSub" onAction="#subX"/>
<Button layoutX="415.0" layoutY="310.0" mnemonicParsing="false" text="+" fx:id="xAdd" onAction="#addX"/>
<Button fx:id="ySub" layoutX="148.0" layoutY="367.0" mnemonicParsing="false" text="-" onAction="#subY"/>
<Button fx:id="yAdd" layoutX="415.0" layoutY="367.0" mnemonicParsing="false" text="+" onAction="#addY"/>
</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,67 @@
<?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.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?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" prefHeight="356.0" prefWidth="800.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" 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" prefHeight="50.0" prefWidth="200.0">
<children>
<VBox alignment="CENTER" prefHeight="64.0" prefWidth="810.0" spacing="10.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="5.0">
<children>
<Button mnemonicParsing="false" onAction="#redirectToSuccessWithQuery"
text="query方式登录"/>
<Button mnemonicParsing="false" onAction="#redirectToSuccessWithParam"
text="param方式登录"/>
<Button mnemonicParsing="false" onAction="#redirectToSuccessWithAll"
text="混合登录"/>
</children>
</HBox>
<Button mnemonicParsing="false" onAction="#redirectToDialog" text="测试弹窗的按钮"/>
</children>
</VBox>
</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,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?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 fx:id="title" 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="203.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="205.0"/>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0">
<children>
<Label alignment="CENTER" prefHeight="50.0" prefWidth="50.0" text="Token:"/>
<Label fx:id="tokenLabel" alignment="CENTER" prefHeight="50.0" prefWidth="203.0"/>
</children>
</HBox>
</children>
</VBox>
<Button layoutX="421.0" layoutY="367.0" mnemonicParsing="false" onAction="#redirectToLogin" text="返回主界面"/>
</children>
</fx:root>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.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.resizableDemo.MainController">
<children>
<Text layoutX="121.0" layoutY="188.0" strokeType="OUTSIDE" strokeWidth="0.0" text="这是隐藏标题的窗口">
<font>
<Font size="40.0"/>
</font>
</Text>
<Button layoutX="573.0" layoutY="1.0" onMouseClicked="#closeWindowClick"
style="-fx-background-color: transparent; ">X
</Button>
</children>
</fx:root>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.Pane?>
<fx:root id="haha" prefHeight="403.0" prefWidth="625.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.springDemo.SpringController">
<children>
<Label fx:id="label" layoutX="18.0" layoutY="166.0" prefHeight="68.0" prefWidth="304.0" text="我是控制器属性" />
<Button layoutX="52.0" layoutY="98.0" onAction="#add" prefHeight="30.0" prefWidth="129.0" text="控制器1的按钮" />
</children>
</fx:root>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import cn.edu.scau.biubiusuisui.example.springDemo.SpringController?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.Pane?>
<fx:root id="haha" prefHeight="629.0" prefWidth="934.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.springDemo2.SpringController2">
<children>
<SpringController layoutX="20.0" layoutY="129.0" fx:id="springController"/>
<Button layoutX="135.0" layoutY="552.0" mnemonicParsing="false" text="Button" onAction="#test"/>
<Label layoutX="14.0" layoutY="81.0" text="Controller属性" />
<Label layoutX="20.0" layoutY="557.0" text="本控制器属性" />
<Label layoutX="385.0" layoutY="25.0" text="两个控制器之间信号传递" />
</children>
</fx:root>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ToggleButton?>
<?import javafx.scene.control.ToolBar?>
<?import javafx.scene.layout.Pane?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0"
prefWidth="600.0" type="Pane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ToolBar layoutY="276.0" prefHeight="124.0" prefWidth="600.0">
<items>
<Button mnemonicParsing="false" onAction="#changeTitleClick" text="修改标题"/>
<Button mnemonicParsing="false" onAction="#changeIconClick" text="修改图标"/>
<ToggleButton fx:id="canResizableTB" mnemonicParsing="false" text="是否允许窗口拖拽缩放"/>
</items>
</ToolBar>
</children>
</fx:root>

View File

@@ -0,0 +1 @@
changeTitle

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,13 @@
login=login
login.username=Username
login.password=Password
login.button=Login
register=Register
register.username=Username
register.password=password
register.confirmPassword=Confirm Password
register.email=Email
register.phone=Phone
password=Password
email=Email
phone=Phone

View File

@@ -0,0 +1,12 @@
login=登录
login.username=用户名
login.password=密码
login.button=点击登录
register=注册
register.username=用户名
register.password=密码
register.confirmPassword=确认密码
register.email=邮箱
password=密码
email=邮箱
phone=手机