Tested for B4J and B4A. Works perfectly! I don't have an iPhone.Attached version 0.98.
Tested with B4J and B4A, not B4i yet.
Please test it, and when it works also for you, i will then publish it as b4xlib Library.
View attachment 156627
What you can do:
- Change the texts, adapt them to your language.
View attachment 156628
- Hide the ID and or the Responsible column.
View attachment 156629
- When you click on a row and move the mouse, the data of that row is displayed.
View attachment 156630 View attachment 156632
- When you click on an arrow, the diagram jumps to show the beginning of the task or group.
View attachment 156633 View attachment 156634
- You can take a snapshot of the current display with the Sbapshot method which returns a B4XBitmap.
Sure I do also this, via ferrata, probably again tomorrow morning:I suppose that in your daily life you have more important things to do...
Very interesting! It goes from being a viewer that displays information to being interactive for the user. It is a qualitative leap.Could this be interesting for you ?
Select a Task.
View attachment 156636
View attachment 156637
Move a cursor, begin time, end time or move the task. End time in the example.
View attachment 156638
And validate.
View attachment 156639
For the moment it is at a state of demonstrator.
Will need some more time.
The next two days no time for B4X.
Sure I do also this, via ferrata, probably again tomorrow morning:
View attachment 156640
And your project was a kind of challenge for me and i like doing this.
Could this be interesting for you ?
Attached you fing version 0.99.
I anticipated the first wish which would have been asked if i had already published this class.
Having the scales not only in hours but also in days.
....
I have for sur not tested everything, therefore bug reports are welcome.
What do you understand by "e-commerce for everyone" ?"e-commerce for everyone"
WARNING: package com.sun.javafx.embed.swing.oldimpl not in javafx.swing
Waiting for debugger to connect...
Program started.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Error occurred on line: 450 (xGanttLite)
java.lang.IndexOutOfBoundsException: Index 25 out of bounds for length 25
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.util.Objects.checkIndex(Objects.java:385)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at anywheresoftware.b4a.objects.collections.List.Get(List.java:122)
at b4j.xGanttLiteDemo.xganttlite._drawfixedcolumnsdata(xganttlite.java:2347)
at b4j.xGanttLiteDemo.xganttlite._drawfixedcolumns(xganttlite.java:2130)
at b4j.xGanttLiteDemo.xganttlite._redrawgantt(xganttlite.java:887)
at b4j.xGanttLiteDemo.xganttlite._cvscursor_filter(xganttlite.java:1271)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at anywheresoftware.b4j.agraham.reflection.Reflection$3.handle(Reflection.java:243)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(CompositeEventHandler.java:321)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(CompositeEventHandler.java:98)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:221)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:180)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene.processGestureEvent(Scene.java:1956)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.scrollEvent(Scene.java:2701)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleScrollEvent$5(GlassViewEventHandler.java:543)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleScrollEvent$6(GlassViewEventHandler.java:523)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleScrollEvent(GlassViewEventHandler.java:522)
at javafx.graphics/com.sun.glass.ui.View.notifyScroll(View.java:965)
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:184)
at java.base/java.lang.Thread.run(Thread.java:1589)
WARNING: package com.sun.javafx.embed.swing.oldimpl not in javafx.swing
Waiting for debugger to connect...
Program started.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Error occurred on line: 450 (xGanttLite)
java.lang.IndexOutOfBoundsException: Index 25 out of bounds for length 25
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.util.Objects.checkIndex(Objects.java:385)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at anywheresoftware.b4a.objects.collections.List.Get(List.java:122)
at b4j.xGanttLiteDemo.xganttlite._drawfixedcolumnsdata(xganttlite.java:2347)
at b4j.xGanttLiteDemo.xganttlite._drawfixedcolumns(xganttlite.java:2130)
at b4j.xGanttLiteDemo.xganttlite._redrawgantt(xganttlite.java:887)
at b4j.xGanttLiteDemo.xganttlite._cvscursor_filter(xganttlite.java:1271)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at anywheresoftware.b4j.agraham.reflection.Reflection$3.handle(Reflection.java:243)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(CompositeEventHandler.java:321)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(CompositeEventHandler.java:98)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:221)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:180)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene.processGestureEvent(Scene.java:1956)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.scrollEvent(Scene.java:2701)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleScrollEvent$5(GlassViewEventHandler.java:543)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleScrollEvent$6(GlassViewEventHandler.java:523)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleScrollEvent(GlassViewEventHandler.java:522)
at javafx.graphics/com.sun.glass.ui.View.notifyScroll(View.java:965)
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:184)
at java.base/java.lang.Thread.run(Thread.java:1589)
Error occurred on line: 450 (xGanttLite)
java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "data.method" is null
at anywheresoftware.b4a.shell.Shell.runGoodChain(Shell.java:370)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:181)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at anywheresoftware.b4j.agraham.reflection.Reflection$3.handle(Reflection.java:243)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(CompositeEventHandler.java:321)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(CompositeEventHandler.java:98)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:221)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:180)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene.processGestureEvent(Scene.java:1956)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.scrollEvent(Scene.java:2701)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleScrollEvent$5(GlassViewEventHandler.java:543)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleScrollEvent$6(GlassViewEventHandler.java:523)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleScrollEvent(GlassViewEventHandler.java:522)
at javafx.graphics/com.sun.glass.ui.View.notifyScroll(View.java:965)
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:184)
at java.base/java.lang.Thread.run(Thread.java:1589)
Private Sub cvsCursor_Filter(E As Event)
Private MouseEvent As JavaObject = E
Private Delta As Int
If ScrollV.Active = True Then
Delta = MouseEvent.RunMethod("getDeltaY",Null)
If Delta > 0 Then
If ScrollV.BeginIndex > 0 Then
ScrollV.BeginIndex = ScrollV.BeginIndex - 1
End If
Else If Delta < 0 Then
If ScrollV.EndIndex < Rows.Size - 1 Then
ScrollV.BeginIndex = ScrollV.BeginIndex + 1
End If
End If
ScrollV.EndIndex = ScrollV.BeginIndex + NbRowsVisible - 1
ReDrawGantt
ScrollCursorDrawV
End If
End Sub