Embedding Mac native widgets into a Scene

2014-10-31 Thread Mike Hearn
JavaFX provides a great set of widgets that are pretty complete, but a few
lag behind behind their native counterparts on some platforms. This is
especially noticeable with the Mac text field widget, which has things like
integrated spelling/grammar checking, auto correct, services, speech
recognition and so on.

WebKit manages to expose all this functionality despite that HTML is not
the native Mac UI framework. So I am wondering how hard it is for JFX to do
the same. However, I know very little about how WebKit does this or how
easy it'd be to replicate in the Java world. Are there any experts on the
list who could comment?


Re: Embedding Mac native widgets into a Scene

2014-10-31 Thread Stephen F Northover

Hi Mike,

Embedding native controls in FX runs afoul of the whole 
lightweight/heavyweight issue.  I had a hack of this once using SWT 
native controls and I was able to have them appear on Windows because 
HWND clipping was honored but on Mac, FX drew on top of the native 
control.  Mac was changed to use CALayers way back for JDK7 and this 
also made things more complicated.


Having said all that (from memory), for iOS, there was some work that 
overlayed an iOS text control in order to use the native keyboard 
control.  The control was created when editing started and then disposed 
when editing ended.  This would obviously have the same 
lightweight/heavyweight issues while editing was happening and a host of 
other smaller problems (wrong font, jumping, scrolling etc).


One possible way for this to really work would be to get the native 
control to render to a texture and get JavaFX to draw the texture. That 
is just the painting side of the equation.  Events would need to be 
delivered to this non-painting control as well.  There are operating 
system calls on Mac that you can use to paint a control to an image so 
it is in theory doable but a ton of work.


Steve

On 2014-10-31, 9:48 AM, Mike Hearn wrote:

JavaFX provides a great set of widgets that are pretty complete, but a few
lag behind behind their native counterparts on some platforms. This is
especially noticeable with the Mac text field widget, which has things like
integrated spelling/grammar checking, auto correct, services, speech
recognition and so on.

WebKit manages to expose all this functionality despite that HTML is not
the native Mac UI framework. So I am wondering how hard it is for JFX to do
the same. However, I know very little about how WebKit does this or how
easy it'd be to replicate in the Java world. Are there any experts on the
list who could comment?




8u40 review request: RT-34467 huge memory consumption resizing transparent window

2014-10-31 Thread Jim Graham

webrev: http://cr.openjdk.java.net/~flar/RT-34467/webrev.00/
Jira: https://javafx-jira.kenai.com/browse/RT-34467

This builds on the recent fixes for RT-38923 by adding a mechanism to reuse old 
buffers when they are large enough.

Both test cases in RT-34467 now seem to be fairly well behaved (with both 
default and 1000m heap parameters)...

...jim


8u40 post-commit review: RT-39209 deleted dead code associated with obsolete FullCubic shaders

2014-10-31 Thread Jim Graham

webrev: http://cr.openjdk.java.net/~flar/RT-39209/webrev.00/
Jira: https://javafx-jira.kenai.com/browse/RT-39209

The artifacts directory on Windows was approximately 44k smaller (out of 30m) 
after the code/shaders were removed...

...jim