B4J Library JavaFX BorderImage - similar to android 9 Patch.

stevel05

Expert
Licensed User
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:

stevel05

Expert
Licensed User
JavaCompilerPath
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.
 
Last edited:

Erel

Administrator
Staff member
Licensed User
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:
B4X:
#If JAVA8
#JavaCompilerPath: ...
#Else IF JAVA11
...
#End IF
 

stevel05

Expert
Licensed User
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:
Top