B4J Library JavaFX BorderImage - similar to android 9 Patch.

Staying with the graphic theme, this is a wrap of the javafx class BorderImage and associated classes. It is like an Android 9 Patch for Javafx.


1613670955543.png


​
At a minimum you specify the image, border width, border Insets, and slice width. The methods in BorderImage_Utils provide shortcuts to creating a border image. Or you can take full control and specify everything yourself if necessary.

Documentation for the border image is here https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/BorderImage.html

The example displays the screen in the image. All buttons have the same BorderImage. Button 3 gets resized when you resize the window.

All the code is in the example project and a B4xLib is attached.

Let me know how you get on with it.
 

Attachments

Last edited:
Excellent wrap @stevel05, It looks really nice.
Buuuuuuuuut you did catch me out for a few moments there with JavaCompilerPath o_O. I thought that my B4J IDE had lost the plot for a moment there ;)

Thank you...
 
Since it has become available I've updated my new project template so it is in all of my projects. Perfect for easy testing on all versions. I should remember to remove it before posting.
Another option is to make it conditional in your template:
Code: Copy
#If JAVA8
#JavaCompilerPath: ...
#Else IF JAVA11
...
#End IF
 
Another option is to make it conditional in your template:
Yeah, I did. But I left the build configuration on the wrong option when I exported the project. Which caused a problem when the path did not exist on the PC.
 
Last edited:
Back
Top