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,493
Last edited:

Giorgos_xou

Member
project is being compiled and application closes automatically and i have an error
VCERYi5.png




but when i run the jar file runs
QYIyZut.png

Program started.
java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/javafx/scene/traversal/ParentTraversalEngine
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:82)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.start(main.java:36)
at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/scene/traversal/ParentTraversalEngine
at org.controlsfx.control.ButtonBar.<init>(ButtonBar.java:412)
at org.controlsfx.control.ButtonBar.<init>(ButtonBar.java:355)
at org.controlsfx.control.action.ActionUtils.createButtonBar(ActionUtils.java:429)
at impl.org.controlsfx.skin.NotificationBar.updatePane(NotificationBar.java:164)
at impl.org.controlsfx.skin.NotificationBar.<init>(NotificationBar.java:160)
at org.controlsfx.control.Notifications$NotificationPopupHandler$1.<init>(Notifications.java:332)
at org.controlsfx.control.Notifications$NotificationPopupHandler.show(Notifications.java:332)
at org.controlsfx.control.Notifications$NotificationPopupHandler.show(Notifications.java:317)
at org.controlsfx.control.Notifications.show(Notifications.java:263)
at org.controlsfx.control.Notifications.showInformation(Notifications.java:238)
at anywheresoftware.b4j.objects.ControlsUtils.ShowNotification3(ControlsUtils.java:142)
at b4j.example.main._loadrecords(main.java:206)
at b4j.example.main._appstart(main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:563)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:224)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
... 14 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.scene.traversal.ParentTraversalEngine
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 39 more


help please
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

compiled the example using Java 1.8.0_66 and received error when calling

B4X:
Sub AppStart (Form1 As Form, Args() As String)
    cutils.DisableCssWarnings
    warningDecoration = fx.LoadImage(File.DirAssets, "exclamation.png")

B4X:
main._appstart (java line: 60)
java.lang.NoClassDefFoundError: com/sun/javafx/Logging

Seems a change in the API. Any hint how to resolve?
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Removed - the UI comes up, but when using f.e. the RangeSlider Control or the NotificationButton, following error:

B4X:
java.lang.NoClassDefFoundError: com/sun/javafx/Utils

Looked the ControlsFX site and downloaded based on info: For users of JavaFX 8u40 and greater, download ControlsFX 8.40.10.

BUT it did not resolve the problem.

BTW: When using the latest RemoteControl example, which also uses ControlsFX same errors.
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Yes = copied controlsfx-8.40.10.jar and renamed to controlsfx-8.jar --- basically replacing the previous controlsfx-8.jar version 8.20.8.
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Oops = Overlooked that controlsfx is part of the standard B4J libraries (... there are so many B4J libs - sometimes confused which are core and which are additional).
Moved over and working fine now - expect the disablecsswarning.

Thanks for your help - appreciated.
 
Last edited:

jmon

Well-Known Member
Licensed User
Longtime User
I just wanted to say that for users that used ControlFx since java 8u20, updating should be done this way:

  1. Install the latest B4J
  2. Install the latest java 8 JDK (8u66)
  3. Delete the old "controlsfx-8.jar", "jControlsFX.jar", jControlsFX.xml" from your additional libraries folder
  4. Download http://fxexperience.com/downloads/controlsfx-8.40.10.zip, rename "controlsfx-8.40.10.jar" to "controlsfx-8.jar" and copy it to your internal libraries folder (in program files), overwriting the one that came with B4J.

That works for me.
 

DonManfred

Expert
Licensed User
Longtime User
Note that the library is included in B4J installation.
I tried to recompile the library. I added the source to eclipse and look out for errors.

With one import i stuck:
B4X:
import com.sun.javafx.Logging;
which jar do i need to reference to get this import work?

My actual trying are

javabuild0074.png
 
Status
Not open for further replies.
Top