Re: Mirrored observable collections

2014-07-23 Thread Mike Hearn
Thanks Tomas! I'm a big fan of your work and blog.

I learned about ReactFX after I started writing my current project, seems
like a very useful abstraction indeed, although so far I've found the basic
JFX stuff to be nearly sufficient (a few more transformers and mirrored
observables were so far all I needed).

Actually I didn't realise ReactFX could do this. I learned about what it
can do by reading the github page which covers many features but doesn't
mention threading anywhere, so I figured it didn't have any support for it.
I should have dug deeper! Maybe you could add a discussion of threading and
how to manage asynchronous state using ReactFX?

Additionally a discussion of debugging would be helpful. My experience so
far is that reactive/streaming code is fun to write and painful to debug
compared to traditional imperative code.

In my UI I use content bindings, so I'd need to (I think) use
EventStreams.merge() to merge the event stream back into a copy of the set,
and at that point the API would be more verbose than
MirroredObservableSet/List. Still ReactFX is clearly a lot more general and
I might well switch to it at some point.

Incidentally the lack of a uni-directional string binding utility in JavaFX
is really annoying: converting a read only observable value into a string
is a really common thing to want to do!


Re: ANGLE - Translating OpenGL ES 2 code to DirectX?

2014-07-23 Thread Scott Palmer
If I'm resorting to native code I care a lot less about it being cross-platform 
(not 100% less, but less). Give me a GLContext on Linux and Mac and whatever 
DirectX has on Windows. I just want a way to get content generated on the 
native side to the screen without losing performance. 

Scott

 On Jul 21, 2014, at 4:13 PM, Joseph Andresen joseph.andre...@oracle.com 
 wrote:
 
 That's a good point Robert,
 
 If the GLContext work that steve and felipe did become an actual thing, this 
 would help that cause become cross platform.
 Angle also is strictly es2, and I haven't looked at prism es2 in a while but 
 I think we use GL2 calls for desktop in some cases. We would have to address 
 those cases (if even possible) before any work started.
 
 -Joe
 
 On 7/21/2014 10:40 AM, Robert Krüger wrote:
 On Mon, Jul 21, 2014 at 7:09 PM, Joseph Andresen
 joseph.andre...@oracle.com wrote:
 I also forgot,
 
 The argument could be made that if we did indeed use angle, we could ditch
 our directx 9 pipeline altogether and just use one hardware pipeline. We
 would really have to evaluate this though, and I am not sure the work would
 be worth the benefit (if there even is any).
 Well, at least the presence of the directx pipeline was used as an
 argument against exposing a GL context via a low-level native api,
 which quite a number of people with particular graphics/performance
 requirements need IIRC, so this would be a potential benefit.
 


Re: ANGLE - Translating OpenGL ES 2 code to DirectX?

2014-07-23 Thread Scott Palmer
Another way to get some native visualization (though a different kind perhaps) 
would be to address some limitations in the media APIs. MediaPlayer needs a 
mechanism to allow developers to plug in their own codecs. If it played a 
stream of frames generated from whatever JNI code I wished, I could just feed 
it with whatever I rendered in my native code.

Scott

 On Jul 22, 2014, at 3:33 PM, Kevin Rushforth kevin.rushfo...@oracle.com 
 wrote:
 
 Here is the JIRA that is tracking this:
 
 RT-36215 https://javafx-jira.kenai.com/browse/RT-36215:  Allow FX to 
 interoperate with 3rd party (native) OpenGL visualizations
 
 There aren't any concrete plans to deliver it, though. When/if we do, 
 Richard's earlier comments reflect current thinking as to how we would likely 
 proceed.
 
 -- Kevin
 
 
 Richard Bair wrote:
 This sounds like there are concrete plans for this, which wood be
 great news.
 
 I’d say there were a lot of thoughts around it but it hasn’t been turned 
 into an actionable plan. Heck, I don’t even know if we have a JIRA for it 
 (Kevin would know…)
 
 Richard
 
  
 The approach where an integration API would only work on
 Windows with GL support would at least in our area not be uncommon.
 There are a number of digital media pro applications that require GL
 to be installed on Windows to work.
 
 Keep up the good work.
 
  


Re: Mirrored observable collections

