B4J Library ControlsFX Library

Status
Not open for further replies.
ControlsFX is a large open source library that extends JavaFX: http://fxexperience.com/controlsfx/features/
It requires Java 8.

jControlsFX is a wrapper for several controls and features from this library.

The following controls are supported:
BreadCrumbBar, CheckComboBox, ColorPicker, HyperlinkLabel, InfoOverlay, ListSelectionView, SegmentedButton, Separator and StatusBar.
You can see them in the screenshot (Mac version) and attached project.
You can download the compiled version of this example: www.b4x.com/b4j/files/ControlsFXExample.jar

upload_2015-2-15_17-32-19.png


It also includes a class with useful features named ControlsUtils.
ControlsUtils allows you to:
- Set the nodes background color or image.
- Add a decoration to a node (like the exclamation mark near the text field above).
- Show notifications.
- Set the size of nodes even if you do not know the node type.

PropertySheet:

SS-2015-02-18_16.53.50.png


https://www.b4x.com/android/forum/threads/propertysheet.50863/#post-318066

Note that the library is included in B4J installation.
 

Attachments

  • ControlsFXExample.zip
    4 KB · Views: 1,590
Last edited:

alienhunter

Active Member
Licensed User
Longtime User
Hi
i upgraded to B4J 4.01 from B4J 3.71 and now i am getting those errors with my project when using controlsfx
Program started.
1.8.0_40
Windows 8.1

Feb 03, 2016 7:48:35 AM com.sun.javafx.css.StyleConverterImpl getInstance
SEVERE: StyleConverterImpl : converter Class is null for : com.sun.javafx.scene.layout.region.CornerRadiiConverter
Feb 03, 2016 7:48:35 AM com.sun.javafx.css.StyleConverterImpl readBinary
SEVERE: could not deserialize com.sun.javafx.scene.layout.region.CornerRadiiConverter
could not deserialize com.sun.javafx.scene.layout.region.CornerRadiiConverter




cutils.jpg
 

alienhunter

Active Member
Licensed User
Longtime User
hi to all ,
is there an event that can be captured when you move items from the source list to target list and vice versa ?
 

stevel05

Expert
Licensed User
Longtime User
@alienhunter
If you need it you can add an invalidation listener to the target values:

B4X:
Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Private ListSelectionView1 As ListSelectionView
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.SetFormStyle("UNIFIED")
    MainForm.RootPane.LoadLayout("1") 'Load the layout file.
    MainForm.Show
 
    ListSelectionView1.SourceItems.Clear
    ListSelectionView1.TargetItems.Clear
 
    Dim LSVJO As JavaObject = ListSelectionView1
    Dim TargetItems As JavaObject = LSVJO.RunMethod("getTargetItems",Null)
    Dim Listener As Object = TargetItems.CreateEvent("javafx.beans.InvalidationListener","TargetChanged","")
    TargetItems.RunMethod("addListener",Array(Listener))
 
    ListSelectionView1.SourceItems.AddAll(Array As String(1,2,3,4,5,6,7))
End Sub

Sub TargetChanged_Event(MethodName As String, Args() As Object) As Object
    Dim L As List = Args(0)
    For i = 0 To L.Size - 1
        Log(L.get(i))
    Next
End Sub

Be aware that the list will contain all of the target values, the invalidation listener doesn't provide an old and new value.

Layout 1 just contains a ListSelectionView.

Don't forget to remove the listener if you no longer need it.
 

hookshy

Well-Known Member
Licensed User
Longtime User
There is a library named the same jFXControls done by Agraham that is supported only on java jdk 7 ....
I have used an panel object with old jFXControls ...
Dim window As JFXtrasWindow
 

micro

Well-Known Member
Licensed User
Longtime User
Hi to all
it's possible change text size in message for control fx notification?
Thanks
 

jayel

Active Member
Licensed User
Longtime User
Hey dowload link doesn't work anymore.
And the other download just provide the jar file no more xml?
Where can I find the XML?
 

ThRuST

Well-Known Member
Licensed User
Longtime User
Anyone else who cannot get FXnotify to work with Java v9.0.1?

Waiting for debugger to connect...
Program started.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by impl.org.controlsfx.ImplUtils (file:/C:/Dev/B4J/Libraries/controlsfx-8.jar) to method javafx.scene.Parent.getChildren()
WARNING: Please consider reporting this to the maintainers of impl.org.controlsfx.ImplUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.NoClassDefFoundError: com/sun/javafx/scene/control/skin/BehaviorSkinBase
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at org.controlsfx.control.BreadCrumbBar.createDefaultSkin(BreadCrumbBar.java:336)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control.access$000(Control.java:83)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1419)
at javafx.graphics/javafx.scene.Parent.access$400(Parent.java:81)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:127)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:100)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Parent.java:1419)
at javafx.graphics/javafx.scene.Parent.access$400(Parent.java:81)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Parent.java:127)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:100)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9513)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:583)
at javafx.graphics/javafx.scene.Scene.access$3500(Scene.java:173)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2502)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:410)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:409)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:436)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:518)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:319)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.scene.control.skin.BehaviorSkinBase
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 41 more
Range: 20 - 100
Range: 20 - 80
java.lang.NoClassDefFoundError: com/sun/javafx/scene/control/skin/BehaviorSkinBase
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at org.controlsfx.control.HyperlinkLabel.createDefaultSkin(HyperlinkLabel.java:140)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control.access$000(Control.java:83)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9513)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9506)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9506)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:583)
at javafx.graphics/javafx.scene.Scene.access$3500(Scene.java:173)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2502)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:410)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:409)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:436)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:518)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:319)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.scene.control.skin.BehaviorSkinBase
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 33 more
java.lang.NoClassDefFoundError: com/sun/javafx/scene/control/skin/BehaviorSkinBase
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at org.controlsfx.control.RangeSlider.createDefaultSkin(RangeSlider.java:194)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
at javafx.controls/javafx.scene.control.Control.access$000(Control.java:83)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9513)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9506)
at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9506)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Scene.java:583)
at javafx.graphics/javafx.scene.Scene.access$3500(Scene.java:173)
at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2502)
at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:410)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:409)
at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:436)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:518)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:319)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.scene.control.skin.BehaviorSkinBase
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 33 more

ControlsFX.JPG
 
Last edited:

ThRuST

Well-Known Member
Licensed User
Longtime User
I did but somehow still not all the controls was showing correctly (half was gone) in the example. If someone else experience the same we'll know about it.
 

ThRuST

Well-Known Member
Licensed User
Longtime User
This control is a bit old but still nice and useful. I am using the black Notification with an image, (Java 8) and would like to change the font and size.

Is this update possible?
 
Status
Not open for further replies.
Top