B4J Library Jfoenix Wrap

Hi!

This is my very first attempt to create a wrap for a library (more of a proof of concept), It is based on this project:

https://github.com/jfoenixadmin/JFoenix
http://www.jfoenix.com/index.html

Features:

JfxCheckBox, it is a custom view (with designer support, no properties yet) that allows to set colors for check and unchecked states, to catch the event use the same as the normal checkbox or the already implemented jfxChecked_change event

jfxDialog, this one is a class that will show a non blocking msgbox style dialog, you can upload a pane to set its height and width and load a layout within, the API needs a pane that works as an owner of the dialog. To catch the event here, just use eventName_closed event (the one in the form events)
upload_2017-5-20_23-10-27.png

if you want jfxDialog to work like msgbox just write:

B4X:
wait for jfxdialog_closed

edit V1.01
in this version we have JFXDatePicker and JFXTimePicker
Date Picker will return the date ticks like the normal datepicker
but Time Picker event will return a string representation of the time.

upload_2017-5-20_23-8-12.png


edit V1.02

This version comes with JFXBadge and JFXRippler,

There is a nuisance with both classes, they remove the original node of the panel and reinsert them as part of the new node, it will conserve the very same spot and anchors tho. This means that for now only already inserted nodes can be badged/ripplyfied

In the JfoenixTester project, there are some methods that helps with finding if the original node is part of this classes.

upload_2017-5-22_14-26-33.png


If you want any other feature implemented or more methods for the currently available, you can ask for it.
 

Attachments

  • JfoenixTester.zip
    4.5 KB · Views: 415
  • JfoenixWrap.zip
    17.5 KB · Views: 443
Last edited:

DonManfred

Expert
Licensed User
. and soon JFXRippler, JFXCheckBox
JFXCheckbox is already there
JfxCheckBox, it is a custom view (with designer support, no properties yet) that allows to set colors for check and unchecked states, to catch the event use the same as the normal checkbox or the already implemented jfxChecked_change event
 

CanguroCode

Active Member
Licensed User
Hi!, this is still alive? I need the other components (JFXSlider)

Thanks for you work
 

EnriqueGonzalez

Well-Known Member
Licensed User
Hi!, this is still alive? I need the other components (JFXSlider)

Thanks for you work

Hi!

thanks to you for taking interest, unfortunately i lost the code due to a my lack of vision when formmating my computer, but i created a JFXSlider Class for your use, it has designer support, properties and values.

Hope you find it useful.

If you need something else you can ask.
 

Attachments

  • JfoenixSlider.zip
    3.5 KB · Views: 262

CanguroCode

Active Member
Licensed User
Gracias hermano, que detalle lo de la clase! que mala suerte lo de la perdida de código, te sugiero hagas versiones (Gitlab, es gratis y privado). No quiero ocasionarte trabajo adicional, pensaba ya lo tenias hecho, trataré de hacer la librería (o con la clase que me pasaste de ahi basarme) para los demás componentes si tengo dudas te consulto.

Excelente trabajo!
 

EnriqueGonzalez

Well-Known Member
Licensed User
Gracias hermano! que mala suerte lo de la perdida de código, te sugiero hagas versiones (Gitlab, es gratis y privado). No quiero ocasionarte trabajo adicional, pensaba ya lo tenias hecho, trataré de hacer la librería para los demás componentes si tengo dudas te consulto.

Si, ya tengo gitlab y estoy aprendiendo (y acostumbrandome) a usar git, pero te hablo de hace poco, uno o dos meses top. En el caso de Jfoenix el problema es que no hay JavaDocs pero en el caso de este Slider es un wrap del slider original de JavaFX.

Te recomiendo Luyten para que puedas decompilar el jar de JFoenix y ver que metodos publicos tiene
https://github.com/deathmarine/Luyten
 

CanguroCode

Active Member
Licensed User
Ok ok, no utilizo luyten (pero lo probaré) uso el ide de intellij ahi mismo permite decompilar. Para que no sufras usando git, checa gitkraken https://www.gitkraken.com/ lo utilizo para produccion y desarrollo dale una oportunidad, gratis, es visual y permite interactuar con gitlab y si encuentras algo mejor pasa el dato ;)

Saludos hermano
 

inakigarm

Well-Known Member
Licensed User
Hi Enrique:

I've downloaded jfoenix.jar (https://search.maven.org/remotecontent?filepath=com/jfoenix/jfoenix/8.0.7/jfoenix-8.0.7.jar) from the Github link and tried to run the B4J app but I get this error:

main._appstart (java line: 76)
java.lang.NoSuchMethodError: com.jfoenix.skins.JFXDatePickerSkin.getEditableInputNode()Ljavafx/scene/control/TextField;
at com.jfoenix.skins.JFXDatePickerSkin.getDisplayNode(JFXDatePickerSkin.java:211)
at com.sun.javafx.scene.control.skin.ComboBoxBaseSkin.updateDisplayArea(ComboBoxBaseSkin.java:141)
at com.sun.javafx.scene.control.skin.ComboBoxBaseSkin.computePrefWidth(ComboBoxBaseSkin.java:183)
at javafx.scene.control.Control.computePrefWidth(Control.java:535)
at javafx.scene.Parent.prefWidth(Parent.java:904)
at javafx.scene.layout.Region.prefWidth(Region.java:1419)
at javafx.scene.Node.autosize(Node.java:2865)
at javafx.scene.Parent.layoutChildren(Parent.java:1105)
at javafx.scene.Parent.layout(Parent.java:1076)
at javafx.scene.Parent.layout(Parent.java:1082)
at javafx.scene.Scene.doLayoutPass(Scene.java:552)
at javafx.scene.Scene.preferredSize(Scene.java:1646)
at javafx.scene.Scene.impl_preferredSize(Scene.java:1720)
at javafx.stage.Window$9.invalidated(Window.java:834)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:910)
at javafx.stage.Window.show(Window.java:925)
at javafx.stage.Stage.show(Stage.java:256)
at anywheresoftware.b4j.objects.Form.Show(Form.java:205)
at b4j.example.main._appstart(main.java:76)
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:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
at b4j.example.main.start(main.java:38)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
at com.sun.javafx.application.LauncherImpl$$Lambda$53/479851444.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl$$Lambda$45/1681433494.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/767715469.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/1685538367.run(Unknown Source)
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.lambda$null$145(WinApplication.java:101)
at com.sun.glass.ui.win.WinApplication$$Lambda$36/2058534881.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)


Maybe the lib has to be updated to the new jfoenix.jar? Are you working on other components (like listview, tree table view,etc..) avalaible on jfoenix?

Thanks
Iñaki
 

GanjaKyp

Active Member
Licensed User
Good evening, great library!
Is it possible to wrap JFXTreeTableView, JFXNodesList and JFXDialog?
 

DonManfred

Expert
Licensed User
Is it possible to wrap JFXTreeTableView, JFXNodesList and JFXDialog?
1. They are not related to the lib posted here.
2. You should always create a new thread for any question you have.
3. You should post a Thread in the bugs and Wish-Forum about your wish.
 

EnriqueGonzalez

Well-Known Member
Licensed User
1. They are not related to the lib posted here.
2. You should always create a new thread for any question you have.
3. You should post a Thread in the bugs and Wish-Forum about your wish.

Thanks @DonManfred for the follow up, but indeed all those 3 views are part of the phoenix library.
https://github.com/jfoenixadmin/JFoenix

I think it is posible to wrap them (not so much with the JFXTreeTableView) but it is a slow process, i will try on the weekend. (at least one)
 
Top