Refactored GUI tools made with Java8 + JavaFX in 2016

Contents

background

The problem I was having

Problem decomposition

What was important

What I did / what I was able to do

Finally achieved my wish on 5/11/2020

Now works with custom JRE

Automatic build and automatic release with CI

image.png

Automatic format

Changed to format before build with google-java-format-gradle-plugin

Visualization of test coverage

Code diet

Before refactoring

$ find src/ -name '*.java' | xargs wc -l
       31 src/application/fileList/FileListHBox.java
      189 src/application/fileList/FileListHBoxController.java
       31 src/application/imageViewer/ImageViewerBorderPane.java
      288 src/application/imageViewer/ImageViewerBorderPaneController.java
       92 src/application/Main.java
      471 src/application/MainController.java
       44 src/application/options/Numberings.java
      104 src/application/options/Options.java
       40 src/application/options/OptionsStage.java
      165 src/application/options/OptionsStageController.java
       69 src/application/options/Separators.java
       36 src/application/outputViewer/MyButton.java
      122 src/application/outputViewer/MyImageView.java
       33 src/application/outputViewer/OutputViewerAnchorPane.java
      130 src/application/outputViewer/OutputViewerAnchorPaneController.java
       25 src/application/TKoolVersion.java
       29 src/application/version/VersionStage.java
       42 src/application/version/VersionStageController.java
     1941 total

After completion

# main
$ find src/main/java/ -name '*.java' | xargs wc -l
         8 src/main/java/com/jiro4989/tkfm/data/CropSize.java
        42 src/main/java/com/jiro4989/tkfm/data/Position.java
        38 src/main/java/com/jiro4989/tkfm/data/Rectangle.java
        67 src/main/java/com/jiro4989/tkfm/Main.java
       422 src/main/java/com/jiro4989/tkfm/MainController.java
       235 src/main/java/com/jiro4989/tkfm/model/CroppingImageModel.java
        21 src/main/java/com/jiro4989/tkfm/model/ImageFileModel.java
        52 src/main/java/com/jiro4989/tkfm/model/ImageFilesModel.java
       211 src/main/java/com/jiro4989/tkfm/model/PropertiesModel.java
       133 src/main/java/com/jiro4989/tkfm/model/TileImageModel.java
        15 src/main/java/com/jiro4989/tkfm/util/ImageUtil.java
         6 src/main/java/com/jiro4989/tkfm/Version.java
      1250 total

# test
$ find src/test -name '*.java' | xargs wc -l
        13 src/test/java/com/jiro4989/tkfm/data/CropSizeTest.java
        29 src/test/java/com/jiro4989/tkfm/data/PositionTest.java
        26 src/test/java/com/jiro4989/tkfm/data/RectangleTest.java
       212 src/test/java/com/jiro4989/tkfm/model/CroppingImageModelTest.java
        28 src/test/java/com/jiro4989/tkfm/model/ImageFileModelTest.java
        64 src/test/java/com/jiro4989/tkfm/model/ImageFilesModelTest.java
       143 src/test/java/com/jiro4989/tkfm/model/PropertiesModelTest.java
       120 src/test/java/com/jiro4989/tkfm/model/TileImageModelTest.java
        43 src/test/java/com/jiro4989/tkfm/util/ImageUtilTest.java
        13 src/test/java/com/jiro4989/tkfm/VersionTest.java
       691 total

Test code maintenance

Time taken

image.png

Having a hard time

I'm not stupid about suffering from the tools I made (ridiculous)

gradle

JavaFX Separation Problem (jmods)

Custom JRE

I don't have the source code for my library

Impressions

I'm glad I did it

Reflection 4 years ago

from now on

Summary

If I had done these from the beginning, I wouldn't have had such a painful feeling ...

that's all

Recommended Posts

Refactored GUI tools made with Java8 + JavaFX in 2016
Make Calendar gadgets made with JavaFX compatible with Java SE 9
I made roulette in Java.
JavaFX environment construction in Java 13
Morphological analysis in Java with Kuromoji
I made a GUI with Swing
I made an annotation in Java.
Age guessing game made in Java
Play with Markdown in Java flexmark-java
Sample vending machine made in Java
Run an application made with Java8 with Java6
Concurrency Method in Java with basic example
Sample vending machine made in Java (classification)
Read xlsx file in Java with Selenium
Split a string with ". (Dot)" in Java
Vending machine made with Java (domain driven)
Working with huge JSON in Java Lambda
I made a primality test program in Java
Read a string in a PDF file with Java
Create a CSR with extended information in Java
Hello World with JavaFX 11 (OpenJFX) in Liberica JDK 11
Static code analysis with Checkstyle in Java + Gradle
Simple obstacle racing made with processing for Java
Text extraction in Java from PDF with pdfbox-2.0.8
I made a rock-paper-scissors game in Java (CLI)
Practice working with Unicode surrogate pairs in Java
[JAVA] [Spring] [MyBatis] Use IN () with SQL Builder
Encrypt / decrypt with AES256 in PHP and Java
Programming with direct sum types in Java (Neta)
Get along with Java containers in Cloud Run
Partization in Java
Changes in Java 11
HelloFX with JavaFX
Java GUI sample
Rock-paper-scissors in Java
Pi in Java
FizzBuzz in Java
I made a simple calculation problem game in Java
How to call functions in bulk with Java reflection
Include image in jar file with java static method
Introduce JavaFX 15 and do GUI development with VS Code
Quickly implement a singleton with an enum in Java
I dealt with Azure Functions not working in Java
[Java] Get the file path in the folder with List
Output true with if (a == 1 && a == 2 && a == 3) in Java (Invisible Identifier)
Prepare the environment for java11 and javaFx with Ubuntu 18.4
Check coverage with Codecov in Java + Gradle + Wercker configuration
Face recognition app made with Amazon Rekognition and Java
I made a program in Java that solves the traveling salesman problem with a genetic algorithm