2014-07-23 Thread Tomas Mikula
On Wed, Jul 23, 2014 at 1:16 PM, Mike Hearn m...@plan99.net wrote:
 Thanks Tomas! I'm a big fan of your work and blog.

 I learned about ReactFX after I started writing my current project, seems
 like a very useful abstraction indeed, although so far I've found the basic
 JFX stuff to be nearly sufficient (a few more transformers and mirrored
 observables were so far all I needed).

 Actually I didn't realise ReactFX could do this. I learned about what it can
 do by reading the github page which covers many features but doesn't mention
 threading anywhere, so I figured it didn't have any support for it. I should
 have dug deeper! Maybe you could add a discussion of threading and how to
 manage asynchronous state using ReactFX?

Yeah, this information is missing on the project site.

 Additionally a discussion of debugging would be helpful. My experience so
 far is that reactive/streaming code is fun to write and painful to debug
 compared to traditional imperative code.

In a debugger, yes. On the other hand, I find it easy to write tests for.


 In my UI I use content bindings, so I'd need to (I think) use
 EventStreams.merge() to merge the event stream back into a copy of the set,
 and at that point the API would be more verbose than
 MirroredObservableSet/List. Still ReactFX is clearly a lot more general and
 I might well switch to it at some point.

My suggestion was for the case if you only care about changes and not
full content. If you want the full collection on both sides, then
your mirrored collections make sense. You could still use the
mentioned threadBridge method to transfer change events, but that's
just a minor part of the implementation.


 Incidentally the lack of a uni-directional string binding utility in JavaFX
 is really annoying: converting a read only observable value into a string is
 a really common thing to want to do!

You can use EasyBind:

ObservableValueT src = ...;
ObservableValueString str = EasyBind.map(src, t - format(t));

although it's not as concise and fluent as

ObservableValueT src = ...;
ObservableValueString str = src.map(t - format(t));

would be.


Re: JavaFX embedded (jre 8u6): touch problem (malformed multi touch event)

2014-07-23 Thread Lisa Selle

Hi Prasant,

This looks suspiciously related to 
https://javafx-jira.kenai.com/browse/RT-34296.  If so, this bug *should* 
be fixed in Monocle but it is not (and will not be) fixed in lens.


I believe you are building openJFX, correct?  If you can try a recent 
build with the latest Monocle code (if you are building from OpenJFX, 
monocle is now the default) the problem should be resolved. Please let 
us know if that's not the case.


Thanks,

Lisa
On 7/23/2014 1:52 AM, Prasant J wrote:

Hi,

I'm woking on Freescale iMX6Q based linux system and I have a single
touch display connected. I'm running Oracle ARM JVM (8u6 release).

The touch is multi touch with 2 touch points (touch controller is from
eGalax). My javafx application does not get any touch events and
javafx dumps the following message:

com.sun.glass.ui.lens.LensApplication nativeEventLoop
SEVERE: 2352 udevInput.c:1634 lens_input_pointerEvents_handleSync:
[preprocessing MT_A] malformed multi touch event - ignoring


Any clue what might be wrong? Any inputs will be of help to me.

-Pj




hg: openjfx/8u-dev/rt: RT-35126 [Animation] Combinations of transitions don't work as expected (circle should fade in)

2014-07-23 Thread martin . sladecek
Changeset: e248baa75433
Author:Martin Sladecek martin.slade...@oracle.com
Date:  2014-07-23 15:47 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/e248baa75433

RT-35126 [Animation] Combinations of transitions don't work as expected (circle 
should fade in)

! modules/graphics/src/main/java/javafx/animation/SequentialTransition.java
! 
modules/graphics/src/test/java/javafx/animation/SequentialTransitionPlayTest.java



Re: Mirrored observable collections

2014-07-23 Thread Werner Lehmann

Hi,

take a look at Bindings.format and Bindings.createStringBinding for 
that. I use it all the time.


Werner

On 23.07.2014 13:16, Mike Hearn wrote:

Incidentally the lack of a uni-directional string binding utility in JavaFX
is really annoying: converting a read only observable value into a string
is a really common thing to want to do!


hg: openjfx/8u-dev/rt: RT-37925: [Accessibility] Make Spinner accessible

2014-07-23 Thread felipe . heidrich
Changeset: 2c22277314de
Author:Felipe Heidrich felipe.heidr...@oracle.com
Date:  2014-07-23 15:48 -0700
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/2c22277314de

RT-37925: [Accessibility] Make Spinner accessible

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SpinnerSkin.java
! modules/controls/src/main/java/javafx/scene/control/Spinner.java
! modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java
! modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
! modules/graphics/src/main/java/javafx/scene/AccessibleRole.java