52 Commits
v1.0 ... 1.3.0

Author SHA1 Message Date
suisui
2fc8a622ab update:调整项目结构,将example独立抽离module 2021-09-16 00:40:18 +08:00
suisui
3543f8acd3 1.3.0-SNAPSHOT 2021-09-16 00:02:53 +08:00
suisui
96a58bcda5 update:更新sonatype配置 2021-09-15 23:58:58 +08:00
suisui
34ddd6f26e update:补充部分注释 2021-09-06 09:02:24 +08:00
suisui
38dc53b484 fix #I1HKWY 2021-09-05 23:21:15 +08:00
suisui
547c036cdb 1.2.1-SNAPSHOT 2021-09-05 23:07:24 +08:00
suisui
a69651447c fix:修复读取中文路径文件异常 2021-09-05 22:58:16 +08:00
yangsuiyu
f6189b1bf9 支持动态修改窗口标题setWindowTitle、窗口图标setIcon、窗口可拖拽拖放setDragAndResize的接口 2020-08-29 17:50:33 +08:00
yangsuiyu
d139cbe3c5 1.修复IDEA中无法加载resources文件夹的Bug;2.修改多语言Demo 2020-08-28 23:20:34 +08:00
yangsuiyu
5b7131febf 更新READNE文档 2020-05-08 00:16:38 +08:00
yangsuiyu
a82844cf35 v1.2.0更新
1. 设计代码模块文件,导入IDE后可快速生成符合JavaFX-Plus编程规范的FXPlusController、FXPlusWindow、FXPlusApplication、FXPlusFXML文件
2. 完善多窗口切换功能,可携带数据跳转
3. 新增注解@FXWindow中的icon属性,传入String类型的图标URL,可为窗口标题栏增设图标
4. 完善JavaFX-Plus生命周期
5. 新增日志log模块
6. 新增语言国际化操作
7. 新增测试生命周期LifeDemo示例和测试国际化的LanguageDemo示例代码
8. 规范化代码和更新README
2020-05-04 23:05:02 +08:00
yangsuiyu
b48325cd63 v1.2.0更新
1. 设计代码模块文件,导入IDE后可快速生成符合JavaFX-Plus编程规范的FXPlusController、FXPlusWindow、FXPlusApplication、FXPlusFXML文件
2. 完善多窗口切换功能,可携带数据跳转
3. 新增注解@FXWindow中的icon属性,传入String类型的图标URL,可为窗口标题栏增设图标
4. 完善JavaFX-Plus生命周期
5. 新增日志log模块
6. 新增语言国际化操作
7. 新增测试生命周期LifeDemo示例和测试国际化的LanguageDemo示例代码
8. 规范化代码和更新README
2020-05-04 15:13:58 +08:00
yangsuiyu
7c807d4b39 可携带数据跳转
1. 新增可携带数据跳转的功能
2. 完善README
3. 修改示例
2020-04-07 21:53:25 +08:00
yangsuiyu
119436dc3b 修正resizable的bug 2020-04-05 22:43:29 +08:00
yangsuiyu
5e60991bda 修改README
1. 修改README
2. 测试分支
2020-04-01 13:35:34 +08:00
suisui
5f9150b0f6 修改README 2020-01-22 10:21:48 +08:00
suisui
9a04efd84f 修改gitee的markdown解析器不支持[TOC]标签所导致目录索引无法显示的bug 2020-01-22 02:44:20 +08:00
suisui
d23cda4f47 新增英文README,修正部分文件结构 2020-01-22 02:18:46 +08:00
Biubiu
54dc098123 修改README 2020-01-15 10:37:23 +08:00
Biubiu
3147d9f9b7 解决了jar包无法扫描问题 2020-01-15 10:29:57 +08:00
Biubiu
4e968bcd08 添加具体应用 2020-01-09 22:57:17 +08:00
suisui
9a542c6caa 修正部分api名称不一致的问题,新增firstDemo示例代码,展现精细化操作时该如何编写代码 2020-01-01 23:45:25 +08:00
suisui
1eb81ed37e 删除out和.idea 2019-12-10 23:59:31 +08:00
suisui
3c3c556a19 调整文件结构 2019-12-10 23:58:20 +08:00
suisui
6d5f97767d 解决README中gif无法正常显示的问题:上传gif 2019-12-10 23:29:38 +08:00
suisui
8c264a6100 解决README中gif无法正常显示的问题 2019-12-10 23:21:24 +08:00
suisui
c0684c7501 1. 新增了多窗口切换功能
2. 新增多个example示例可供使用参考
3. 修正信号收发机制的bug
4. 规范化部分代码,并加以部分注释
5. 修改README
2019-12-10 23:04:44 +08:00
Biubiu
5cc7e57a88 add LICENSE. 2019-12-02 20:53:44 +08:00
Biubiu
2596af27ed 修改README 2019-11-25 21:06:11 +08:00
Biubiu
4c1cc13601 更新 README.md 2019-07-30 09:33:39 +08:00
billkiller
f731b73207 修复了bug,调整了框架中类和函数命名 2019-07-28 02:00:14 +08:00
billkiller
c74ea3039f Merge branch 'master' of https://gitee.com/Biubiuyuyu/JavaFX-Plus 2019-07-27 22:40:43 +08:00
billkiller
bc421b87b9 支持函数表达式和change表达式 2019-07-27 22:37:52 +08:00
Biubiu
dcf02d6565 更新 README.md 2019-07-26 11:43:41 +08:00
Biubiu
986f43ad6d 更新 README.md 2019-07-25 15:10:36 +08:00
Biubiu
cacb8b154b 更新 README.md 2019-07-25 15:07:02 +08:00
billkiller
7b5e56d6f7 Merge branch 'master' of https://gitee.com/Biubiuyuyu/JavaFX-Plus 2019-07-25 10:05:08 +08:00
billkiller
48889c54a9 解决了基本类型错误bug 2019-07-25 10:04:34 +08:00
Biubiu
f715cced3d 更新 README.md 2019-07-24 23:22:45 +08:00
Biubiu
fcf17ac57f 更新 README.md 2019-07-24 23:17:13 +08:00
billkiller
34ae7db92f 解决spring的Bug以及实现了EL表达式绑定基本元素属性 2019-07-24 23:00:38 +08:00
billkiller
6fcd94e94b Merge branch 'master' of https://gitee.com/Biubiuyuyu/JavaFX-Plus 2019-07-07 12:23:02 +08:00
billkiller
7ce75c9206 实现FX-PLus和Spring结合的Demo 2019-07-07 12:21:30 +08:00
Biubiu
deb5e7f3e8 更新 README.md 2019-07-05 15:56:35 +08:00
billkiller
bb53425b43 修复了文件丢失问题 2019-07-04 11:09:05 +08:00
billkiller
573f3e1c70 Merge branch 'master' of https://gitee.com/Biubiuyuyu/JavaFX-Plus 2019-07-04 11:02:14 +08:00
billkiller
40b81fa8d8 修复了文件丢失问题 2019-07-04 11:01:27 +08:00
billkiller
5cd92e9e8f 修复了文件丢失问题 2019-07-04 10:59:17 +08:00
Biubiu
efd34fb512 更新 README.md 2019-06-30 13:56:45 +08:00
billkiller
059c5c8193 快速配置可拖动窗口,无标题窗口 2019-06-30 13:44:35 +08:00
Biubiu
953c6b16ad 更新 README.md 2019-06-29 16:18:20 +08:00
Biubiu
a50ec834d1 更新 README.md 2019-06-29 16:17:36 +08:00
306 changed files with 8855 additions and 3266 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.idea
*.iml
**/*.log
**/target

