Monocle with VNC for Jenkins [was: Re: openjfx/8u-dev/rt: RT-35441 [Monocle] Provide a VNC back-end]

2014-01-21 Thread Tom Eugelink


What also is very interesting is headless testing. Let me see if I'm getting 
this.

Normally Jenkins would start a VNC server (xvnc), which provides some kind of 
graphics API against which an UI program can paint. JavaFX is not picking that 
up however.
But, as I read it, in this case JavaFX starts its own VNC server, so it takes 
of everything itself. All one would need to do is specify the

-Dglass.platform=Monocle -Dmonocle.platform=VNC -Dprism.order=sw

And additionally a port to run the VNC server on (so multiple Jenkins jobs 
don't interfere).

Am I correct? How can I test this (aka in which version is the VNC server 
available)?

Tom




8u20 review request: RT-33294 - Canvas PixelWriter slow to fill canvas pixel by pixel

2014-01-21 Thread Jim Graham

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

Tested using the submitted test case and then also using all of the 
Canvas toys in rt-closed...


...jim


FX 8u20 review request: RT-25249 ImageInput does not update for changes to WritableImage

2014-01-21 Thread Jim Graham

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

The code was taken as a boilerplate from the ImageView code...

...jim


hg: openjfx/8u-dev/rt: RT-34926: [ColorPicker] Selection draws badly when arrow keys are used to traverse

2014-01-21 Thread hang . vo
Changeset: a804fa529ce6
Author:jgiles
Date:  2014-01-22 14:35 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/a804fa529ce6

RT-34926: [ColorPicker] Selection draws badly when arrow keys are used to 
traverse
RT-34911: [ColorPicker] When hovering over color picker options, blue highlight 
border is not drawn on right and bottom of color rect
Summary: I've rewritten how the hovered colour is rendered, so that rather than 
simply scaling the rectangle (as was done in Modena), there is now a separate 
node that is placed in the correct location atop all other nodes. The general 
issue was that the scaling of the hovered node did not bring the node to the 
the front, so other colours in the palette were still drawing on top of the 
node.

! apps/toys/Hello/src/main/java/hello/HelloColorPicker.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPalette.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java
! 
modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/caspian/caspian.css
! 
modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css
! 
modules/controls/src/test/java/com/sun/javafx/scene/control/skin/ColorPickerPaletteRetriever.java



hg: openjfx/8u-dev/rt: 3 new changesets

2014-01-21 Thread hang . vo
Changeset: cf90e9eb59f0
Author:jgiles
Date:  2014-01-22 11:02 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/cf90e9eb59f0

RT-35267: [TableView] TableView Column Table header arrow not consistent when 
hiding columns (redraw over each other)

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableColumnHeader.java

Changeset: e46275203449
Author:jgiles
Date:  2014-01-22 11:15 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/e46275203449

RT-35224: [TableView] NestedTableColumnHeader crashes in dispose() during layout

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java
! modules/controls/src/test/java/javafx/scene/control/TableViewTest.java

Changeset: ed47253a8c3b
Author:jgiles
Date:  2014-01-22 11:29 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/ed47253a8c3b

RT-35067: ScrollPane bottom right corner has a one pixel edge of background 
color when both scrollbars are visible (when inside a TabPane)

! 
modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css



RE: Monocle with VNC [was: Re: openjfx/8u-dev/rt: RT-35441 [Monocle] Provide a VNC back-end]

2014-01-21 Thread John Smith
Monocle is a very interesting and exciting development for the JavaFX team.

I think that it is an avenue of approach which may help enable the development 
of various innovative solutions, both in providing access to JavaFX 
applications through traditional web UIs or providing remote GUI access to 
myriad small devices which make up the Internet of Things.


Ø  Since WebSockets are part of Java EE I don't think this is something that 
could be part of the standard JavaFX build

Yes, I agree.  There are some excellent existing WebSocket solutions for Java, 
such as Tyrus https://tyrus.java.net/ and Kaazing.  Though the WebSocket 
protocol is simple to users, there are many tricky pitfalls in creating a 
robust WebSocket server, so using those complete and well-tested solutions is 
the best route.  As the client app would actually be installed on the server 
much like a normal JEE app, using a standard JEE lib is perfectly appropriate I 
think.  The tricky part (at least for me) would be to take the VNC (or OpenGL) 
commands and tunnel them through a WebSocket system.

Anyway, something to think about in my spare time.

Thanks a lot for the replies and posting to the list Daniel.

John

From: Daniel Blaukopf [mailto:daniel.blauk...@oracle.com]
Sent: Tuesday, January 21, 2014 2:45 PM
To: John Smith; openjfx-dev@openjdk.java.net
Subject: Re: Monocle with VNC [was: Re: openjfx/8u-dev/rt: RT-35441 [Monocle] 
Provide a VNC back-end]

Hi John,
On 01/22/2014 12:24 AM, John Smith wrote:
Would it be possible to develop a web based VNC client rendering to HTML canvas 
that connects to the Monocle VNC server over WebSockets such as that discussed 
in Kanaka’s answer here: http://stackoverflow.com/a/3902817/1155209?

I’m just interested in the feasibility of the approach as a basis for future 
development of a potential 3rd party JavaFX app deployment solution outside of 
JavaFX core.
I understand that this is probably not the primary reason the Monocle VNC work 
was implemented, but I’m curious if it could be repurposed for this mechanism.
Essentially, my goal here is to enable AppStreaming JavaFX 
http://aws.amazon.com/appstream/ without requiring a proprietary amazon 
solution.

In your opinion, would such a solution be a feasible basis for developing a 
distribution mechanism for JavaFX applications which does not require anything 
on the client outside of an HTML5 compliant browser?

It would absolutely be feasible, although the lag would probably be annoying. 
Since WebSockets are part of Java EE I don't think this is something that could 
be part of the standard JavaFX build, but Monocle allows for pluggable screen 
implementations and it shouldn't be much work to modify VNCScreen.java to do 
this. Alternatively we could put just enough of an implementation of WebSockets 
in VNCScreen to be able to talk to the browser directly. From 
http://www.websocket.org/aboutwebsocket.html the protocol doesn't look 
complicated. Unless you need a secure authenticated connection of course, in 
which case the answer would have to be Java EE.

However, what would be 100x better in terms of perfomance would be to stream 
the OpenGL commands to a WebGL client. We'd still have the lag though. We did 
an experiment for a few days last month in the JavaFX team with marshalling up 
OpenGL calls into a stream and sending them down the wire to a client doing the 
rendering on another device, and the performance looked promising. A bit like 
http://sourceforge.net/projects/virtualgl/, but without the video stream.

Thanks,
Daniel


Thanks,
John

From: Daniel Blaukopf [mailto:daniel.blauk...@oracle.com]
Sent: Tuesday, January 21, 2014 12:53 PM
To: John Smith; 
openjfx-dev@openjdk.java.net
Subject: Monocle with VNC [was: Re: openjfx/8u-dev/rt: RT-35441 [Monocle] 
Provide a VNC back-end]

Hi John,

This is a mostly complete implementation of Glass that instead of rendering to 
the screen, renders to an offscreen buffer and serves the buffer up to clients 
using the RFB protocol. So you should be able to connect to it with most VNC 
clients, although I haven't been able to get it to work with desktop sharing on 
the Mac. You can also provide mouse input to JavaFX using the VNC client.

To use (BTW, this is noted in the JIRA 
https://javafx-jira.kenai.com/browse/RT-35441):

Run with: -Dglass.platform=Monocle -Dmonocle.platform=VNC -Dprism.order=sw

Connect with a VNC client to port 5901. I used TigerVNC 
(http://sourceforge.net/projects/tigervnc/files/) since the OS X desktop 
sharing client didn't like the 15-year old version of the RFB protocol that 
VNCScreen.java implements.

As noted in the JIRA, I think it would make sense to do what Dave Hill 
previously did in Lens and make the VNC server an option in all embedded 
back-ends instead of requiring the user to make a choice between having a local 
display or a remote display. So there would be Linux framebuffer with a VNC 
server option, EGL frameb

Re: Monocle with VNC [was: Re: openjfx/8u-dev/rt: RT-35441 [Monocle] Provide a VNC back-end]

2014-01-21 Thread Daniel Blaukopf


Monocle with VNC [was: Re: openjfx/8u-dev/rt: RT-35441 [Monocle] Provide a VNC back-end]

2014-01-21 Thread Daniel Blaukopf


hg: openjfx/8u-dev/rt: 4 new changesets

2014-01-21 Thread hang . vo
Changeset: f419b4666022
Author:jgiles
Date:  2014-01-21 13:54 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/f419b4666022

RT-35422: Caspian-styled ColorPicker has many graphical glitches related to 
stylesheet

! 
modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/caspian/caspian.css

Changeset: 055abd03128c
Author:jgiles
Date:  2014-01-21 13:55 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/055abd03128c

RT-31310: [Menu] empty space, when scrolled via mouse wheel.

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ContextMenuContent.java

Changeset: e1948d8d8e97
Author:jgiles
Date:  2014-01-21 15:41 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/e1948d8d8e97

RT-14480: Mouse Wheel events should pass though controls

! apps/toys/Hello/src/main/java/hello/HelloScrollPane.java
! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java

Changeset: 8cc418ec16a0
Author:jgiles
Date:  2014-01-21 16:01 +1300
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/8cc418ec16a0

RT-35424: TabPane tabs are jumping incorrectly when selected

! 
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java



RE: openjfx/8u-dev/rt: RT-35441 [Monocle] Provide a VNC back-end

2014-01-21 Thread John Smith
What does the VNC backend for Monocle do and how can it be used?

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net 
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of hang...@oracle.com
Sent: Tuesday, January 21, 2014 5:48 AM
To: openjfx-dev@openjdk.java.net
Subject: hg: openjfx/8u-dev/rt: RT-35441 [Monocle] Provide a VNC back-end

Changeset: ebf7575491e0
Author:Daniel Blaukopf 
Date:  2014-01-21 15:43 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/ebf7575491e0

RT-35441 [Monocle] Provide a VNC back-end

! modules/graphics/src/main/java/com/sun/glass/ui/monocle/Framebuffer.java
! 
modules/graphics/src/main/java/com/sun/glass/ui/monocle/MonocleApplication.java
! 
modules/graphics/src/main/java/com/sun/glass/ui/monocle/headless/HeadlessScreen.java
+ modules/graphics/src/main/java/com/sun/glass/ui/monocle/vnc/VNCPlatfor
+ m.java 
+ modules/graphics/src/main/java/com/sun/glass/ui/monocle/vnc/VNCPlatfor
+ mFactory.java 
+ modules/graphics/src/main/java/com/sun/glass/ui/monocle/vnc/VNCScreen.
+ java



hg: openjfx/8u-dev/rt: RT-33752: D3DGraphics.cc typo cleanup

2014-01-21 Thread hang . vo
Changeset: 1428564df8ed
Author:vadim
Date:  2014-01-21 21:38 +0400
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/1428564df8ed

RT-33752: D3DGraphics.cc typo cleanup

! modules/graphics/src/main/native-prism-d3d/D3DGraphics.cc



request for review: RT-35243 [Monocle]

2014-01-21 Thread Lisa Selle
Please review the following interim fix for RT-35243 [Monocle] Prism 
should use Monocle's platform detection code.


Webrev here:

http://cr.openjdk.java.net/~kselle/webrev-20140121-1206-RT-35243/webrev/

In a nutshell, this adds a new (monocle) port to prism-es2.  It is not 
selected by default.  There are some trivial changes to ES2Pipeline and 
GLFactory to enable command-line selection of the new port.  It isn't 
functional yet but should be soon.  When completed, most of the 
prism-es2 functionality should be moved out of native files into java.


Thanks,

Lisa


8u20 review request: RT-35443 Provide a headless glass implementation integrated with our JUnit tests

2014-01-21 Thread Daniel Blaukopf
Hi Steve and Anthony,

Would you review the following change to our build/test scripts to allow 
running JUnit tests in headless Monocle on desktop platforms?

https://javafx-jira.kenai.com/browse/RT-35443
http://cr.openjdk.java.net/~dblaukop/webrev-20140121-1743-RT-35443/webrev/

Currently all tests run with this patch pass.

Thanks,
Daniel



Re: Go Gerrit

2014-01-21 Thread Jim Weaver
Indeed, the force is strong with this one :-)

Regards,
Jim

> On Jan 21, 2014, at 7:13 AM, Mark Heckler  wrote:
> 
> Really enjoying keeping an eye on his developments in this area; side-by-side 
> comparisons are time-consuming & difficult to assemble. Go Gerrit indeed! :D
> 
> Mark
> 
>> On Jan 21, 2014, at 8:43, Tom Eugelink  wrote:
>> 
>> 
>> Just to update the people who are not keeping taps on what Gerrit Grunwald 
>> is doing, but he has his JavaFX application running on a Mac, Nexus 7, iPad, 
>> iPhone and this afternoon on an Android SmartWatch.
>> 
>> Here is the watch version
>> http://www.youtube.com/watch?v=XpplIIIKZ2s
>> 
>> Of course the different screen sizes require different layouts, but the code 
>> is shared between the devices as much as possible, so basically it's the 
>> same code base.
>> 
>> #GoGerrit
>> 
>> 


Re: Go Gerrit

2014-01-21 Thread Mark Heckler
Really enjoying keeping an eye on his developments in this area; side-by-side 
comparisons are time-consuming & difficult to assemble. Go Gerrit indeed! :D

Mark

> On Jan 21, 2014, at 8:43, Tom Eugelink  wrote:
> 
> 
> Just to update the people who are not keeping taps on what Gerrit Grunwald is 
> doing, but he has his JavaFX application running on a Mac, Nexus 7, iPad, 
> iPhone and this afternoon on an Android SmartWatch.
> 
> Here is the watch version
> http://www.youtube.com/watch?v=XpplIIIKZ2s
> 
> Of course the different screen sizes require different layouts, but the code 
> is shared between the devices as much as possible, so basically it's the same 
> code base.
> 
> #GoGerrit
> 
> 


Go Gerrit

2014-01-21 Thread Tom Eugelink


Just to update the people who are not keeping taps on what Gerrit Grunwald is 
doing, but he has his JavaFX application running on a Mac, Nexus 7, iPad, 
iPhone and this afternoon on an Android SmartWatch.

Here is the watch version
http://www.youtube.com/watch?v=XpplIIIKZ2s

Of course the different screen sizes require different layouts, but the code is 
shared between the devices as much as possible, so basically it's the same code 
base.

#GoGerrit




RE: FXML, Presentation Model & bi-directional binding

2014-01-21 Thread Will Hoover
Another programmatic option would be to use the BeanPathAdapter from 
http://jfxtras.org/ 
It has bi-directional binding.

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net 
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Philipp Dörfler
Sent: Tuesday, January 21, 2014 7:15 AM
To: Martin Sladecek
Cc: openjfx-dev@openjdk.java.net
Subject: Re: FXML, Presentation Model & bi-directional binding

The only thing you have to do is to write a controller and put 
myTextBox.textProperty().bindBidirectional(dataModel.textProperty()); into the 
initialize method. It's way less convenient than it could and should be but at 
least that gets you bidirectional binding. For a working example featuring a 
calculator that can add 4 bits done with bidirectional binding properties only 
(+ some FXML) please have a look at 
https://bitbucket.org/phdoerfler/talks/src/09f00ea55cbddc2acca94c240593f9071169706c/JavaFX%20-%20Lessons%20Learned/src/main/java/demo/calc/?at=defaultwhere
you can find both the code and the talk (in the downloads tab) of a talk of 
mine where I compared FX to the presentation model of WPF. The slides might be 
worth looking at because they summarize my findings in surprising FXML binding 
syntax that are scattered in this mailing list somewhere.

Hope this helps!
Am 20.01.2014 21:55 schrieb "Martin Sladecek" :

> Related JIRA issue: https://javafx-jira.kenai.com/browse/RT-17646
>
> Uni-directional binding is possible using ${path.to.property} syntax 
> (see http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/
> introduction_to_fxml.html#expression_binding)
>
> -Martin
>
> On 01/20/2014 08:42 PM, Richard Bair wrote:
>
>> Sadly, still not possible :-(. Though I still think it's a great way 
>> to go!
>>
>>  On Jan 20, 2014, at 7:45 PM, Christian Schudt 
>> 
>>> wrote:
>>>
>>> Hi together,
>>>
>>> I just (re-)read Richard's excellent article 
>>> http://fxexperience.com/2011/10/fxml-why-it-rocks-and-the-next-phase
>>> /
>>>
>>> He talks about "the next phase" in FXML being the Presentation Model 
>>> and the use of bidirectional binding in FXML.
>>>
>>> I really like to make use of it because I think it's "the way to go" 
>>> and better than MVC pattern. (I've worked with PM pattern in 
>>> Flex/MXML and it was really comfortable.)
>>>
>>> Now this article is 2.5 years old and I wonder, what's the current 
>>> state of "the next phase", i.e. bi-directional binding in FXML or at 
>>> least uni-directional binding.
>>>
>>> I just tried the proposed syntax out and it doesn't work with Java 
>>> 8, so I assume it's still not possible!?
>>>
>>> Thanks for answer,
>>> Best regard,
>>>
>>> Christian
>>>
>>>
>>>
>



hg: openjfx/8u-dev/rt: RT-35441 [Monocle] Provide a VNC back-end

2014-01-21 Thread hang . vo
Changeset: ebf7575491e0
Author:Daniel Blaukopf 
Date:  2014-01-21 15:43 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/ebf7575491e0

RT-35441 [Monocle] Provide a VNC back-end

! modules/graphics/src/main/java/com/sun/glass/ui/monocle/Framebuffer.java
! 
modules/graphics/src/main/java/com/sun/glass/ui/monocle/MonocleApplication.java
! 
modules/graphics/src/main/java/com/sun/glass/ui/monocle/headless/HeadlessScreen.java
+ modules/graphics/src/main/java/com/sun/glass/ui/monocle/vnc/VNCPlatform.java
+ 
modules/graphics/src/main/java/com/sun/glass/ui/monocle/vnc/VNCPlatformFactory.java
+ modules/graphics/src/main/java/com/sun/glass/ui/monocle/vnc/VNCScreen.java



Re: FXML, Presentation Model & bi-directional binding

2014-01-21 Thread Philipp Dörfler
The only thing you have to do is to write a controller and put
myTextBox.textProperty().bindBidirectional(dataModel.textProperty()); into
the initialize method. It's way less convenient than it could and should be
but at least that gets you bidirectional binding. For a working example
featuring a calculator that can add 4 bits done with bidirectional binding
properties only (+ some FXML) please have a look at
https://bitbucket.org/phdoerfler/talks/src/09f00ea55cbddc2acca94c240593f9071169706c/JavaFX%20-%20Lessons%20Learned/src/main/java/demo/calc/?at=defaultwhere
you can find both the code and the talk (in the downloads tab) of a
talk of mine where I compared FX to the presentation model of WPF. The
slides might be worth looking at because they summarize my findings in
surprising FXML binding syntax that are scattered in this mailing list
somewhere.

Hope this helps!
Am 20.01.2014 21:55 schrieb "Martin Sladecek" :

> Related JIRA issue: https://javafx-jira.kenai.com/browse/RT-17646
>
> Uni-directional binding is possible using ${path.to.property} syntax (see
> http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/
> introduction_to_fxml.html#expression_binding)
>
> -Martin
>
> On 01/20/2014 08:42 PM, Richard Bair wrote:
>
>> Sadly, still not possible :-(. Though I still think it's a great way to
>> go!
>>
>>  On Jan 20, 2014, at 7:45 PM, Christian Schudt 
>>> wrote:
>>>
>>> Hi together,
>>>
>>> I just (re-)read Richard's excellent article
>>> http://fxexperience.com/2011/10/fxml-why-it-rocks-and-the-next-phase/
>>>
>>> He talks about "the next phase" in FXML being the Presentation Model and
>>> the use of bidirectional binding in FXML.
>>>
>>> I really like to make use of it because I think it's "the way to go" and
>>> better than MVC pattern. (I've worked with PM pattern in Flex/MXML and it
>>> was really comfortable.)
>>>
>>> Now this article is 2.5 years old and I wonder, what's the current state
>>> of "the next phase", i.e. bi-directional binding in FXML or at least
>>> uni-directional binding.
>>>
>>> I just tried the proposed syntax out and it doesn't work with Java 8, so
>>> I assume it's still not possible!?
>>>
>>> Thanks for answer,
>>> Best regard,
>>>
>>> Christian
>>>
>>>
>>>
>


Re: custom FXML builders in SceneBuilder

2014-01-21 Thread Eric Le Ponner
Hi Tom,

Sorry, I was a bit optimistic and found no time to look at it.
I'll give a try this week.

Eric


Le 21 janv. 2014 à 11:00, Tom Eugelink  a écrit :

> 
> Hi Eric,
> 
> Any chance you had time to look into this?
> 
> Tom
> 
> 
> 
> On 2014-1-3 12:19, Eric Le Ponner wrote:
>> I will look at that and come back to you middle of next week.
>> 
>> Eric
>> 
>> Le 3 janv. 2014 à 12:12, Tom Eugelink  a écrit :
>> 
>>> I think there are two usages of builders:
>>> - construct compontents / controls programatically (ending in the build() 
>>> call).
>>> - mapping of FXML attributes to node properties, because in FXML everything 
>>> must be a string.
>>> 
>>> For example, CalendarTextField has no builder class in the first sense (I 
>>> used withers for that), but does have a class that converts the dateFormats 
>>> (list of SimpleDateFormat strings) in an fxml file to an actual list of 
>>> DateFormats instances.
>>> 
>>> https://github.com/JFXtras/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/fxml/CalendarTextFieldBuilder.java
>>> 
>>> If you can explain to me how to do this without a builder, but also without 
>>> polluting CalendarTextField with FXML aspects, then I'll change the code.
>>> 
>>> Tom
>>> 
>>> 
>>> 
>>> On 2014-1-3 11:44, Eric Le Ponner wrote:
 When Scene Builder 2.0 found a custom components, it instantiates it using 
 FXMLLoader
 without making any specific builder setup. So FXMLLoader uses the default 
 JavaFX
 builder factory.
 
 Since builders are deprecated, I'm not sure it make sense for SB to have 
 dependency on them.
 
 Eric
 
 
 Le 3 janv. 2014 à 10:55, Tom Eugelink  a écrit :
 
> I had no problems adding the JFXtras components to SceneBuilder, but one 
> of the controls has a custom FXML builder. It is present in the same jar, 
> but how do I tell SceneBuilder to use it? Now when I try to load an fxml 
> file an exception ("unable to coerse") is shown by SceneBuilder.
> 
> Tom
> 
> 
>>> 
> 
> 



Re: custom FXML builders in SceneBuilder

2014-01-21 Thread Tom Eugelink


Hi Eric,

Any chance you had time to look into this?

Tom



On 2014-1-3 12:19, Eric Le Ponner wrote:

I will look at that and come back to you middle of next week.

Eric

Le 3 janv. 2014 à 12:12, Tom Eugelink  a écrit :


I think there are two usages of builders:
- construct compontents / controls programatically (ending in the build() call).
- mapping of FXML attributes to node properties, because in FXML everything 
must be a string.

For example, CalendarTextField has no builder class in the first sense (I used 
withers for that), but does have a class that converts the dateFormats (list of 
SimpleDateFormat strings) in an fxml file to an actual list of DateFormats 
instances.

https://github.com/JFXtras/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/fxml/CalendarTextFieldBuilder.java

If you can explain to me how to do this without a builder, but also without 
polluting CalendarTextField with FXML aspects, then I'll change the code.

Tom



On 2014-1-3 11:44, Eric Le Ponner wrote:

When Scene Builder 2.0 found a custom components, it instantiates it using 
FXMLLoader
without making any specific builder setup. So FXMLLoader uses the default JavaFX
builder factory.

Since builders are deprecated, I'm not sure it make sense for SB to have 
dependency on them.

Eric


Le 3 janv. 2014 à 10:55, Tom Eugelink  a écrit :


I had no problems adding the JFXtras components to SceneBuilder, but one of the controls 
has a custom FXML builder. It is present in the same jar, but how do I tell SceneBuilder 
to use it? Now when I try to load an fxml file an exception ("unable to 
coerse") is shown by SceneBuilder.

Tom