View File

@@ -1,12 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="JavaFx-Plus:jar">
<output-path>$PROJECT_DIR$/out/artifacts/JavaFx_Plus_jar</output-path>
<root id="archive" name="JavaFx-Plus.jar">
<element id="module-output" name="JavaFx-Plus" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/cglib/cglib/3.1/cglib-3.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/ow2/asm/asm/4.2/asm-4.2.jar" path-in-jar="/" />
<element id="library" level="project" name="Maven: cglib:cglib:3.1" />
<element id="library" level="project" name="Maven: org.ow2.asm:asm:4.2" />
</root>
</artifact>
</component>

16
.idea/compiler.xml generated
View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="JavaFx-Plus" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="JavaFx-Plus" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: cglib:cglib:3.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib/3.1/cglib-3.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib/3.1/cglib-3.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib/3.1/cglib-3.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: junit:junit:4.11">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.11/junit-4.11.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.11/junit-4.11-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.11/junit-4.11-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.hamcrest:hamcrest-core:1.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="Maven: org.ow2.asm:asm:4.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/ow2/asm/asm/4.2/asm-4.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/ow2/asm/asm/4.2/asm-4.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/ow2/asm/asm/4.2/asm-4.2-sources.jar!/" />
</SOURCES>
</library>
</component>

13
.idea/misc.xml generated
View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/JavaFx-Plus.iml" filepath="$PROJECT_DIR$/JavaFx-Plus.iml" />
</modules>
</component>
</project>

124
.idea/uiDesigner.xml generated
View File

@@ -1,124 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

1409
.idea/workspace.xml generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: cglib:cglib:3.1" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:4.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
</component>
</module>

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Biubiu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

File diff suppressed because it is too large Load Diff

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
README.en/JavaFX-Plus.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

BIN
README.en/Resizable_en.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

BIN
README.en/bindhow.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
README.en/demo1.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
README.en/draggable_en.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

BIN
README.en/expression.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
README.en/expressionV2V.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

BIN
README.en/language_demo.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
README.en/log_demo_en.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
README.en/modulesAction.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

BIN
README.en/moveable.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

BIN
README.en/resizeAble.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

BIN
README.en/template_en.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

BIN
README.en/wrap_JavaBean.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

1243
README.md
View File

File diff suppressed because it is too large Load Diff

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
README/JavaFX-Plus.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

BIN
README/JavaFX-Plus_en.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

BIN
README/Resizable.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

BIN
README/bindhow.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
README/controllerConfig.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
README/demo1.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
README/draggable.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

BIN
README/expression.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
README/expressionV2V.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
README/helloWorldDemo.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
README/language_demo.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
README/log_demo.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
README/modulesAction.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

BIN
README/moveable.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 MiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

BIN
README/resizeAble.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

BIN
README/template.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

BIN
README/template_incude.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

BIN
README/wrap_JavaBean.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

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);
}
}

Some files were not shown because too many files have changed in this diff Show More