From tbee at tbee.org Sun Feb 1 12:49:07 2015 From: tbee at tbee.org (Tom Eugelink) Date: Sun, 01 Feb 2015 13:49:07 +0100 Subject: custom controls: printing In-Reply-To: <54C9E38E.3030405@tbee.org> References: <54C8288F.1070101@tbee.org> <54C83ECD.3040603@oracle.com> <54C88022.5050304@tbee.org> <54C9BCAE.9000604@oracle.com> <54C9D1F1.5070203@tbee.org> <54C9DABA.3030901@oracle.com> <54C9E38E.3030405@tbee.org> Message-ID: <54CE20C3.4080208@tbee.org> So, stuff is getting printed, but it is way too large. Is there any manual on how to implement printing? Tom From elina.kleyman at oracle.com Sun Feb 1 14:16:23 2015 From: elina.kleyman at oracle.com (Elina Kleyman) Date: Sun, 1 Feb 2015 06:16:23 -0800 (PST) Subject: [8u60] review request: RT-39886 - Remove deprecated builders from more toys and other apps Message-ID: <4336e9cf-f738-417c-a8e3-f1e40a57926b@default> Hi Kevin, Please review fix for https://javafx-jira.kenai.com/browse/RT-39886 Link to webrev: http://cr.openjdk.java.net/~ekleyman/RT-39886/ Thanks, Elina From kevin.rushforth at oracle.com Mon Feb 2 21:01:37 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 02 Feb 2015 13:01:37 -0800 Subject: 8u-dev unlocked following this week's sanity testing Message-ID: <54CFE5B1.4030500@oracle.com> From adanecito at yahoo.com Mon Feb 2 21:07:21 2015 From: adanecito at yahoo.com (Tony Anecito) Date: Mon, 2 Feb 2015 21:07:21 +0000 (UTC) Subject: Error creating bundle for MacOSX using u40 b23 Message-ID: <273808955.693481.1422911241223.JavaMail.yahoo@mail.yahoo.com> Hi All,?I tried using u40 b23 to create my macosx pkg file. I am getting the error:execution error:?Finder got an error: Can't set toolbar to visible of container window of disk "app title" to false. (-10006)?Then slightly later during the build got the BUILD FAILED.?This worked fine for u20 when I last tried it.?Thanks for any hints.-Tony From adanecito at yahoo.com Mon Feb 2 22:30:42 2015 From: adanecito at yahoo.com (Tony Anecito) Date: Mon, 2 Feb 2015 22:30:42 +0000 (UTC) Subject: Error creating bundle for MacOSX using u40 b23 In-Reply-To: <273808955.693481.1422911241223.JavaMail.yahoo@mail.yahoo.com> References: <273808955.693481.1422911241223.JavaMail.yahoo@mail.yahoo.com> Message-ID: <422348399.705457.1422916242520.JavaMail.yahoo@mail.yahoo.com> Hi All,Ok. It seems to be working now for some reason. Now I have yet another new issue. Seems?when I submit via application loader 3.0 I get a error about the code object not being signed at all and to make sure I used a distribution certificate. When I used to do this manually not?using deployfx supplied with jdk I had to sign the pkg with a ceritificate and never had this issue. Is this a new issue with u40 b23?Any ideas how to fix this??Thanks,-Tony? On Monday, February 2, 2015 2:07 PM, Tony Anecito wrote: Hi All,?I tried using u40 b23 to create my macosx pkg file. I am getting the error:execution error:?Finder got an error: Can't set toolbar to visible of container window of disk "app title" to false. (-10006)?Then slightly later during the build got the BUILD FAILED.?This worked fine for u20 when I last tried it.?Thanks for any hints.-Tony From adanecito at yahoo.com Mon Feb 2 23:25:52 2015 From: adanecito at yahoo.com (Tony Anecito) Date: Mon, 2 Feb 2015 23:25:52 +0000 (UTC) Subject: Error creating bundle for MacOSX using u40 b23 In-Reply-To: <422348399.705457.1422916242520.JavaMail.yahoo@mail.yahoo.com> References: <273808955.693481.1422911241223.JavaMail.yahoo@mail.yahoo.com> <422348399.705457.1422916242520.JavaMail.yahoo@mail.yahoo.com> Message-ID: <919654825.734313.1422919552882.JavaMail.yahoo@mail.yahoo.com> Hi All,I looked over the text when the deploxfx is run and all I see is the installer certificate being used and never the developer release certificate. the .app never gets signed with anything except?with something called Mach-0 thin (x86-64).?Regards,-Tony? On Monday, February 2, 2015 3:30 PM, Tony Anecito wrote: Hi All,Ok. It seems to be working now for some reason. Now I have yet another new issue. Seems?when I submit via application loader 3.0 I get a error about the code object not being signed at all and to make sure I used a distribution certificate. When I used to do this manually not?using deployfx supplied with jdk I had to sign the pkg with a ceritificate and never had this issue. Is this a new issue with u40 b23?Any ideas how to fix this??Thanks,-Tony? On Monday, February 2, 2015 2:07 PM, Tony Anecito wrote: Hi All,?I tried using u40 b23 to create my macosx pkg file. I am getting the error:execution error:?Finder got an error: Can't set toolbar to visible of container window of disk "app title" to false. (-10006)?Then slightly later during the build got the BUILD FAILED.?This worked fine for u20 when I last tried it.?Thanks for any hints.-Tony From danno.ferrin at oracle.com Tue Feb 3 01:58:30 2015 From: danno.ferrin at oracle.com (Danno Ferrin) Date: Mon, 2 Feb 2015 18:58:30 -0700 Subject: Error creating bundle for MacOSX using u40 b23 In-Reply-To: <919654825.734313.1422919552882.JavaMail.yahoo@mail.yahoo.com> References: <273808955.693481.1422911241223.JavaMail.yahoo@mail.yahoo.com> <422348399.705457.1422916242520.JavaMail.yahoo@mail.yahoo.com> <919654825.734313.1422919552882.JavaMail.yahoo@mail.yahoo.com> Message-ID: <358A31BD-F2FF-4BA2-A06B-F448DE0D8592@oracle.com> Sorry for the late response. Comcast decided monday at 2pm was the correct time to upgrade some cable hardware for the whole neighborhood. Because comcast cares. My guess is it's failing to find a key for one reason or another. Perhaps the keys aren't unlocked, or they are named slightly differently than the defaults, or there are multiples with the same prefix. Running the bundler in verbose mode should tell you. There are bundler arguments to fine tune the key selection. The Mac PKG bundler looks for a key starting with "Developer ID Installer: " by default, and fails if it finds more than one. You can refine the search by setting "mac.signing-key-user-name" to whatever comes after the prefix if there are multiple hits, or set the entire pkg sigining key by setting "mac.signing-key-developer-id-installer". For the .app bundler the same thing exists except the prefix is "Developer ID Application: " and the whole key name is set via "mac.signing-key-developer-id-app" The user name via the user name key is the same as before, and it applies to all mac keys. For the Mac App Store bundler the prefixes it looks for are "3rd Party Mac Developer Application: " and "3rd Party Mac Developer Installer: " for the app and the .pkg fiiles respectively, and the whole key names can be set with "mac.signing-key-app" and "mac.signing-key-pkg" respectively. Hopefully that helps. On Feb 2, 2015, at 4:25 PM, Tony Anecito wrote: > Hi All,I looked over the text when the deploxfx is run and all I see is the installer certificate being used and never the developer release certificate. the .app never gets signed with anything except with something called Mach-0 thin (x86-64). Regards,-Tony > > On Monday, February 2, 2015 3:30 PM, Tony Anecito wrote: > > > Hi All,Ok. It seems to be working now for some reason. Now I have yet another new issue. Seems when I submit via application loader 3.0 I get a error about the code object not being signed at all and to make sure I used a distribution certificate. When I used to do this manually not using deployfx supplied with jdk I had to sign the pkg with a ceritificate and never had this issue. Is this a new issue with u40 b23?Any ideas how to fix this? Thanks,-Tony > > On Monday, February 2, 2015 2:07 PM, Tony Anecito wrote: > > > > Hi All, I tried using u40 b23 to create my macosx pkg file. I am getting the error:execution error: Finder got an error: Can't set toolbar to visible of container window of disk "app title" to false. (-10006) Then slightly later during the build got the BUILD FAILED. This worked fine for u20 when I last tried it. Thanks for any hints.-Tony > > > > From adanecito at yahoo.com Tue Feb 3 08:16:42 2015 From: adanecito at yahoo.com (Tony Anecito) Date: Tue, 3 Feb 2015 08:16:42 +0000 (UTC) Subject: Error creating bundle for MacOSX using u40 b23 In-Reply-To: <358A31BD-F2FF-4BA2-A06B-F448DE0D8592@oracle.com> References: <358A31BD-F2FF-4BA2-A06B-F448DE0D8592@oracle.com> Message-ID: <1381955701.836674.1422951402252.JavaMail.yahoo@mail.yahoo.com> Thanks Danno,?I?used?1.8.0_31 and did not have the problem. Now I have a new one?after I submit the application?and telling me the app was not created under the minimum OS X version so I?downloaded the latest version and downloaded the latest xcode to see if that helps at all.?Looks like it did not help.?Hopefully my email to Apple Support will yield and answer.?Best Regards,-Tony? On Monday, February 2, 2015 6:58 PM, Danno Ferrin wrote: Sorry for the late response.? Comcast decided monday at 2pm was the correct time to upgrade some cable hardware for the whole neighborhood.? Because comcast cares. My guess is it's failing to find a key for one reason or another.? Perhaps the keys aren't unlocked, or they are named slightly differently than the defaults, or there are multiples with the same prefix.? Running the bundler in verbose mode should tell you. There are bundler arguments to fine tune the key selection. The Mac PKG bundler looks for a key starting with "Developer ID Installer: " by default, and fails if it finds more than one.? You can refine the search by setting "mac.signing-key-user-name" to whatever comes after the prefix if there are multiple hits, or set the entire pkg sigining key by setting "mac.signing-key-developer-id-installer". For the .app bundler the same thing exists except the prefix is "Developer ID Application: " and the whole key name is set via "mac.signing-key-developer-id-app"? The user name via the user name key is the same as before, and it applies to all mac keys. For the Mac App Store bundler the prefixes it looks for are "3rd Party Mac Developer Application: " and "3rd Party Mac Developer Installer: " for the app and the .pkg fiiles respectively, and the whole key names can be set with "mac.signing-key-app" and "mac.signing-key-pkg" respectively. Hopefully that helps. On Feb 2, 2015, at 4:25 PM, Tony Anecito wrote: > Hi All,I looked over the text when the deploxfx is run and all I see is the installer certificate being used and never the developer release certificate. the .app never gets signed with anything except with something called Mach-0 thin (x86-64). Regards,-Tony? > >? ? On Monday, February 2, 2015 3:30 PM, Tony Anecito wrote: > > > Hi All,Ok. It seems to be working now for some reason. Now I have yet another new issue. Seems when I submit via application loader 3.0 I get a error about the code object not being signed at all and to make sure I used a distribution certificate. When I used to do this manually not using deployfx supplied with jdk I had to sign the pkg with a ceritificate and never had this issue. Is this a new issue with u40 b23?Any ideas how to fix this? Thanks,-Tony? > >? ? On Monday, February 2, 2015 2:07 PM, Tony Anecito wrote: > > > > Hi All, I tried using u40 b23 to create my macosx pkg file. I am getting the error:execution error: Finder got an error: Can't set toolbar to visible of container window of disk "app title" to false. (-10006) Then slightly later during the build got the BUILD FAILED. This worked fine for u20 when I last tried it. Thanks for any hints.-Tony > > > > From kevin.rushforth at oracle.com Wed Feb 4 03:31:47 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Tue, 03 Feb 2015 19:31:47 -0800 Subject: [8u60] review request: RT-39977: Replace sun.security.util.SecurityConstants with java.lang.RuntimePermission Message-ID: <54D192A3.9040209@oracle.com> Jonathan, Mandy, Please review the following simple fix. https://javafx-jira.kenai.com/browse/RT-39977 http://cr.openjdk.java.net/~kcr/RT-39977/webrev.00/ Thanks. -- Kevin From adanecito at yahoo.com Wed Feb 4 06:58:37 2015 From: adanecito at yahoo.com (Tony Anecito) Date: Wed, 4 Feb 2015 06:58:37 +0000 (UTC) Subject: Error creating bundle for MacOSX using u40 b23 In-Reply-To: <1381955701.836674.1422951402252.JavaMail.yahoo@mail.yahoo.com> References: <358A31BD-F2FF-4BA2-A06B-F448DE0D8592@oracle.com> <1381955701.836674.1422951402252.JavaMail.yahoo@mail.yahoo.com> Message-ID: <2138040189.1216408.1423033117234.JavaMail.yahoo@mail.yahoo.com> Hi Danno,I revoked then renewed my mac distribution and development certificates and now when it gets to creating the pkg file for my app I get the following error message. Not sure what to do at this point. Any suggestions to get past this error appreciated. Thanks,-Tony ?Building Mac App Store Bundle for 3D Map Master? Using custom package resource [Bundle config file] (loaded from package/macosx/Info.plist on class path)? Using custom package resource [icon] (loaded from package/macosx/3D Map Master.icns on class path)? Config files are saved to /var/folders/6z/blxp38g11rj3cvcp22x__8y40000gn/T/fxbundler8941792911979020474/macosx. Use them to customize package.?? Using custom package resource [Mac App Store Entitlements]? (loaded from file /Users/tonyanecito/Documents/builds/myuniportal/3D Map Master.entitlements)? Using default package resource [Mac App Store Inherit Entitlements] (add package/macosx/3D Map Master_Inherit.entitlements to the class path to customize)3rd Party Mac Developer Application: : ambiguous (matches "3rd Party Mac Developer Application: Tony Anecito (HVZHK3KE9E)" and "3rd Party Mac Developer Application: Tony Anecito (HVZHK3KE9E)" in /Users/tonyanecito/Library/Keychains/login.keychain)App Store Ready Bundle failed : Exec failed with code 1 command [[codesign, -f, -s, 3rd Party Mac Developer Application: , --entitlements, /var/folders/6z/blxp38g11rj3cvcp22x__8y40000gn/T/fxbundler8941792911979020474/macosx/3D Map Master.entitlements, -vvvv, /var/folders/6z/blxp38g11rj3cvcp22x__8y40000gn/T/fxbundler8941792911979020474/images/mac.appStore.image/3D Map Master.app/Contents/Java/ardor3d-external-libs_V1.0.jar] in unspecified directory[fx:deploy] java.io.IOException: Exec failed with code 1 command [[codesign, -f, -s, 3rd Party Mac Developer Application: , --entitlements, /var/folders/6z/blxp38g11rj3cvcp22x__8y40000gn/T/fxbundler8941792911979020474/macosx/3D Map Master.entitlements, -vvvv, /var/folders/6z/blxp38g11rj3cvcp22x__8y40000gn/T/fxbundler8941792911979020474/images/mac.appStore.image/3D Map Master.app/Contents/Java/ardor3d-external-libs_V1.0.jar] in unspecified directory On Tuesday, February 3, 2015 1:16 AM, Tony Anecito wrote: Thanks Danno,?I?used?1.8.0_31 and did not have the problem. Now I have a new one?after I submit the application?and telling me the app was not created under the minimum OS X version so I?downloaded the latest version and downloaded the latest xcode to see if that helps at all.?Looks like it did not help.?Hopefully my email to Apple Support will yield and answer.?Best Regards,-Tony? On Monday, February 2, 2015 6:58 PM, Danno Ferrin wrote: Sorry for the late response.? Comcast decided monday at 2pm was the correct time to upgrade some cable hardware for the whole neighborhood.? Because comcast cares. My guess is it's failing to find a key for one reason or another.? Perhaps the keys aren't unlocked, or they are named slightly differently than the defaults, or there are multiples with the same prefix.? Running the bundler in verbose mode should tell you. There are bundler arguments to fine tune the key selection. The Mac PKG bundler looks for a key starting with "Developer ID Installer: " by default, and fails if it finds more than one.? You can refine the search by setting "mac.signing-key-user-name" to whatever comes after the prefix if there are multiple hits, or set the entire pkg sigining key by setting "mac.signing-key-developer-id-installer". For the .app bundler the same thing exists except the prefix is "Developer ID Application: " and the whole key name is set via "mac.signing-key-developer-id-app"? The user name via the user name key is the same as before, and it applies to all mac keys. For the Mac App Store bundler the prefixes it looks for are "3rd Party Mac Developer Application: " and "3rd Party Mac Developer Installer: " for the app and the .pkg fiiles respectively, and the whole key names can be set with "mac.signing-key-app" and "mac.signing-key-pkg" respectively. Hopefully that helps. On Feb 2, 2015, at 4:25 PM, Tony Anecito wrote: > Hi All,I looked over the text when the deploxfx is run and all I see is the installer certificate being used and never the developer release certificate. the .app never gets signed with anything except with something called Mach-0 thin (x86-64). Regards,-Tony? > >? ? On Monday, February 2, 2015 3:30 PM, Tony Anecito wrote: > > > Hi All,Ok. It seems to be working now for some reason. Now I have yet another new issue. Seems when I submit via application loader 3.0 I get a error about the code object not being signed at all and to make sure I used a distribution certificate. When I used to do this manually not using deployfx supplied with jdk I had to sign the pkg with a ceritificate and never had this issue. Is this a new issue with u40 b23?Any ideas how to fix this? Thanks,-Tony? > >? ? On Monday, February 2, 2015 2:07 PM, Tony Anecito wrote: > > > > Hi All, I tried using u40 b23 to create my macosx pkg file. I am getting the error:execution error: Finder got an error: Can't set toolbar to visible of container window of disk "app title" to false. (-10006) Then slightly later during the build got the BUILD FAILED. This worked fine for u20 when I last tried it. Thanks for any hints.-Tony > > > > From vadim.pakhnushev at oracle.com Wed Feb 4 14:35:49 2015 From: vadim.pakhnushev at oracle.com (Vadim Pakhnushev) Date: Wed, 04 Feb 2015 17:35:49 +0300 Subject: [8u60] Review request for RT-39710: FilteredList doesn't always handle update Changes from source list Message-ID: <54D22E45.6010009@oracle.com> Kevin, Please review the fix: https://javafx-jira.kenai.com/browse/RT-39710 http://cr.openjdk.java.net/~vadim/RT-39710/webrev.00/ Thanks, Vadim From vadim.pakhnushev at oracle.com Wed Feb 4 15:06:33 2015 From: vadim.pakhnushev at oracle.com (Vadim Pakhnushev) Date: Wed, 04 Feb 2015 18:06:33 +0300 Subject: [8u60] Review request for RT-39807: ObservableList.sorted() does nothing Message-ID: <54D23579.80000@oracle.com> Kevin, Please review the fix: https://javafx-jira.kenai.com/browse/RT-39807 http://cr.openjdk.java.net/~vadim/RT-39807/webrev.00/ Thanks, Vadim From tbee at tbee.org Wed Feb 4 21:13:15 2015 From: tbee at tbee.org (Tom Eugelink) Date: Wed, 04 Feb 2015 22:13:15 +0100 Subject: CSS under 1.8.0_40 not identical to 31 or older Message-ID: <54D28B6B.4010002@tbee.org> I've just now ran JFXtras Samples under the latest 1.8.0_40 and it does not render identical as when run under 1.8.0_31, some CSS rules are not applied. Samples is easily downloaded from here (http://jfxtras.org/resources/java/jfxtras-labs-samples-8.0-r4-SNAPSHOT-shadow.jar) and started simply with "java -jar". When run under 1.8.0_31 or older, the "LocalDateTimeTextfieldSample" shows a textfield with a popup button. When the button is pressed a popup is shown, with a gradient as the background and both an ok and cancel icon in the right top. The exact same jar under 1.8.0_40 does not show the gradient nor the two icons. LocalDateTimeTextfield under water uses CalendarTextField, so the code for this is in the calendar based control: https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/CalendarTextFieldSkin.java https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/resources/jfxtras/internal/scene/control/CalendarTextField.css Interesting are the lines starting at 351 in the skin, which do: Popup lPopup = new Popup(); ... BorderPane lBorderPane = new BorderPane(); lBorderPane.getStyleClass().add(this.getClass().getSimpleName() + "_popup"); // this amounts to "CalendarTextFieldSkin_popup " ... lPopup.getContent().add(lBorderPane); This no longer results in applying the background colors as defined in the css file on line 12. .CalendarTextFieldSkin_popup { -fx-background-color: -fx-shadow-highlight-color, -fx-outer-border, -fx-inner-border, -fx-body-color; -fx-background-insets: 0 0 -1 0,0,1,2; -fx-background-radius: 5,5,4,3; -fx-padding: 0.766667em 0.733333em 0.75em 0.733333em; -fx-text-fill: -fx-text-base-color; } Neither are the two in the css defined icons applied to the ImageViews. Is this intentional or a bug? Tom From msp at altlinux.ru Wed Feb 4 23:53:23 2015 From: msp at altlinux.ru (Michael Pozhidaev) Date: Thu, 05 Feb 2015 05:53:23 +0600 Subject: Execution environment for javafx.scene.web Message-ID: Hello everybody, I am working on the technology representing the information in form which adjusted to the perception of blind people. It is just as an addition to usual screen readers. For a long time there was a rather big problem, it is a web browsing. My environment is implemented in Java but I was unable to get any web browser features.Any web surfing activity was possible only if you are using a fully functional browser, like Firefox, Chrome, etc. >From time to time I looked for any browser implementations in Java but everything what I got never looked interesting. The picture totally changed when I found javafx.scene.web. At a glance it looks like exactly what I need! The key feature which looks nice to me is a splitting a visualization and a background engine. I need exactly the engine which manages DOM, can execute JavaScript, sends all notifications and events, but don't take care about graphical representation. The description for WebEngine class says that it suits completely. OK, but I would like to ensure that JavaFX itself suits as well. Meaning, may I use WebEngine class without creating _*graphical*_ application? In other words, what should the execution environment for WebEngine be? There are two questions I would like to understand: 1. Should I create a full graphical application in JavaFX traditions to be able to use WebEngine? My application uses a speech feedback as a main way to bring information to users. If it is required that I should have a complete graphical scene for using WebEngine it would be bad news for me. 2. Do I understand correctly that JavaFX applications are able to be launched just in Java Virtual Machine? Meaning, they do not need a complete web browser, right? I found that javafx.scene.web using webkit and it is OK. I am asking that the user shouldn't need opening a web browser window and run JavaFX application in it, yes? Help me please! If these questions would be OK I would be able to significantly improve my environment! Thank you in advance! :)) -- Michael Pozhidaev. Tomsk, Russia. Russian info page: http://www.marigostra.ru/ English info page: http://www.marigostra.com/ From chien.yang at oracle.com Thu Feb 5 01:38:38 2015 From: chien.yang at oracle.com (Chien Yang) Date: Wed, 04 Feb 2015 17:38:38 -0800 Subject: Code Review Request For RT-39921: With two or more application modal windows; windows deeper in the stack are receiving requestToFront when not enabled causes an NSBeep. Message-ID: <54D2C99E.3040503@oracle.com> Hi Kevin, Please review this straightforward fix: JIRA: https://javafx-jira.kenai.com/browse/RT-39921 webrev: http://cr.openjdk.java.net/~ckyang/RT-39921/webrev.00/ Thanks, - Chien From cnewland at chrisnewland.com Thu Feb 5 08:35:39 2015 From: cnewland at chrisnewland.com (Chris Newland) Date: Thu, 5 Feb 2015 08:35:39 -0000 Subject: Build farm for OpenJFX (on ARM) Message-ID: Hi Johan, all, Following the announcement that JDK builds for ARM will no longer include JavaFX I started talking with the OpenJDK Adoption group (https://wiki.openjdk.java.net/display/Adoption/Main) about the possibility of using their CloudBees CI system to produce OpenJFX binaries (for all operating systems including ARM) as a way to help keep JavaFX alive on IoT devices. For those who don't know the Adoption group, its mission is to help developers get started with building OpenJDK, testing new features, submitting bug reports, and cleaning up code. Adoption has a CloudBees CI set up and I've been talking with Mani Sarkar (@theneomatrix369) about setting up an OpenJFX CI project with cross-compile support that builds OpenJFX for all archs. The cross-compile instructions here https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float are working great for me locally so now we're trying to work out how to move that to the cloud. I don't want to tread on anyone's toes here and we're not trying to become any kind of official source for JavaFX, just trying to make sure there's an easy way (e.g. binaries) for end users to add JavaFX to their ARM JDKs and to help people dip their toes into OpenJFX development as per the Adoption group's mission. Happy to coordinate on how we can make this useful and avoid any duplication of effort :) Personally, I'm a big fan of JavaFX and use it as the UI layer in JITWatch (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and wearables and think JavaFX would be great on the new Raspberry Pi 2. Cheers, Chris @chriswhocodes From johan at lodgon.com Thu Feb 5 08:53:13 2015 From: johan at lodgon.com (Johan Vos) Date: Thu, 5 Feb 2015 09:53:13 +0100 Subject: Build farm for OpenJFX (on ARM) In-Reply-To: References: Message-ID: Hi Chris, That sounds great. I currently have a zip file for the ARM build at javafxports, in the bitbucket download section at https://bitbucket.org/javafxports/arm/downloads. This is built manually, and a Jenkins CI build would be much better for distribution. We currently do the same for the mobile builds (iOS and Android), but that is a little more complicated as they don't build out of the box from OpenJFX (yet), so we have a recent mirror of OpenJFX code with mobile-specific patches (that need to go back in OpenJFX) and another repository that contains non-JavaFX code that is required to run on mobile devices, along with build scripts to build the SDK's. If that could be hosted by CloudBees, it would be great. Do you already build the JDK for ARM itself using CloudBees CI? If so, can those be combined? Apart from that, building is one part, the sources is another part. It will be important to have OpenJFX as the ultimate source repository. I am to blame myself here, as not everything that is included in the mobile builds has been sent upstream to OpenJFX. The main reason for this is the quality. At this moment, the sorce code in the OpenJFX tree is of a very high quality, and I don't want to send experimental Android/iOS stuff before we really now it is working the way it should work. We might see the same on embedded. When Oracle was having resources doing this, I bet there were doing lots of internal tests that made sure only the good bits made it to OpenJFX. When the broader community steps in, we are sort of distributing this test-system. As a consequence, people need to have access to early or experimental builds, on the other hand you don't want to pollute the OpenJFX repository. This would work on e.g. bitbucket or github, by using branches etc, but unfortunately that is not possible with OpenJFX. Anyway, I believe having automated builds based on the code in the OpenJFX is definitely a good thing. - Johan 2015-02-05 9:35 GMT+01:00 Chris Newland : > Hi Johan, all, > > Following the announcement that JDK builds for ARM will no longer include > JavaFX I started talking with the OpenJDK Adoption group > (https://wiki.openjdk.java.net/display/Adoption/Main) about the > possibility of using their CloudBees CI system to produce OpenJFX binaries > (for all operating systems including ARM) as a way to help keep JavaFX > alive on IoT devices. > > For those who don't know the Adoption group, its mission is to help > developers get started with building OpenJDK, testing new features, > submitting bug reports, and cleaning up code. > > Adoption has a CloudBees CI set up and I've been talking with Mani Sarkar > (@theneomatrix369) about setting up an OpenJFX CI project with > cross-compile support that builds OpenJFX for all archs. > > The cross-compile instructions here > > https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float > are working great for me locally so now we're trying to work out how to > move that to the cloud. > > I don't want to tread on anyone's toes here and we're not trying to become > any kind of official source for JavaFX, just trying to make sure there's > an easy way (e.g. binaries) for end users to add JavaFX to their ARM JDKs > and to help people dip their toes into OpenJFX development as per the > Adoption group's mission. > > Happy to coordinate on how we can make this useful and avoid any > duplication of effort :) > > Personally, I'm a big fan of JavaFX and use it as the UI layer in JITWatch > (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and > wearables and think JavaFX would be great on the new Raspberry Pi 2. > > Cheers, > > Chris > @chriswhocodes > > > From lehmann at media-interactive.de Thu Feb 5 10:23:49 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Thu, 5 Feb 2015 11:23:49 +0100 Subject: CSS under 1.8.0_40 not identical to 31 or older In-Reply-To: <54D28B6B.4010002@tbee.org> References: <54D28B6B.4010002@tbee.org> Message-ID: <54D344B5.6060302@media-interactive.de> FWIW, we are also experiencing css differences between 8u25 and 8u40. In some custom controls portions appear completely unstyled on 8u40, as if the selectors would stop working. Couldn't take a closer look so far due to time constraints... Werner From David.Hill at Oracle.com Thu Feb 5 14:46:39 2015 From: David.Hill at Oracle.com (David Hill) Date: Thu, 05 Feb 2015 09:46:39 -0500 Subject: Build farm for OpenJFX (on ARM) In-Reply-To: References: Message-ID: <54D3824F.1050309@Oracle.com> On 2/5/15, 3:35 AM, Chris Newland wrote: Hi Chris, I have answering a few questions for Mani on getting a Linux & Linux ARM build running on the Fedora based cloudbees setup. There are still some packages I am missing for a full Fedora 21 build related to desktop media, but the core builds fine now. (Any Fedora users out there that want to help me find the right media development packages ?) Pretty excited to see this moving forward. Was dabbling last night to move some of the "packaging" steps into the Open, so that when we have a Cloudbees build, it will have a simple output overlay bundle. Glad to hear the 'Building for ARM' Wiki worked out for you. I have put a lot of time into the "Building" part of the Wiki, and am always looking for corrections/clarifications. As for treading on toes - Kevin and I are really pleased that the community is picking up these builds. Hopefully we can end up with a stable and a development bundle to point people too. There has been a lot of work in ARM (Monocle, touch, and 3D) that has not made it into an official ARM bundle. Open projects take a community, and it is nice to see so many of you helping out. Speaking of helping out.... if people want to help with contributions, we need a Oracle Contributor Agreement on file before taking code changes. Dave > Hi Johan, all, > > Following the announcement that JDK builds for ARM will no longer include > JavaFX I started talking with the OpenJDK Adoption group > (https://wiki.openjdk.java.net/display/Adoption/Main) about the > possibility of using their CloudBees CI system to produce OpenJFX binaries > (for all operating systems including ARM) as a way to help keep JavaFX > alive on IoT devices. > > For those who don't know the Adoption group, its mission is to help > developers get started with building OpenJDK, testing new features, > submitting bug reports, and cleaning up code. > > Adoption has a CloudBees CI set up and I've been talking with Mani Sarkar > (@theneomatrix369) about setting up an OpenJFX CI project with > cross-compile support that builds OpenJFX for all archs. > > The cross-compile instructions here > https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float > are working great for me locally so now we're trying to work out how to > move that to the cloud. > > I don't want to tread on anyone's toes here and we're not trying to become > any kind of official source for JavaFX, just trying to make sure there's > an easy way (e.g. binaries) for end users to add JavaFX to their ARM JDKs > and to help people dip their toes into OpenJFX development as per the > Adoption group's mission. > > Happy to coordinate on how we can make this useful and avoid any > duplication of effort :) > > Personally, I'm a big fan of JavaFX and use it as the UI layer in JITWatch > (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and > wearables and think JavaFX would be great on the new Raspberry Pi 2. > > Cheers, > > Chris > @chriswhocodes > > -- David Hill Java Embedded Development "A man's feet should be planted in his country, but his eyes should survey the world." -- George Santayana (1863 - 1952) From david.grieve at oracle.com Thu Feb 5 15:47:36 2015 From: david.grieve at oracle.com (David Grieve) Date: Thu, 05 Feb 2015 10:47:36 -0500 Subject: CSS under 1.8.0_40 not identical to 31 or older In-Reply-To: <54D28B6B.4010002@tbee.org> References: <54D28B6B.4010002@tbee.org> Message-ID: <54D39098.3050309@oracle.com> Create an issue in JIRA and include a simple example that reproduces the issue. On 2/4/15 4:13 PM, Tom Eugelink wrote: > I've just now ran JFXtras Samples under the latest 1.8.0_40 and it > does not render identical as when run under 1.8.0_31, some CSS rules > are not applied. Samples is easily downloaded from here > (http://jfxtras.org/resources/java/jfxtras-labs-samples-8.0-r4-SNAPSHOT-shadow.jar) > and started simply with "java -jar". > > When run under 1.8.0_31 or older, the "LocalDateTimeTextfieldSample" > shows a textfield with a popup button. When the button is pressed a > popup is shown, with a gradient as the background and both an ok and > cancel icon in the right top. The exact same jar under 1.8.0_40 does > not show the gradient nor the two icons. > > LocalDateTimeTextfield under water uses CalendarTextField, so the code > for this is in the calendar based control: > https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/CalendarTextFieldSkin.java > > https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/resources/jfxtras/internal/scene/control/CalendarTextField.css > > > Interesting are the lines starting at 351 in the skin, which do: > Popup lPopup = new Popup(); > ... > BorderPane lBorderPane = new BorderPane(); > lBorderPane.getStyleClass().add(this.getClass().getSimpleName() + > "_popup"); // this amounts to "CalendarTextFieldSkin_popup " > ... > lPopup.getContent().add(lBorderPane); > > This no longer results in applying the background colors as defined in > the css file on line 12. > .CalendarTextFieldSkin_popup { > -fx-background-color: -fx-shadow-highlight-color, > -fx-outer-border, -fx-inner-border, -fx-body-color; > -fx-background-insets: 0 0 -1 0,0,1,2; > -fx-background-radius: 5,5,4,3; > -fx-padding: 0.766667em 0.733333em 0.75em 0.733333em; > -fx-text-fill: -fx-text-base-color; > } > > Neither are the two in the css defined icons applied to the ImageViews. > > Is this intentional or a bug? > > Tom From lehmann at media-interactive.de Thu Feb 5 16:12:15 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Thu, 5 Feb 2015 17:12:15 +0100 Subject: Label prefHeight vs wrapText In-Reply-To: <53860A8B.1000109@media-interactive.de> References: <5385E844.9020200@media-interactive.de> <5385EFE4.3080903@oracle.com> <53860A8B.1000109@media-interactive.de> Message-ID: <54D3965F.9080200@media-interactive.de> Sorry to dig up this old thread. Just wanted to mention a much simpler workaround if a label inside a vbox does not wrap its text: label.setMinHeight(Region.USE_PREF_SIZE); As before the trick is to prevent vbox from reducing the label height below its pref height to preserve the wrapping - even if other children of the vbox need to be shrunk. Werner On 28.05.2014 18:10, Werner Lehmann wrote: > Martin, > > thanks for the explanation. Feels good to finally understand this ;-) > And while I created a ticket as per your suggestion... > > [#RT-37309] VBox: vshrink layout hint similar to vgrow > > ...it seems I can use this as a workaround: > >> label1.minHeightProperty().bind(Bindings.createDoubleBinding( >> () -> label1.prefHeight(vbox.getWidth()), >> vbox.widthProperty())); > > Maybe something similar could be made available per label boolean > property. So basically the ability to ask a label to consider wrapping > when calculating its minHeight... I can imagine that this might have > made more sense as a default behavior: if people explicitly ask for > wrapping text, they would probably accept a larger minHeight. > > Werner From derijcke.erik at gmail.com Thu Feb 5 16:47:28 2015 From: derijcke.erik at gmail.com (Erik De Rijcke) Date: Thu, 5 Feb 2015 17:47:28 +0100 Subject: Build farm for OpenJFX (on ARM) In-Reply-To: <54D3824F.1050309@Oracle.com> References: <54D3824F.1050309@Oracle.com> Message-ID: Hi David, I've just tried to build the soft float version following the instructions on the wiki. However when doing a 'gradle -PCOMPILE_TARGETS=armv6sf'. It complains 'Error: missing tool packages: [arm-linaro-4.7.tgz]'. I assume the shellscript that downloads the cross compiler tools is missing some libraries (?). Installing 'gcc-arm-linux-gnueabi' didn't solve it either. Erik On Thu, Feb 5, 2015 at 3:46 PM, David Hill wrote: > On 2/5/15, 3:35 AM, Chris Newland wrote: > > Hi Chris, > > I have answering a few questions for Mani on getting a Linux & Linux ARM > build running on the Fedora based cloudbees setup. There are still some > packages I am missing for a full Fedora 21 build related to desktop media, > but the core builds fine now. (Any Fedora users out there that want to help > me find the right media development packages ?) > > Pretty excited to see this moving forward. Was dabbling last night to move > some of the "packaging" steps into the Open, so that when we have a > Cloudbees build, it will have a simple output overlay bundle. > > Glad to hear the 'Building for ARM' Wiki worked out for you. I have put a > lot of time into the "Building" part of the Wiki, and am always looking for > corrections/clarifications. > > As for treading on toes - Kevin and I are really pleased that the > community is picking up these builds. Hopefully we can end up with a stable > and a development bundle to point people too. There has been a lot of work > in ARM (Monocle, touch, and 3D) that has not made it into an official ARM > bundle. > > Open projects take a community, and it is nice to see so many of you > helping out. > > Speaking of helping out.... if people want to help with contributions, we > need a Oracle Contributor Agreement technetwork/community/oca-486395.html> on file before taking code changes. > > Dave > > Hi Johan, all, >> >> Following the announcement that JDK builds for ARM will no longer include >> JavaFX I started talking with the OpenJDK Adoption group >> (https://wiki.openjdk.java.net/display/Adoption/Main) about the >> possibility of using their CloudBees CI system to produce OpenJFX binaries >> (for all operating systems including ARM) as a way to help keep JavaFX >> alive on IoT devices. >> >> For those who don't know the Adoption group, its mission is to help >> developers get started with building OpenJDK, testing new features, >> submitting bug reports, and cleaning up code. >> >> Adoption has a CloudBees CI set up and I've been talking with Mani Sarkar >> (@theneomatrix369) about setting up an OpenJFX CI project with >> cross-compile support that builds OpenJFX for all archs. >> >> The cross-compile instructions here >> https://wiki.openjdk.java.net/display/OpenJFX/Cross+ >> Building+for+ARM+Hard+Float >> are working great for me locally so now we're trying to work out how to >> move that to the cloud. >> >> I don't want to tread on anyone's toes here and we're not trying to become >> any kind of official source for JavaFX, just trying to make sure there's >> an easy way (e.g. binaries) for end users to add JavaFX to their ARM JDKs >> and to help people dip their toes into OpenJFX development as per the >> Adoption group's mission. >> >> Happy to coordinate on how we can make this useful and avoid any >> duplication of effort :) >> >> Personally, I'm a big fan of JavaFX and use it as the UI layer in JITWatch >> (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and >> wearables and think JavaFX would be great on the new Raspberry Pi 2. >> >> Cheers, >> >> Chris >> @chriswhocodes >> >> >> > > -- > David Hill > Java Embedded Development > > "A man's feet should be planted in his country, but his eyes should survey > the world." > -- George Santayana (1863 - 1952) > > From tbee at tbee.org Thu Feb 5 18:08:26 2015 From: tbee at tbee.org (Tom Eugelink) Date: Thu, 05 Feb 2015 19:08:26 +0100 Subject: CSS under 1.8.0_40 not identical to 31 or older In-Reply-To: <54D39098.3050309@oracle.com> References: <54D28B6B.4010002@tbee.org> <54D39098.3050309@oracle.com> Message-ID: <54D3B19A.1090807@tbee.org> Luckily I had a test project still available from a previous CSS issue, so a simple test was easily created. https://javafx-jira.kenai.com/browse/RT-39995 Now I only need a way to attach a file to that issue... Tom On 5-2-2015 16:47, David Grieve wrote: > Create an issue in JIRA and include a simple example that reproduces the issue. > > On 2/4/15 4:13 PM, Tom Eugelink wrote: >> I've just now ran JFXtras Samples under the latest 1.8.0_40 and it does not render identical as when run under 1.8.0_31, some CSS rules are not applied. Samples is easily downloaded from here (http://jfxtras.org/resources/java/jfxtras-labs-samples-8.0-r4-SNAPSHOT-shadow.jar) and started simply with "java -jar". >> >> When run under 1.8.0_31 or older, the "LocalDateTimeTextfieldSample" shows a textfield with a popup button. When the button is pressed a popup is shown, with a gradient as the background and both an ok and cancel icon in the right top. The exact same jar under 1.8.0_40 does not show the gradient nor the two icons. >> >> LocalDateTimeTextfield under water uses CalendarTextField, so the code for this is in the calendar based control: >> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/CalendarTextFieldSkin.java >> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/resources/jfxtras/internal/scene/control/CalendarTextField.css >> >> Interesting are the lines starting at 351 in the skin, which do: >> Popup lPopup = new Popup(); >> ... >> BorderPane lBorderPane = new BorderPane(); >> lBorderPane.getStyleClass().add(this.getClass().getSimpleName() + "_popup"); // this amounts to "CalendarTextFieldSkin_popup " >> ... >> lPopup.getContent().add(lBorderPane); >> >> This no longer results in applying the background colors as defined in the css file on line 12. >> .CalendarTextFieldSkin_popup { >> -fx-background-color: -fx-shadow-highlight-color, -fx-outer-border, -fx-inner-border, -fx-body-color; >> -fx-background-insets: 0 0 -1 0,0,1,2; >> -fx-background-radius: 5,5,4,3; >> -fx-padding: 0.766667em 0.733333em 0.75em 0.733333em; >> -fx-text-fill: -fx-text-base-color; >> } >> >> Neither are the two in the css defined icons applied to the ImageViews. >> >> Is this intentional or a bug? >> >> Tom > From david.grieve at oracle.com Thu Feb 5 18:15:37 2015 From: david.grieve at oracle.com (David Grieve) Date: Thu, 05 Feb 2015 13:15:37 -0500 Subject: CSS under 1.8.0_40 not identical to 31 or older In-Reply-To: <54D3B19A.1090807@tbee.org> References: <54D28B6B.4010002@tbee.org> <54D39098.3050309@oracle.com> <54D3B19A.1090807@tbee.org> Message-ID: <54D3B349.9090705@oracle.com> Thanks, Tom. Send me the source and I'll attach it on your behalf. On 2/5/15 1:08 PM, Tom Eugelink wrote: > Luckily I had a test project still available from a previous CSS > issue, so a simple test was easily created. > https://javafx-jira.kenai.com/browse/RT-39995 > > Now I only need a way to attach a file to that issue... > > Tom > > > On 5-2-2015 16:47, David Grieve wrote: >> Create an issue in JIRA and include a simple example that reproduces >> the issue. >> >> On 2/4/15 4:13 PM, Tom Eugelink wrote: >>> I've just now ran JFXtras Samples under the latest 1.8.0_40 and it >>> does not render identical as when run under 1.8.0_31, some CSS rules >>> are not applied. Samples is easily downloaded from here >>> (http://jfxtras.org/resources/java/jfxtras-labs-samples-8.0-r4-SNAPSHOT-shadow.jar) >>> and started simply with "java -jar". >>> >>> When run under 1.8.0_31 or older, the "LocalDateTimeTextfieldSample" >>> shows a textfield with a popup button. When the button is pressed a >>> popup is shown, with a gradient as the background and both an ok and >>> cancel icon in the right top. The exact same jar under 1.8.0_40 does >>> not show the gradient nor the two icons. >>> >>> LocalDateTimeTextfield under water uses CalendarTextField, so the >>> code for this is in the calendar based control: >>> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/CalendarTextFieldSkin.java >>> >>> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/resources/jfxtras/internal/scene/control/CalendarTextField.css >>> >>> >>> Interesting are the lines starting at 351 in the skin, which do: >>> Popup lPopup = new Popup(); >>> ... >>> BorderPane lBorderPane = new BorderPane(); >>> lBorderPane.getStyleClass().add(this.getClass().getSimpleName() + >>> "_popup"); // this amounts to "CalendarTextFieldSkin_popup " >>> ... >>> lPopup.getContent().add(lBorderPane); >>> >>> This no longer results in applying the background colors as defined >>> in the css file on line 12. >>> .CalendarTextFieldSkin_popup { >>> -fx-background-color: -fx-shadow-highlight-color, >>> -fx-outer-border, -fx-inner-border, -fx-body-color; >>> -fx-background-insets: 0 0 -1 0,0,1,2; >>> -fx-background-radius: 5,5,4,3; >>> -fx-padding: 0.766667em 0.733333em 0.75em 0.733333em; >>> -fx-text-fill: -fx-text-base-color; >>> } >>> >>> Neither are the two in the css defined icons applied to the ImageViews. >>> >>> Is this intentional or a bug? >>> >>> Tom >> > From kevin.rushforth at oracle.com Thu Feb 5 18:47:38 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Thu, 05 Feb 2015 10:47:38 -0800 Subject: CSS under 1.8.0_40 not identical to 31 or older In-Reply-To: <54D3B19A.1090807@tbee.org> References: <54D28B6B.4010002@tbee.org> <54D39098.3050309@oracle.com> <54D3B19A.1090807@tbee.org> Message-ID: <54D3BACA.6010100@oracle.com> If the code sample is small (a small number of reasonably short files) then just paste it in the comments. Otherwise, you can e-mail it as a zip file to one of the developers @ Oracle (either myself or the assigned engineer for the bug). -- Kevin Tom Eugelink wrote: > Luckily I had a test project still available from a previous CSS > issue, so a simple test was easily created. > https://javafx-jira.kenai.com/browse/RT-39995 > > Now I only need a way to attach a file to that issue... > > Tom > > > On 5-2-2015 16:47, David Grieve wrote: >> Create an issue in JIRA and include a simple example that reproduces >> the issue. >> >> On 2/4/15 4:13 PM, Tom Eugelink wrote: >>> I've just now ran JFXtras Samples under the latest 1.8.0_40 and it >>> does not render identical as when run under 1.8.0_31, some CSS rules >>> are not applied. Samples is easily downloaded from here >>> (http://jfxtras.org/resources/java/jfxtras-labs-samples-8.0-r4-SNAPSHOT-shadow.jar) >>> and started simply with "java -jar". >>> >>> When run under 1.8.0_31 or older, the "LocalDateTimeTextfieldSample" >>> shows a textfield with a popup button. When the button is pressed a >>> popup is shown, with a gradient as the background and both an ok and >>> cancel icon in the right top. The exact same jar under 1.8.0_40 does >>> not show the gradient nor the two icons. >>> >>> LocalDateTimeTextfield under water uses CalendarTextField, so the >>> code for this is in the calendar based control: >>> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/CalendarTextFieldSkin.java >>> >>> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/resources/jfxtras/internal/scene/control/CalendarTextField.css >>> >>> >>> Interesting are the lines starting at 351 in the skin, which do: >>> Popup lPopup = new Popup(); >>> ... >>> BorderPane lBorderPane = new BorderPane(); >>> lBorderPane.getStyleClass().add(this.getClass().getSimpleName() + >>> "_popup"); // this amounts to "CalendarTextFieldSkin_popup " >>> ... >>> lPopup.getContent().add(lBorderPane); >>> >>> This no longer results in applying the background colors as defined >>> in the css file on line 12. >>> .CalendarTextFieldSkin_popup { >>> -fx-background-color: -fx-shadow-highlight-color, >>> -fx-outer-border, -fx-inner-border, -fx-body-color; >>> -fx-background-insets: 0 0 -1 0,0,1,2; >>> -fx-background-radius: 5,5,4,3; >>> -fx-padding: 0.766667em 0.733333em 0.75em 0.733333em; >>> -fx-text-fill: -fx-text-base-color; >>> } >>> >>> Neither are the two in the css defined icons applied to the ImageViews. >>> >>> Is this intentional or a bug? >>> >>> Tom >> > From kevin.rushforth at oracle.com Thu Feb 5 18:48:10 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Thu, 05 Feb 2015 10:48:10 -0800 Subject: CSS under 1.8.0_40 not identical to 31 or older In-Reply-To: <54D3B349.9090705@oracle.com> References: <54D28B6B.4010002@tbee.org> <54D39098.3050309@oracle.com> <54D3B19A.1090807@tbee.org> <54D3B349.9090705@oracle.com> Message-ID: <54D3BAEA.9020602@oracle.com> Thanks, David. -- Kevin David Grieve wrote: > Thanks, Tom. Send me the source and I'll attach it on your behalf. > > On 2/5/15 1:08 PM, Tom Eugelink wrote: >> Luckily I had a test project still available from a previous CSS >> issue, so a simple test was easily created. >> https://javafx-jira.kenai.com/browse/RT-39995 >> >> Now I only need a way to attach a file to that issue... >> >> Tom >> >> >> On 5-2-2015 16:47, David Grieve wrote: >>> Create an issue in JIRA and include a simple example that reproduces >>> the issue. >>> >>> On 2/4/15 4:13 PM, Tom Eugelink wrote: >>>> I've just now ran JFXtras Samples under the latest 1.8.0_40 and it >>>> does not render identical as when run under 1.8.0_31, some CSS >>>> rules are not applied. Samples is easily downloaded from here >>>> (http://jfxtras.org/resources/java/jfxtras-labs-samples-8.0-r4-SNAPSHOT-shadow.jar) >>>> and started simply with "java -jar". >>>> >>>> When run under 1.8.0_31 or older, the >>>> "LocalDateTimeTextfieldSample" shows a textfield with a popup >>>> button. When the button is pressed a popup is shown, with a >>>> gradient as the background and both an ok and cancel icon in the >>>> right top. The exact same jar under 1.8.0_40 does not show the >>>> gradient nor the two icons. >>>> >>>> LocalDateTimeTextfield under water uses CalendarTextField, so the >>>> code for this is in the calendar based control: >>>> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/CalendarTextFieldSkin.java >>>> >>>> https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/resources/jfxtras/internal/scene/control/CalendarTextField.css >>>> >>>> >>>> Interesting are the lines starting at 351 in the skin, which do: >>>> Popup lPopup = new Popup(); >>>> ... >>>> BorderPane lBorderPane = new BorderPane(); >>>> lBorderPane.getStyleClass().add(this.getClass().getSimpleName() + >>>> "_popup"); // this amounts to "CalendarTextFieldSkin_popup " >>>> ... >>>> lPopup.getContent().add(lBorderPane); >>>> >>>> This no longer results in applying the background colors as defined >>>> in the css file on line 12. >>>> .CalendarTextFieldSkin_popup { >>>> -fx-background-color: -fx-shadow-highlight-color, >>>> -fx-outer-border, -fx-inner-border, -fx-body-color; >>>> -fx-background-insets: 0 0 -1 0,0,1,2; >>>> -fx-background-radius: 5,5,4,3; >>>> -fx-padding: 0.766667em 0.733333em 0.75em 0.733333em; >>>> -fx-text-fill: -fx-text-base-color; >>>> } >>>> >>>> Neither are the two in the css defined icons applied to the >>>> ImageViews. >>>> >>>> Is this intentional or a bug? >>>> >>>> Tom >>> >> > From David.Hill at Oracle.com Thu Feb 5 18:49:57 2015 From: David.Hill at Oracle.com (David Hill) Date: Thu, 05 Feb 2015 13:49:57 -0500 Subject: Build farm for OpenJFX (on ARM) In-Reply-To: References: <54D3824F.1050309@Oracle.com> Message-ID: <54D3BB55.1090202@Oracle.com> On 2/5/15, 11:47 AM, Erik De Rijcke wrote: > Hi David, > > I've just tried to build the soft float version following the instructions on the wiki. However when doing a 'gradle -PCOMPILE_TARGETS=armv6sf'. It complains 'Error: missing tool packages: [arm-linaro-4.7.tgz]'. > > I assume the shellscript that downloads the cross compiler tools is missing some libraries (?). Installing 'gcc-arm-linux-gnueabi' didn't solve it either. Not many uses for soft float - Pi and most everyone else has moved to hard float for the aprox 10% gain in performance. The instructions on the Wiki deal with creating a tool chain for hard float and then building with it. Due to the relative lack of interest in soft float, I have not spent much time working on the soft float side. To work around this (at least to start, I don't have time to check it fully out at the moment) you would want to create a soft float toolchain using buildSrc/crosslibs/crosslibs-armv6sf.sh, which you said you did :-) That should create ../crosslibs. In there create a directory arm-linaro-4.7. That should shut up the error message. But... you will still need a cross compiler installed. So you can either make that directory a link to your cross compiler, or you can use the gradle magic override you can find in armv6sf.gradle: if (rootProject.hasProperty("ARMV6SF_COMPILER")) { logger.quiet "Using alternate ARMV6SF_COMPILER $rootProject.ARMV6SF_COMPILER" compilerHome=file(rootProject.ARMV6SF_COMPILER); } if (rootProject.hasProperty("ARMV6SF_COMPILER_PREFIX")) { logger.quiet "Using alternate ARMV6SF_COMPILER_PREFIX $rootProject.ARMV6SF_COMPILER_PREFIX" compilerPrefix="${rootProject.ARMV6SF_COMPILER_PREFIX}" } So you would add -PARMV6SF_COMPILER=/path_to_your_cross_compiler -PARMV6SF_COMPILER_PREFIX="arm-linux-gnueabi-" to your gradle line, changing stuff as needed. Dave > > Erik > > On Thu, Feb 5, 2015 at 3:46 PM, David Hill > wrote: > > On 2/5/15, 3:35 AM, Chris Newland wrote: > > Hi Chris, > > I have answering a few questions for Mani on getting a Linux & Linux ARM build running on the Fedora based cloudbees setup. There are still some packages I am missing for a full Fedora 21 build related to desktop media, but the core builds fine now. (Any Fedora users out there that want to help me find the right media development packages ?) > > Pretty excited to see this moving forward. Was dabbling last night to move some of the "packaging" steps into the Open, so that when we have a Cloudbees build, it will have a simple output overlay bundle. > > Glad to hear the 'Building for ARM' Wiki worked out for you. I have put a lot of time into the "Building" part of the Wiki, and am always looking for corrections/clarifications. > > As for treading on toes - Kevin and I are really pleased that the community is picking up these builds. Hopefully we can end up with a stable and a development bundle to point people too. There has been a lot of work in ARM (Monocle, touch, and 3D) that has not made it into an official ARM bundle. > > Open projects take a community, and it is nice to see so many of you helping out. > > Speaking of helping out.... if people want to help with contributions, we need a Oracle Contributor Agreement on file before taking code changes. > > Dave > > Hi Johan, all, > > Following the announcement that JDK builds for ARM will no longer include > JavaFX I started talking with the OpenJDK Adoption group > (https://wiki.openjdk.java.net/display/Adoption/Main) about the > possibility of using their CloudBees CI system to produce OpenJFX binaries > (for all operating systems including ARM) as a way to help keep JavaFX > alive on IoT devices. > > For those who don't know the Adoption group, its mission is to help > developers get started with building OpenJDK, testing new features, > submitting bug reports, and cleaning up code. > > Adoption has a CloudBees CI set up and I've been talking with Mani Sarkar > (@theneomatrix369) about setting up an OpenJFX CI project with > cross-compile support that builds OpenJFX for all archs. > > The cross-compile instructions here > https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float > are working great for me locally so now we're trying to work out how to > move that to the cloud. > > I don't want to tread on anyone's toes here and we're not trying to become > any kind of official source for JavaFX, just trying to make sure there's > an easy way (e.g. binaries) for end users to add JavaFX to their ARM JDKs > and to help people dip their toes into OpenJFX development as per the > Adoption group's mission. > > Happy to coordinate on how we can make this useful and avoid any > duplication of effort :) > > Personally, I'm a big fan of JavaFX and use it as the UI layer in JITWatch > (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and > wearables and think JavaFX would be great on the new Raspberry Pi 2. > > Cheers, > > Chris > @chriswhocodes > > > > > -- > David Hill > Java Embedded Development > > "A man's feet should be planted in his country, but his eyes should survey the world." > -- George Santayana (1863 - 1952) > > -- David Hill Java Embedded Development "A man's feet should be planted in his country, but his eyes should survey the world." -- George Santayana (1863 - 1952) From sadhak001 at gmail.com Thu Feb 5 22:19:05 2015 From: sadhak001 at gmail.com (Mani Sarkar) Date: Thu, 5 Feb 2015 22:19:05 +0000 Subject: Build farm for OpenJFX (on ARM) In-Reply-To: References: Message-ID: Hi All, As per Chris's message and the tweet I got last night / this morning I'm updating you (which I was intending to do when the time was right), that we now have a successful OpenJFX build on Cloudbees, see https://adopt-openjdk.ci.cloudbees.com/view/OpenJDK/job/OpenJFX/. Our build farm is able to build an updated artefact each day. Currently its a Linux build, the ARM build is on its way, an issue with a dependency has hindered us, but once that is also successful you will be able to download both these binaries from the above Cloudbees location. I'll add to what Chris has mentioned, I was not aware of another initiative to build OpenJFX binaries and ours is to not duplicate the effort but make such opensource binaries related to OpenJDK available to everyone in the community. We need all the help you can give us. As you can see from the list on the cloud farm, something or the other always needs to be attended to. Thanks. Cheers, Mani On Thu, Feb 5, 2015 at 8:35 AM, Chris Newland wrote: > Hi Johan, all, > > Following the announcement that JDK builds for ARM will no longer include > JavaFX I started talking with the OpenJDK Adoption group > (https://wiki.openjdk.java.net/display/Adoption/Main) about the > possibility of using their CloudBees CI system to produce OpenJFX binaries > (for all operating systems including ARM) as a way to help keep JavaFX > alive on IoT devices. > > For those who don't know the Adoption group, its mission is to help > developers get started with building OpenJDK, testing new features, > submitting bug reports, and cleaning up code. > > Adoption has a CloudBees CI set up and I've been talking with Mani Sarkar > (@theneomatrix369) about setting up an OpenJFX CI project with > cross-compile support that builds OpenJFX for all archs. > > The cross-compile instructions here > > https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float > are working great for me locally so now we're trying to work out how to > move that to the cloud. > > I don't want to tread on anyone's toes here and we're not trying to become > any kind of official source for JavaFX, just trying to make sure there's > an easy way (e.g. binaries) for end users to add JavaFX to their ARM JDKs > and to help people dip their toes into OpenJFX development as per the > Adoption group's mission. > > Happy to coordinate on how we can make this useful and avoid any > duplication of effort :) > > Personally, I'm a big fan of JavaFX and use it as the UI layer in JITWatch > (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and > wearables and think JavaFX would be great on the new Raspberry Pi 2. > > Cheers, > > Chris > @chriswhocodes > > > -- @theNeomatrix369 * | **Blog ** | *LJC Associate & LJC Advocate (@adoptopenjdk & @adoptajsr programs) *Meet-a-Project - *MutabilityDetector * | **Bitbucket * * | **Github * * | **LinkedIn * *Come to Devoxx UK 2015:* http://www.devoxx.co.uk/ *Don't chase success, rather aim for "Excellence", and success will come chasing after you!* From richard.bair at oracle.com Thu Feb 5 22:26:55 2015 From: richard.bair at oracle.com (Richard Bair) Date: Thu, 5 Feb 2015 14:26:55 -0800 Subject: Build farm for OpenJFX (on ARM) In-Reply-To: References: Message-ID: <6BA3EA13-80EF-475E-BD23-5BA095A2A995@oracle.com> Cool! > On Feb 5, 2015, at 2:19 PM, Mani Sarkar wrote: > > Hi All, > > As per Chris's message and the tweet I got last night / this morning I'm > updating you (which I was intending to do when the time was right), that we > now have a successful OpenJFX build on Cloudbees, see > https://adopt-openjdk.ci.cloudbees.com/view/OpenJDK/job/OpenJFX/. > > Our build farm is able to build an updated artefact each day. Currently its > a Linux build, the ARM build is on its way, an issue with a dependency has > hindered us, but once that is also successful you will be able to download > both these binaries from the above Cloudbees location. > > I'll add to what Chris has mentioned, I was not aware of another initiative > to build OpenJFX binaries and ours is to not duplicate the effort but make > such opensource binaries related to OpenJDK available to everyone in the > community. > > We need all the help you can give us. As you can see from the list on the > cloud farm, something or the other always needs to be attended to. > > Thanks. > > Cheers, > Mani > > On Thu, Feb 5, 2015 at 8:35 AM, Chris Newland > wrote: > >> Hi Johan, all, >> >> Following the announcement that JDK builds for ARM will no longer include >> JavaFX I started talking with the OpenJDK Adoption group >> (https://wiki.openjdk.java.net/display/Adoption/Main) about the >> possibility of using their CloudBees CI system to produce OpenJFX binaries >> (for all operating systems including ARM) as a way to help keep JavaFX >> alive on IoT devices. >> >> For those who don't know the Adoption group, its mission is to help >> developers get started with building OpenJDK, testing new features, >> submitting bug reports, and cleaning up code. >> >> Adoption has a CloudBees CI set up and I've been talking with Mani Sarkar >> (@theneomatrix369) about setting up an OpenJFX CI project with >> cross-compile support that builds OpenJFX for all archs. >> >> The cross-compile instructions here >> >> https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float >> are working great for me locally so now we're trying to work out how to >> move that to the cloud. >> >> I don't want to tread on anyone's toes here and we're not trying to become >> any kind of official source for JavaFX, just trying to make sure there's >> an easy way (e.g. binaries) for end users to add JavaFX to their ARM JDKs >> and to help people dip their toes into OpenJFX development as per the >> Adoption group's mission. >> >> Happy to coordinate on how we can make this useful and avoid any >> duplication of effort :) >> >> Personally, I'm a big fan of JavaFX and use it as the UI layer in JITWatch >> (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and >> wearables and think JavaFX would be great on the new Raspberry Pi 2. >> >> Cheers, >> >> Chris >> @chriswhocodes >> >> >> > > > -- > @theNeomatrix369 * | **Blog > ** | *LJC Associate & LJC Advocate > (@adoptopenjdk & @adoptajsr programs) > *Meet-a-Project - *MutabilityDetector > * | **Bitbucket > * * | **Github > * * | **LinkedIn > * > *Come to Devoxx UK 2015:* http://www.devoxx.co.uk/ > > *Don't chase success, rather aim for "Excellence", and success will come > chasing after you!* From anton.tarasov at oracle.com Fri Feb 6 13:13:53 2015 From: anton.tarasov at oracle.com (Anton Tarasov) Date: Fri, 06 Feb 2015 16:13:53 +0300 Subject: Execution environment for javafx.scene.web In-Reply-To: References: Message-ID: <54D4BE11.8030708@oracle.com> Hi Michael, Yes, WebEngine can be used separately from WebView. (See inline, please) On 05/02/15 02:53, Michael Pozhidaev wrote: > Hello everybody, > > I am working on the technology representing the information in form > which adjusted to the perception of blind people. It is just as > an addition to usual screen readers. > > For a long time there was a rather big problem, it is a web browsing. My > environment is implemented in Java but I was unable to get any web > browser features.Any web surfing activity was possible only if you are > using a fully functional browser, like Firefox, Chrome, etc. > > From time to time I looked for any browser implementations in Java but > everything what I got never looked interesting. The picture totally > changed when I found javafx.scene.web. At a glance it looks like exactly > what I need! > > The key feature which looks nice to me is a splitting a visualization and > a background engine. I need exactly the engine which manages DOM, can > execute JavaScript, sends all notifications and events, but don't take > care about graphical representation. The description for WebEngine class > says that it suits completely. > > OK, but I would like to ensure that JavaFX itself suits as well. Meaning, may I > use WebEngine class without creating _*graphical*_ application? In other > words, what should the execution environment for WebEngine be? > > There are two questions I would like to understand: > > 1. Should I create a full graphical application in JavaFX traditions to > be able to use WebEngine? My application uses a speech feedback as a > main way to bring information to users. If it is required that I should > have a complete graphical scene for using WebEngine it would be bad news > for me. Well, you need to create a JavaFX application in order to start using WebEngine, but you don't need to display any GUI (Stage, Scene etc.) on the screen. If that works for you, then basicly it may look as follows: import javafx.application.Application; import javafx.scene.web.WebEngine; import javafx.stage.Stage; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.concurrent.Worker.State; public class MyWebApp extends Application { static WebEngine web; public MyWebApp() {} public void start(Stage s) { web = new WebEngine(); web.getLoadWorker().stateProperty().addListener( new ChangeListener() { public void changed(ObservableValue ov, State oldState, State newState) { if (newState == State.SUCCEEDED) { System.out.println(web.getTitle()); } } }); web.load("http://javafx.com"); } } The "start" method is your entry point into the JavaFX App thread. That's where WebEngine must be created and managed, and you can't do it anywhere else (that's why you need a JavaFX app even if you don't plan to use any GUI stuff). You may also launch a JavaFX app tradittionally, via the "main" method: import javafx.application.Application; public class Main { public static void main(String[] args) { Application.launch(MyWebApp.class, args); } } The "launch" method won't return untill JavaFX has exited, so you need to start your base logic (start your worker threads) before this call. The way you access your WebEngine instance is either via its associated listeners or via Platform.runLater(): Platform.runLater(new Runnable() { public void run() { System.out.println(MyWebApp.web.getLocation()); } }); Both ways you do it on the JavaFX App thread. One more thing is that you should prevent JavaFX from auto-exit. This happens after the last Stage is closed. As you don't have any Stage open, you should tell JavaFX that you want it to continue until you explicitly request it to exit. This is what you need to call first from the "start" method: Platform.setImplicitExit(false); (Actually, WebEngine itself should prevent JavaFX from auto-exit, but you're better to do that explicitly.) > 2. Do I understand correctly that JavaFX applications are able to be > launched just in Java Virtual Machine? Meaning, they do not need a > complete web browser, right? I found that javafx.scene.web using > webkit and it is OK. I am asking that the user shouldn't need opening a web > browser window and run JavaFX application in it, yes? What you're telling about is the "applet mode". You're not limited to it. You can launch your JavaFX app as a standlone application. So, you don't need to open a browser. > > Help me please! If these questions would be OK I would be able to > significantly improve my environment! > > Thank you in advance! :)) You're welcome! Regards, Anton. From vadim.pakhnushev at oracle.com Fri Feb 6 14:37:58 2015 From: vadim.pakhnushev at oracle.com (Vadim Pakhnushev) Date: Fri, 06 Feb 2015 17:37:58 +0300 Subject: In(Sanity) Testing Mondays Message-ID: <54D4D1C6.30507@oracle.com> Reminder, Monday is our weekly sanity testing. You can find your testing assignment at: https://wiki.openjdk.java.net/display/OpenJFX/Sanity+Testing Also please remember that the repo will be locked from 1am PST until 1pm PST. Happy testing! Thanks, Vadim From kevin.rushforth at oracle.com Fri Feb 6 15:44:25 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 06 Feb 2015 07:44:25 -0800 Subject: Execution environment for javafx.scene.web In-Reply-To: <54D4BE11.8030708@oracle.com> References: <54D4BE11.8030708@oracle.com> Message-ID: <54D4E159.8070600@oracle.com> Additionally, if you aren't going to display the primary Stage in the Application start(Stage) method then I also recommend you call: Platform.setImplicitExit(false); in the start method, since you will need to control the life-cycle of the application yourself and call Platform.exit() to exit the FX runtime. -- Kevin Anton Tarasov wrote: > Hi Michael, > > Yes, WebEngine can be used separately from WebView. > > (See inline, please) > > On 05/02/15 02:53, Michael Pozhidaev wrote: >> Hello everybody, >> >> I am working on the technology representing the information in form >> which adjusted to the perception of blind people. It is just as >> an addition to usual screen readers. >> >> For a long time there was a rather big problem, it is a web browsing. My >> environment is implemented in Java but I was unable to get any web >> browser features.Any web surfing activity was possible only if you are >> using a fully functional browser, like Firefox, Chrome, etc. >> >> From time to time I looked for any browser implementations in Java but >> everything what I got never looked interesting. The picture totally >> changed when I found javafx.scene.web. At a glance it looks like exactly >> what I need! >> >> The key feature which looks nice to me is a splitting a visualization >> and >> a background engine. I need exactly the engine which manages DOM, can >> execute JavaScript, sends all notifications and events, but don't take >> care about graphical representation. The description for WebEngine class >> says that it suits completely. >> >> OK, but I would like to ensure that JavaFX itself suits as well. >> Meaning, may I >> use WebEngine class without creating _*graphical*_ application? In other >> words, what should the execution environment for WebEngine be? >> >> There are two questions I would like to understand: >> >> 1. Should I create a full graphical application in JavaFX traditions to >> be able to use WebEngine? My application uses a speech feedback as a >> main way to bring information to users. If it is required that I should >> have a complete graphical scene for using WebEngine it would be bad news >> for me. > > Well, you need to create a JavaFX application in order to start using > WebEngine, > but you don't need to display any GUI (Stage, Scene etc.) on the screen. > > If that works for you, then basicly it may look as follows: > > import javafx.application.Application; > import javafx.scene.web.WebEngine; > import javafx.stage.Stage; > import javafx.beans.value.ChangeListener; > import javafx.beans.value.ObservableValue; > import javafx.concurrent.Worker.State; > > public class MyWebApp extends Application { > static WebEngine web; > > public MyWebApp() {} > > public void start(Stage s) { > web = new WebEngine(); > web.getLoadWorker().stateProperty().addListener( > new ChangeListener() { > public void changed(ObservableValue ov, State > oldState, State newState) { > if (newState == State.SUCCEEDED) { > System.out.println(web.getTitle()); > } > } > }); > web.load("http://javafx.com"); > } > } > > The "start" method is your entry point into the JavaFX App thread. > That's where WebEngine must be created and managed, and you can't do > it anywhere else > (that's why you need a JavaFX app even if you don't plan to use any > GUI stuff). > > You may also launch a JavaFX app tradittionally, via the "main" method: > > import javafx.application.Application; > > public class Main { > public static void main(String[] args) { > Application.launch(MyWebApp.class, args); > } > } > > The "launch" method won't return untill JavaFX has exited, so you need > to start your base logic (start your worker threads) before this call. > > The way you access your WebEngine instance is either via its > associated listeners or via Platform.runLater(): > > Platform.runLater(new Runnable() { > public void run() { > System.out.println(MyWebApp.web.getLocation()); > } > }); > > Both ways you do it on the JavaFX App thread. > > One more thing is that you should prevent JavaFX from auto-exit. This > happens after the last Stage is closed. > As you don't have any Stage open, you should tell JavaFX that you want > it to continue until you explicitly request it to exit. > > This is what you need to call first from the "start" method: > > Platform.setImplicitExit(false); > > (Actually, WebEngine itself should prevent JavaFX from auto-exit, but > you're better to do that explicitly.) > >> 2. Do I understand correctly that JavaFX applications are able to be >> launched just in Java Virtual Machine? Meaning, they do not need a >> complete web browser, right? I found that javafx.scene.web using >> webkit and it is OK. I am asking that the user shouldn't need opening >> a web >> browser window and run JavaFX application in it, yes? > > What you're telling about is the "applet mode". You're not limited to > it. You can launch your JavaFX app as a standlone application. > So, you don't need to open a browser. > >> >> Help me please! If these questions would be OK I would be able to >> significantly improve my environment! >> >> Thank you in advance! :)) > > You're welcome! > > Regards, > Anton. > From David.Hill at Oracle.com Fri Feb 6 16:43:15 2015 From: David.Hill at Oracle.com (David Hill) Date: Fri, 06 Feb 2015 11:43:15 -0500 Subject: Please review open bundling Message-ID: <54D4EF23.60501@Oracle.com> Jira: https://javafx-jira.kenai.com/browse/RT-39976 Webrev: http://cr.openjdk.java.net/~ddhill/RT-39976/ This change provides for building the build in an OpenJFX context. Or ... if you want to try it in a close build: gradle openZip[Mac|Win|Linux|Armv6hf] -- David Hill Java Embedded Development "A man's feet should be planted in his country, but his eyes should survey the world." -- George Santayana (1863 - 1952) From pedro.duquevieira at gmail.com Fri Feb 6 16:56:26 2015 From: pedro.duquevieira at gmail.com (Pedro Duque Vieira) Date: Fri, 6 Feb 2015 16:56:26 +0000 Subject: new FormattedTextField Message-ID: Hi, Where can I find information or API specs about the new FormattedTextField (or whatever is its name) introduced in 8u40? Thanks, best regards -- Pedro Duque Vieira From kevin.rushforth at oracle.com Fri Feb 6 17:07:13 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 06 Feb 2015 09:07:13 -0800 Subject: new FormattedTextField In-Reply-To: References: Message-ID: <54D4F4C1.6040805@oracle.com> EA docs for 8u40 are not available, but you can look in the FX 9 docs here: http://download.java.net/jdk9/jfxdocs/ Specifically: http://download.java.net/jdk9/jfxdocs/javafx/scene/control/TextFormatter.html -- Kevin Pedro Duque Vieira wrote: > Hi, > > Where can I find information or API specs about the new FormattedTextField > (or whatever is its name) introduced in 8u40? > > Thanks, best regards > > From morris.meyer at oracle.com Fri Feb 6 17:09:27 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Fri, 06 Feb 2015 12:09:27 -0500 Subject: [8u60] Review request for RT-39859: NSInternalInconsistencyException Crash Message-ID: <54D4F547.1040901@oracle.com> Kevin and Dave, Please review this fix for RT-39859. The fix was to check to make sure the submenu item is contained within the menu prior to trying to delete it from the menu. Thanks! --morris WEBREV - http://cr.openjdk.java.net/~morris/RT-39859.01a/ JIRA - https://javafx-jira.kenai.com/browse/RT-39859 From kevin.rushforth at oracle.com Fri Feb 6 21:03:22 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 06 Feb 2015 13:03:22 -0800 Subject: [8u60] review request: RT-40000: Eliminate split packages across JavaFX modules Message-ID: <54D52C1A.6070109@oracle.com> Chien, Please review the following refactoring: https://javafx-jira.kenai.com/browse/RT-40000 http://cr.openjdk.java.net/~kcr/RT-40000/webrev.00/ Thanks. -- Kevin From herve.girod at gmail.com Fri Feb 6 23:10:52 2015 From: herve.girod at gmail.com (Herve Girod) Date: Sat, 7 Feb 2015 00:10:52 +0100 Subject: Directional light in JavaFX 3D Message-ID: Hello, Are there plans to implement an API allowing directional lights ? it seems that for now there exist only spot and ambiant light in JavaFX 3D. Herv? From chien.yang at oracle.com Fri Feb 6 23:16:21 2015 From: chien.yang at oracle.com (Chien Yang) Date: Fri, 06 Feb 2015 15:16:21 -0800 Subject: Directional light in JavaFX 3D In-Reply-To: References: Message-ID: <54D54B45.3020407@oracle.com> Hi Herve, A JIRA for directional light has already been filed but there is no immediate plan to add this feature at the moment. Currently JavaFX 3D only supports point light and ambient light. - Chien On 2/6/15 3:10 PM, Herve Girod wrote: > Hello, > > Are there plans to implement an API allowing directional lights ? it seems > that for now there exist only spot and ambiant light in JavaFX 3D. > > Herv? From chien.yang at oracle.com Fri Feb 6 23:18:16 2015 From: chien.yang at oracle.com (Chien Yang) Date: Fri, 06 Feb 2015 15:18:16 -0800 Subject: Directional light in JavaFX 3D In-Reply-To: <54D54B45.3020407@oracle.com> References: <54D54B45.3020407@oracle.com> Message-ID: <54D54BB8.5010903@oracle.com> Sorry, I forgot to paste the JIRA link before hitting the send button. https://javafx-jira.kenai.com/browse/RT-33899 - Chien On 2/6/15 3:16 PM, Chien Yang wrote: > Hi Herve, > > A JIRA for directional light has already been filed but there is no > immediate plan to add this feature at the moment. Currently JavaFX 3D > only supports point light and ambient light. > > - Chien > > On 2/6/15 3:10 PM, Herve Girod wrote: >> Hello, >> >> Are there plans to implement an API allowing directional lights ? it >> seems >> that for now there exist only spot and ambiant light in JavaFX 3D. >> >> Herv? > From swpalmer at gmail.com Sat Feb 7 00:33:29 2015 From: swpalmer at gmail.com (Scott Palmer) Date: Fri, 6 Feb 2015 19:33:29 -0500 Subject: Event Filtering Message-ID: Is it possible to modify the event in an event filter or otherwise tweak the event that is ultimately received by the target? Let's say I have a TextField and I only want to allow typing of capital letters. That is easy enough to enforce with an event filter.. if the KeyTyped event doesn't represent a capital letter I can consume it in an event filter and it won't get to the control. But let's say that I want to allow the user to type lowercase letters and have them appear in uppercase. I don't ever want the text property of the TextField to hold a lowercase character. Can that be done? There are no public constructors for KeyEvents, and the fields are immutable. So it doesn't seem like I can change the event that is delivered to the target. (What are the copyFor(...) methods on Event used for?) I suppose the 8u40 support for formatted fields is what should be used for my example, but the idea of tweaking the events before they are delivered to an event handler, or synthesizing a new event is more general. Is it possible? Scott From sadhak001 at gmail.com Sat Feb 7 01:01:40 2015 From: sadhak001 at gmail.com (Mani Sarkar) Date: Sat, 7 Feb 2015 01:01:40 +0000 Subject: Build farm for OpenJFX (on ARM) In-Reply-To: <6BA3EA13-80EF-475E-BD23-5BA095A2A995@oracle.com> References: <6BA3EA13-80EF-475E-BD23-5BA095A2A995@oracle.com> Message-ID: Hi all, We are still working on the ARM build of OpenJFX, whilst building it on a Fedora virtual machine, we got the following errors: > > *Successfully started process 'command > '/scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/arm-linux-gnueabihf-g++''* > /scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../.. > /../../arm-linux-gnueabihf/bin/ld: > cannot find -lgtk-x11-2.0 > /scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../.. > /../../arm-linux-gnueabihf/bin/ld: > cannot find -lgdk-x11-2.0 > /scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../.. > /../../arm-linux-gnueabihf/bin/ld: > cannot find -lgio-2.0 > /scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../.. > /../../arm-linux-gnueabihf/bin/ld: > cannot find -lgobject-2.0 > /scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../.. > /../../arm-linux-gnueabihf/bin/ld: > cannot find -lgthread-2.0 > /scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../.. > /../../arm-linux-gnueabihf/bin/ld: > cannot find -lglib-2.0 collect2: error: ld returned 1 exit status > Process 'command > '/scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb > ian-2012.09-20120921_linux/bin/arm-linux-gnueabihf-g++'' finished with > exit value 1 (state: FAILED) :graphics:linkArmv6hfFontFreetype FAILED > :graphics:linkArmv6hfFontFreetype (Thread[main,5,main]) completed. > Took 0.057 secs. > The above errors are a result of this command: /scratch/jenkins/workspace/crosslibs/gcc-linaro-arm-linux-gnueabihf-raspb ian-2012.09-20120921_linux/bin/arm-linux-gnueabihf-g++ Its one of the lines in buildSrc/crosslibs/crosslibs-armv6hf.sh Has anyone come across this issues? Also solutions like these won't work: sudo apt-get install or yum install... I would like to get access to tars or zips that I can explode into a folder and serve it to the build script. Any help will be highly appreciated. Cheers, Mani On Thu, Feb 5, 2015 at 10:26 PM, Richard Bair wrote: > Cool! > > > On Feb 5, 2015, at 2:19 PM, Mani Sarkar wrote: > > > > Hi All, > > > > As per Chris's message and the tweet I got last night / this morning I'm > > updating you (which I was intending to do when the time was right), that > we > > now have a successful OpenJFX build on Cloudbees, see > > https://adopt-openjdk.ci.cloudbees.com/view/OpenJDK/job/OpenJFX/. > > > > Our build farm is able to build an updated artefact each day. Currently > its > > a Linux build, the ARM build is on its way, an issue with a dependency > has > > hindered us, but once that is also successful you will be able to > download > > both these binaries from the above Cloudbees location. > > > > I'll add to what Chris has mentioned, I was not aware of another > initiative > > to build OpenJFX binaries and ours is to not duplicate the effort but > make > > such opensource binaries related to OpenJDK available to everyone in the > > community. > > > > We need all the help you can give us. As you can see from the list on the > > cloud farm, something or the other always needs to be attended to. > > > > Thanks. > > > > Cheers, > > Mani > > > > On Thu, Feb 5, 2015 at 8:35 AM, Chris Newland > > > wrote: > > > >> Hi Johan, all, > >> > >> Following the announcement that JDK builds for ARM will no longer > include > >> JavaFX I started talking with the OpenJDK Adoption group > >> (https://wiki.openjdk.java.net/display/Adoption/Main) about the > >> possibility of using their CloudBees CI system to produce OpenJFX > binaries > >> (for all operating systems including ARM) as a way to help keep JavaFX > >> alive on IoT devices. > >> > >> For those who don't know the Adoption group, its mission is to help > >> developers get started with building OpenJDK, testing new features, > >> submitting bug reports, and cleaning up code. > >> > >> Adoption has a CloudBees CI set up and I've been talking with Mani > Sarkar > >> (@theneomatrix369) about setting up an OpenJFX CI project with > >> cross-compile support that builds OpenJFX for all archs. > >> > >> The cross-compile instructions here > >> > >> > https://wiki.openjdk.java.net/display/OpenJFX/Cross+Building+for+ARM+Hard+Float > >> are working great for me locally so now we're trying to work out how to > >> move that to the cloud. > >> > >> I don't want to tread on anyone's toes here and we're not trying to > become > >> any kind of official source for JavaFX, just trying to make sure there's > >> an easy way (e.g. binaries) for end users to add JavaFX to their ARM > JDKs > >> and to help people dip their toes into OpenJFX development as per the > >> Adoption group's mission. > >> > >> Happy to coordinate on how we can make this useful and avoid any > >> duplication of effort :) > >> > >> Personally, I'm a big fan of JavaFX and use it as the UI layer in > JITWatch > >> (https://github.com/AdoptOpenJDK/jitwatch/). I'm also into IoT and > >> wearables and think JavaFX would be great on the new Raspberry Pi 2. > >> > >> Cheers, > >> > >> Chris > >> @chriswhocodes > >> > >> > >> > > > > > > -- > > @theNeomatrix369 * | **Blog > > ** | *LJC Associate & LJC Advocate > > (@adoptopenjdk & @adoptajsr programs) > > *Meet-a-Project - *MutabilityDetector > > * | **Bitbucket > > * * | **Github > > * * | **LinkedIn > > * > > *Come to Devoxx UK 2015:* http://www.devoxx.co.uk/ > > > > *Don't chase success, rather aim for "Excellence", and success will come > > chasing after you!* > > -- @theNeomatrix369 * | **Blog ** | *LJC Associate & LJC Advocate (@adoptopenjdk & @adoptajsr programs) *Meet-a-Project - *MutabilityDetector * | **Bitbucket * * | **Github * * | **LinkedIn * *Come to Devoxx UK 2015:* http://www.devoxx.co.uk/ *Don't chase success, rather aim for "Excellence", and success will come chasing after you!* From tomas.mikula at gmail.com Sat Feb 7 01:21:16 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Fri, 6 Feb 2015 20:21:16 -0500 Subject: Event Filtering In-Reply-To: References: Message-ID: On Fri, Feb 6, 2015 at 7:33 PM, Scott Palmer wrote: > Is it possible to modify the event in an event filter or otherwise tweak > the event that is ultimately received by the target? > > Let's say I have a TextField and I only want to allow typing of capital > letters. That is easy enough to enforce with an event filter.. if the > KeyTyped event doesn't represent a capital letter I can consume it in an > event filter and it won't get to the control. > > But let's say that I want to allow the user to type lowercase letters and > have them appear in uppercase. I don't ever want the text property of the > TextField to hold a lowercase character. Can that be done? > > There are no public constructors for KeyEvents, Are we looking at the same Javadoc? http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/KeyEvent.html#KeyEvent-javafx.event.EventType-java.lang.String-java.lang.String-javafx.scene.input.KeyCode-boolean-boolean-boolean-boolean- > and the fields are > immutable. So it doesn't seem like I can change the event that is > delivered to the target. (What are the copyFor(...) methods on Event used > for?) You don't need to worry about the copyFor methods, AFAIK they are used only by the event dispatching mechanism. I think you need to implement them if you define your own event type. > > I suppose the 8u40 support for formatted fields is what should be used for > my example, but the idea of tweaking the events before they are delivered > to an event handler, or synthesizing a new event is more general. Is it > possible? > > Scott 1. So I think that you can proceed with what you have in mind: consume an event and create and fire a new one (with Event.fireEvent(target, event)), but I am afraid that is going to mess the order of events. Suppose you type JavaFX *really* quickly (or when the UI thread is busy with something else). IMO you end up with is JFXAVA instead of JAVAFX. 2. You could instead consume the event in the event filter and handle it properly yourself, i.e. call textField.replaceSelection() and such. (Not very nice, I know, I would not like reproducing TextField's behavior.) 3. I understand that you don't want some property to ever hold an invalid value, but does it have to be the textProperty of the textfield? If you set up your data flow like this: ObservableValue upper = EasyBind.map(textField.textProperty(), String::toUpperCase) upper.addListener((obs, oldVal, newVal) -> textField.setText(newVal)); And then use `upper` wherever you used textField.textProperty() before, the rest of your code will never observe any lowercase characters. 4. Your idea of tweaking an event on its route is interesting, though. Let's see if other people have some opinion about that. Regards, Tomas From swpalmer at gmail.com Sat Feb 7 01:45:00 2015 From: swpalmer at gmail.com (Scott Palmer) Date: Fri, 6 Feb 2015 20:45:00 -0500 Subject: Event Filtering In-Reply-To: References: Message-ID: <085A20A3-9F66-45B3-A05E-1FBFAF247911@gmail.com> > On Feb 6, 2015, at 8:21 PM, Tomas Mikula wrote: > >> On Fri, Feb 6, 2015 at 7:33 PM, Scott Palmer wrote: >> Is it possible to modify the event in an event filter or otherwise tweak >> the event that is ultimately received by the target? >> >> >> >> There are no public constructors for KeyEvents, > > Are we looking at the same Javadoc? > http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/KeyEvent.html#KeyEvent-javafx.event.EventType-java.lang.String-java.lang.String-javafx.scene.input.KeyCode-boolean-boolean-boolean-boolean- > No. :-) I wanted to do this originally with Java 7 The JavaFX 2.2 docs do not list any constructors. >> >> I suppose the 8u40 support for formatted fields is what should be used for >> my example, but the idea of tweaking the events before they are delivered >> to an event handler, or synthesizing a new event is more general. Is it >> possible? >> >> Scott > > 1. So I think that you can proceed with what you have in mind: consume > an event and create and fire a new one (with Event.fireEvent(target, > event)), but I am afraid that is going to mess the order of events. > Suppose you type JavaFX *really* quickly (or when the UI thread is > busy with something else). IMO you end up with is JFXAVA instead of > JAVAFX. Yeah that would be a problem. I suppose I could be extra clever and remember and consume the 'F' and 'X' events in my filter and then fire new ones after I see my synthesized event come through. This is starting to smell though. > > 2. You could instead consume the event in the event filter and handle > it properly yourself, i.e. call textField.replaceSelection() and such. > (Not very nice, I know, I would not like reproducing TextField's > behavior.) Agreed. > > 3. I understand that you don't want some property to ever hold an > invalid value, but does it have to be the textProperty of the > textfield? It just makes things easier to use without the intermediate property and temporary lowercase state on the textProperty, but yes that is one workaround. > If you set up your data flow like this: > > ObservableValue upper = EasyBind.map(textField.textProperty(), > String::toUpperCase) > upper.addListener((obs, oldVal, newVal) -> textField.setText(newVal)); > > And then use `upper` wherever you used textField.textProperty() > before, the rest of your code will never observe any lowercase > characters. > > 4. Your idea of tweaking an event on its route is interesting, though. > Let's see if other people have some opinion about that. Perhaps a new kind of filter could simply return an event if it is meant to be passed on, or return null to prevent it from going any further. Then I would just return a different event than the one that was passed in if I needed to tweak it. Perhaps returning an array of events would be more appropriate, then one event could cause many downstream events. Scott From tomas.mikula at gmail.com Sat Feb 7 16:36:48 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Sat, 7 Feb 2015 11:36:48 -0500 Subject: Event Filtering In-Reply-To: <085A20A3-9F66-45B3-A05E-1FBFAF247911@gmail.com> References: <085A20A3-9F66-45B3-A05E-1FBFAF247911@gmail.com> Message-ID: On Fri, Feb 6, 2015 at 8:45 PM, Scott Palmer wrote: > >> On Feb 6, 2015, at 8:21 PM, Tomas Mikula wrote: >> >>> On Fri, Feb 6, 2015 at 7:33 PM, Scott Palmer wrote: >>> Is it possible to modify the event in an event filter or otherwise tweak >>> the event that is ultimately received by the target? >>> >>> > >>> >>> There are no public constructors for KeyEvents, >> >> Are we looking at the same Javadoc? >> http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/KeyEvent.html#KeyEvent-javafx.event.EventType-java.lang.String-java.lang.String-javafx.scene.input.KeyCode-boolean-boolean-boolean-boolean- >> > > No. :-) > I wanted to do this originally with Java 7 > The JavaFX 2.2 docs do not list any constructors. > >>> >>> I suppose the 8u40 support for formatted fields is what should be used for >>> my example, but the idea of tweaking the events before they are delivered >>> to an event handler, or synthesizing a new event is more general. Is it >>> possible? >>> >>> Scott >> >> 1. So I think that you can proceed with what you have in mind: consume >> an event and create and fire a new one (with Event.fireEvent(target, >> event)), but I am afraid that is going to mess the order of events. >> Suppose you type JavaFX *really* quickly (or when the UI thread is >> busy with something else). IMO you end up with is JFXAVA instead of >> JAVAFX. > > Yeah that would be a problem. I suppose I could be extra clever and remember and consume the 'F' and 'X' events in my filter and then fire new ones after I see my synthesized event come through. > This is starting to smell though. > >> >> 2. You could instead consume the event in the event filter and handle >> it properly yourself, i.e. call textField.replaceSelection() and such. >> (Not very nice, I know, I would not like reproducing TextField's >> behavior.) > > Agreed. > >> >> 3. I understand that you don't want some property to ever hold an >> invalid value, but does it have to be the textProperty of the >> textfield? > > It just makes things easier to use without the intermediate property and temporary lowercase state on the textProperty, but yes that is one workaround. > >> If you set up your data flow like this: >> >> ObservableValue upper = EasyBind.map(textField.textProperty(), >> String::toUpperCase) >> upper.addListener((obs, oldVal, newVal) -> textField.setText(newVal)); >> >> And then use `upper` wherever you used textField.textProperty() >> before, the rest of your code will never observe any lowercase >> characters. >> >> 4. Your idea of tweaking an event on its route is interesting, though. >> Let's see if other people have some opinion about that. > > Perhaps a new kind of filter could simply return an event if it is meant to be passed on, or return null to prevent it from going any further. Then I would just return a different event than the one that was passed in if I needed to tweak it. Makes sense to me. I like this better than the side-effecting consume() method. Better yet, return Optional. > Perhaps returning an array of events would be more appropriate, then one event could cause many downstream events. I am not so sure about this. What use case do you have in mind? Tomas > > > Scott From swpalmer at gmail.com Sat Feb 7 16:57:23 2015 From: swpalmer at gmail.com (Scott Palmer) Date: Sat, 7 Feb 2015 11:57:23 -0500 Subject: Event Filtering In-Reply-To: References: <085A20A3-9F66-45B3-A05E-1FBFAF247911@gmail.com> Message-ID: > On Feb 7, 2015, at 11:36 AM, Tomas Mikula wrote: > >> On Fri, Feb 6, 2015 at 8:45 PM, Scott Palmer wrote: >> >>>> On Feb 6, 2015, at 8:21 PM, Tomas Mikula wrote: >>>> >>>> On Fri, Feb 6, 2015 at 7:33 PM, Scott Palmer wrote: >>>> Is it possible to modify the event in an event filter or otherwise tweak >>>> the event that is ultimately received by the target? >>>> >>>> >> >>>> >>>> There are no public constructors for KeyEvents, >>> >>> Are we looking at the same Javadoc? >>> http://docs.oracle.com/javase/8/javafx/api/javafx/scene/input/KeyEvent.html#KeyEvent-javafx.event.EventType-java.lang.String-java.lang.String-javafx.scene.input.KeyCode-boolean-boolean-boolean-boolean- >> >> No. :-) >> I wanted to do this originally with Java 7 >> The JavaFX 2.2 docs do not list any constructors. >> >>>> >>>> I suppose the 8u40 support for formatted fields is what should be used for >>>> my example, but the idea of tweaking the events before they are delivered >>>> to an event handler, or synthesizing a new event is more general. Is it >>>> possible? >>>> >>>> Scott >>> >>> 1. So I think that you can proceed with what you have in mind: consume >>> an event and create and fire a new one (with Event.fireEvent(target, >>> event)), but I am afraid that is going to mess the order of events. >>> Suppose you type JavaFX *really* quickly (or when the UI thread is >>> busy with something else). IMO you end up with is JFXAVA instead of >>> JAVAFX. >> >> Yeah that would be a problem. I suppose I could be extra clever and remember and consume the 'F' and 'X' events in my filter and then fire new ones after I see my synthesized event come through. >> This is starting to smell though. >> >>> >>> 2. You could instead consume the event in the event filter and handle >>> it properly yourself, i.e. call textField.replaceSelection() and such. >>> (Not very nice, I know, I would not like reproducing TextField's >>> behavior.) >> >> Agreed. >> >>> >>> 3. I understand that you don't want some property to ever hold an >>> invalid value, but does it have to be the textProperty of the >>> textfield? >> >> It just makes things easier to use without the intermediate property and temporary lowercase state on the textProperty, but yes that is one workaround. >> >>> If you set up your data flow like this: >>> >>> ObservableValue upper = EasyBind.map(textField.textProperty(), >>> String::toUpperCase) >>> upper.addListener((obs, oldVal, newVal) -> textField.setText(newVal)); >>> >>> And then use `upper` wherever you used textField.textProperty() >>> before, the rest of your code will never observe any lowercase >>> characters. >>> >>> 4. Your idea of tweaking an event on its route is interesting, though. >>> Let's see if other people have some opinion about that. >> >> Perhaps a new kind of filter could simply return an event if it is meant to be passed on, or return null to prevent it from going any further. Then I would just return a different event than the one that was passed in if I needed to tweak it. > > Makes sense to me. I like this better than the side-effecting > consume() method. Better yet, return Optional. > >> Perhaps returning an array of events would be more appropriate, then one event could cause many downstream events. > > I am not so sure about this. What use case do you have in mind? Mostly just thinking out loud. E.g. generating multiple key events from a single one to build a sort of macro. I'm not convinced either, but I thought I would throw it out there for discussion. Scott From tomas.mikula at gmail.com Sun Feb 8 23:44:20 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Sun, 8 Feb 2015 18:44:20 -0500 Subject: How to "apply" skin? Message-ID: Hello list, after adding a node to the scene graph, how do I "apply" the skin to it, in case it is a Control? Something like an equivalent of applyCss() for skins. My use case is this: I add a node to the scene, and want to know its preferred width. So I call node.applyCss() to make sure CSS is applied, and then call node.prefWidth(-1). But for a (non-empty) Label, this still returns 0.0, presumably because there is no skin yet. I don't want to set a concrete skin using node.setSkin(node.createDefaultSkin()), because I want the node to have whatever skin would be applied to it, which could be different from the default skin. Thanks, Tomas From tomas.mikula at gmail.com Sun Feb 8 23:51:21 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Sun, 8 Feb 2015 18:51:21 -0500 Subject: How to "apply" skin? In-Reply-To: References: Message-ID: Actually, I want skins to be applied in the whole sub-tree of a node. The node itself may not be a control, but it may contain controls. On Sun, Feb 8, 2015 at 6:44 PM, Tomas Mikula wrote: > Hello list, > > after adding a node to the scene graph, how do I "apply" the skin to > it, in case it is a Control? Something like an equivalent of > applyCss() for skins. > > My use case is this: > I add a node to the scene, and want to know its preferred width. So I > call node.applyCss() to make sure CSS is applied, and then call > node.prefWidth(-1). But for a (non-empty) Label, this still returns > 0.0, presumably because there is no skin yet. > > I don't want to set a concrete skin using > node.setSkin(node.createDefaultSkin()), because I want the node to > have whatever skin would be applied to it, which could be different > from the default skin. > > Thanks, > Tomas From lehmann at media-interactive.de Mon Feb 9 09:43:12 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Mon, 9 Feb 2015 10:43:12 +0100 Subject: How to "apply" skin? In-Reply-To: References: Message-ID: <54D88130.3040302@media-interactive.de> Hi Tomas, I think the expected way of doing this is to defer the code which requires the control width until normal layout passes come across it. Or maybe not only defer that code but actually move it to layouting methods. Werner On 09.02.2015 00:51, Tomas Mikula wrote: > Actually, I want skins to be applied in the whole sub-tree of a node. > The node itself may not be a control, but it may contain controls. From lehmann at media-interactive.de Mon Feb 9 09:47:24 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Mon, 9 Feb 2015 10:47:24 +0100 Subject: Event Filtering In-Reply-To: References: Message-ID: <54D8822C.1030606@media-interactive.de> Hi Scott, at least in Java 8 you can override TextInputControl#replaceText and/or TextInputControl#replaceSelection to convert lowercase into uppercase. I have used it for exactly this purpose. Werner On 07.02.2015 01:33, Scott Palmer wrote: > But let's say that I want to allow the user to type lowercase letters and > have them appear in uppercase. I don't ever want the text property of the > TextField to hold a lowercase character. Can that be done? From swpalmer at gmail.com Mon Feb 9 11:44:11 2015 From: swpalmer at gmail.com (Scott Palmer) Date: Mon, 9 Feb 2015 06:44:11 -0500 Subject: Event Filtering In-Reply-To: <54D8822C.1030606@media-interactive.de> References: <54D8822C.1030606@media-interactive.de> Message-ID: When the actual control is an editable combobox it gets more complicated. That is the case that prompted my original message. Scott > On Feb 9, 2015, at 4:47 AM, Werner Lehmann wrote: > > Hi Scott, > > at least in Java 8 you can override TextInputControl#replaceText and/or TextInputControl#replaceSelection to convert lowercase into uppercase. I have used it for exactly this purpose. > > Werner > >> On 07.02.2015 01:33, Scott Palmer wrote: >> But let's say that I want to allow the user to type lowercase letters and >> have them appear in uppercase. I don't ever want the text property of the >> TextField to hold a lowercase character. Can that be done? From lehmann at media-interactive.de Mon Feb 9 11:54:22 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Mon, 9 Feb 2015 12:54:22 +0100 Subject: Event Filtering In-Reply-To: References: <54D8822C.1030606@media-interactive.de> Message-ID: <54D89FEE.1010409@media-interactive.de> I see. Looks as if the textfield in a combobox cannot be subclassed because of "final" restrictions. As a last resort, you could use your own textfield as a buttoncell - which would of course skip over all special handling for editable comboboxes in the skin... Werner On 09.02.2015 12:44, Scott Palmer wrote: > When the actual control is an editable combobox it gets more > complicated. That is the case that prompted my original message. From tom.schindl at bestsolution.at Mon Feb 9 14:43:14 2015 From: tom.schindl at bestsolution.at (Tom Schindl) Date: Mon, 09 Feb 2015 15:43:14 +0100 Subject: Warning message when shuting down JavaFX app on OS-X Message-ID: <54D8C782.3090409@bestsolution.at> Hi, If I remember correctly the bug leading to > Java has been detached already, but someone is still trying to use it at -[GlassRunnable run]:/HUDSON/workspace/8u40/label/macosx-universal-30/rt/modules/graphics/src/main/native-glass/mac/GlassApplication.m:93 > Java has been detached already, but someone is still trying to use it at -[GlassRunnable dealloc]:/HUDSON/workspace/8u40/label/macosx-universal-30/rt/modules/graphics/src/main/native-glass/mac/GlassApplication.m:107 should have been fixed already but I still see this sometimes when running on u40 b23. Tom -- Thomas Schindl, CTO BestSolution.at EDV Systemhaus GmbH Eduard-Bodem-Gasse 5-7, A-6020 Innsbruck http://www.bestsolution.at/ Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck From kevin.rushforth at oracle.com Mon Feb 9 14:58:22 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 09 Feb 2015 06:58:22 -0800 Subject: Warning message when shuting down JavaFX app on OS-X In-Reply-To: <54D8C782.3090409@bestsolution.at> References: <54D8C782.3090409@bestsolution.at> Message-ID: <54D8CB0E.6050800@oracle.com> There was a similar bug fixed in 8u40, but you are right that this still happens some of the time. It is tracked by: https://javafx-jira.kenai.com/browse/RT-39797 -- Kevin Tom Schindl wrote: > Hi, > > If I remember correctly the bug leading to > > >> Java has been detached already, but someone is still trying to use it at -[GlassRunnable run]:/HUDSON/workspace/8u40/label/macosx-universal-30/rt/modules/graphics/src/main/native-glass/mac/GlassApplication.m:93 >> Java has been detached already, but someone is still trying to use it at -[GlassRunnable dealloc]:/HUDSON/workspace/8u40/label/macosx-universal-30/rt/modules/graphics/src/main/native-glass/mac/GlassApplication.m:107 >> > > should have been fixed already but I still see this sometimes when > running on u40 b23. > > Tom > > From tomas.mikula at gmail.com Mon Feb 9 15:04:56 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Mon, 9 Feb 2015 10:04:56 -0500 Subject: How to "apply" skin? In-Reply-To: <54D88130.3040302@media-interactive.de> References: <54D88130.3040302@media-interactive.de> Message-ID: Hi Werner, the problem is that I am already doing it in layout: only in the layout process of the parent node do I determine that I need to add some more child nodes. So after adding them, I would like to have them properly laid out in the current layout pass. Tomas On Mon, Feb 9, 2015 at 4:43 AM, Werner Lehmann wrote: > Hi Tomas, > > I think the expected way of doing this is to defer the code which requires > the control width until normal layout passes come across it. Or maybe not > only defer that code but actually move it to layouting methods. > > Werner > > > On 09.02.2015 00:51, Tomas Mikula wrote: >> >> Actually, I want skins to be applied in the whole sub-tree of a node. >> The node itself may not be a control, but it may contain controls. From kevin.rushforth at oracle.com Mon Feb 9 20:55:15 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 09 Feb 2015 12:55:15 -0800 Subject: 8u-dev unlocked following this week's sanity testing Message-ID: <54D91EB3.7020601@oracle.com> From morris.meyer at oracle.com Mon Feb 9 21:01:03 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Mon, 09 Feb 2015 16:01:03 -0500 Subject: [8u-dev] Code Review Request: RT-39855: StageStyle.UNIFIED not working on OSX 10.9.5 Message-ID: <54D9200F.9090306@oracle.com> Kevin, David and Chien, Could you review my fix for this regression? I have tested this on Mac OSX 10.10.3 (pre-release). Thanks much. --morris JIRA - https://javafx-jira.kenai.com/browse/RT-39855 WEBREV - http://cr.openjdk.java.net/~morris/RT-39855 From kevin.rushforth at oracle.com Tue Feb 10 00:46:26 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 09 Feb 2015 16:46:26 -0800 Subject: [8u60] review request: RT-40007: Move com.sun.webkit.dom.JSObject to web module to avoid split package Message-ID: <54D954E2.9000406@oracle.com> Anton, Please review the following: https://javafx-jira.kenai.com/browse/RT-40007 http://cr.openjdk.java.net/~kcr/RT-40007/webrev.01/ Details are in JIRA. I have tested a full build with and without "-PCOMPILE_WEBKIT=true". Thanks. -- Kevin From swpalmer at gmail.com Tue Feb 10 15:15:00 2015 From: swpalmer at gmail.com (Scott Palmer) Date: Tue, 10 Feb 2015 10:15:00 -0500 Subject: Selection Events v. Focus Events - order is broken in JavaFX 8? Message-ID: I have a custom field (my own formatted field done in JavaFX 2.2) bound to a property of the selected row in a TableView. My control commits an edit on focus lost. This works on JavaFX 2.2 but fails on JavaFX 8. After a bit of debugging I discovered why. The way to reproduce the problem was to type something into the field and then select a different row in the table. With JavaFX 2.2 the edit is committed and then the control is populated with the data from the new selection. With JavaFX 8, the selection change event happens prior to the focus lost event, so my control's data is replaced without being committed. This smells like a rather serious bug in JavaFX 8. The TableView selection should not change as the result of a mouse click prior to the TableView getting the focus (and thus my control losing the focus and committing the edit to the selected item before the selection changes). Do you agree that this is broken behavior? Do you have an idea of how to work around it? Regards, Scott From tomas.mikula at gmail.com Tue Feb 10 15:47:57 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Tue, 10 Feb 2015 10:47:57 -0500 Subject: Selection Events v. Focus Events - order is broken in JavaFX 8? In-Reply-To: References: Message-ID: Hi Scott, whether that behavior is a bug in JavaFX 8 or not, why not commit on focus lost *or* selection change? Less assumptions means more robust code. Regards, Tomas On Tue, Feb 10, 2015 at 10:15 AM, Scott Palmer wrote: > I have a custom field (my own formatted field done in JavaFX 2.2) bound to > a property of the selected row in a TableView. My control commits an edit > on focus lost. > > This works on JavaFX 2.2 but fails on JavaFX 8. After a bit of debugging I > discovered why. The way to reproduce the problem was to type something into > the field and then select a different row in the table. With JavaFX 2.2 > the edit is committed and then the control is populated with the data from > the new selection. With JavaFX 8, the selection change event happens prior > to the focus lost event, so my control's data is replaced without being > committed. > > This smells like a rather serious bug in JavaFX 8. The TableView selection > should not change as the result of a mouse click prior to the TableView > getting the focus (and thus my control losing the focus and committing the > edit to the selected item before the selection changes). > > Do you agree that this is broken behavior? > Do you have an idea of how to work around it? > > Regards, > > Scott From swpalmer at gmail.com Tue Feb 10 16:11:13 2015 From: swpalmer at gmail.com (Scott Palmer) Date: Tue, 10 Feb 2015 11:11:13 -0500 Subject: Selection Events v. Focus Events - order is broken in JavaFX 8? In-Reply-To: References: Message-ID: When I say "commit" I mean my formatted field sets it's 'value' property based on the conversion from the 'text'. A binding to its value property takes care of updating the table item. The field itself has no business knowing about the table selection changes. For now I'm subclassing the control so I can force a commit in my selection listener before the control gets bound to the newly selected item. So basically I am working around it as you suggest. But the control is intended to be more generic. It only knows to update its value property on focus lost or enter pressed. Scott On Tue, Feb 10, 2015 at 10:47 AM, Tomas Mikula wrote: > Hi Scott, > > whether that behavior is a bug in JavaFX 8 or not, why not commit on > focus lost *or* selection change? Less assumptions means more robust > code. > > Regards, > Tomas > > On Tue, Feb 10, 2015 at 10:15 AM, Scott Palmer wrote: > > I have a custom field (my own formatted field done in JavaFX 2.2) bound > to > > a property of the selected row in a TableView. My control commits an edit > > on focus lost. > > > > This works on JavaFX 2.2 but fails on JavaFX 8. After a bit of > debugging I > > discovered why. The way to reproduce the problem was to type something > into > > the field and then select a different row in the table. With JavaFX 2.2 > > the edit is committed and then the control is populated with the data > from > > the new selection. With JavaFX 8, the selection change event happens > prior > > to the focus lost event, so my control's data is replaced without being > > committed. > > > > This smells like a rather serious bug in JavaFX 8. The TableView > selection > > should not change as the result of a mouse click prior to the TableView > > getting the focus (and thus my control losing the focus and committing > the > > edit to the selected item before the selection changes). > > > > Do you agree that this is broken behavior? > > Do you have an idea of how to work around it? > > > > Regards, > > > > Scott > From kevin.rushforth at oracle.com Tue Feb 10 19:04:08 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Tue, 10 Feb 2015 11:04:08 -0800 Subject: [8u60] review request: RT-39826: Replace sun.misc.BASE64* with java.util.Base64 Message-ID: <54DA5628.4000805@oracle.com> Anton, Please review the web changes for the following: https://javafx-jira.kenai.com/browse/RT-39826 http://cr.openjdk.java.net/~kcr/RT-39826/webrev.00/ Details are in the JIRA. -- Kevin From morris.meyer at oracle.com Tue Feb 10 21:00:40 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Tue, 10 Feb 2015 16:00:40 -0500 Subject: [8u-dev] Review Request: RT-39869: IndexOutOfBoundsException with Native Menus in Mac Message-ID: <54DA7178.6010901@oracle.com> Kevin and David, Could you please take a look at this fix to RT-39869? I added some checking to avoid the IOOBE from the native Glass system menus. Thanks, --morris WEBREV - http://cr.openjdk.java.net/~morris/RT-39869.01 JIRA - https://javafx-jira.kenai.com/browse/RT-39869 From kevin.rushforth at oracle.com Wed Feb 11 17:52:09 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Wed, 11 Feb 2015 09:52:09 -0800 Subject: [9] review request: RT-39785: Remove deprecated builders module from JavaFX runtime Message-ID: <54DB96C9.5090607@oracle.com> Jonathan, Please review the following change for FX 9 to remove the deprecated builders [1]. https://javafx-jira.kenai.com/browse/RT-39785 http://cr.openjdk.java.net/~kcr/RT-39785/webrev.01/ Note that this fix will go directly into 9-dev and will *not* go into 8u making it the first substantive difference between 9 and 8u, although the bulk of the diffs are limited to one class in the fxml module, so it is not likely to lead to merge conflicts. -- Kevin [1] http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-January/016496.html From morris.meyer at oracle.com Wed Feb 11 23:37:48 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Wed, 11 Feb 2015 18:37:48 -0500 Subject: [8u-dev] Review request: RT-40032: Nested window open causes repeated shortcut key event after close Message-ID: <54DBE7CC.2060403@oracle.com> David and Kevin, Could you review this change? The change set is per the description in JIRA, and has been tested by Nicholas Myers. Thanks much. --morris JIRA - https://javafx-jira.kenai.com/browse/RT-40032 WEBREV - http://cr.openjdk.java.net/~morris/RT-40032.01 From johan at lodgon.com Thu Feb 12 14:26:00 2015 From: johan at lodgon.com (Johan Vos) Date: Thu, 12 Feb 2015 15:26:00 +0100 Subject: hidpi support in monocle Message-ID: Hi, Unless I'm missing something, there is no support for HiDPI in Monocle? The staticScreen_getScreens() method in Monocle always calls the Screen constructor with the scale parameter set to 1.0f. It seems to me the scale factor can be retrieved from the NativeScreen, where it would by default return 1.0f. That would allow e.g. the AndroidScreen to call into the native layer and obtain the real scale factor. I can create an issue for this, unless I overlooked something. - Johan From David.Hill at Oracle.com Thu Feb 12 16:00:41 2015 From: David.Hill at Oracle.com (David Hill) Date: Thu, 12 Feb 2015 11:00:41 -0500 Subject: hidpi support in monocle In-Reply-To: References: Message-ID: <54DCCE29.1010007@Oracle.com> On 2/12/15, 9:26 AM, Johan Vos wrote: > Hi, > > Unless I'm missing something, there is no support for HiDPI in Monocle? > The staticScreen_getScreens() method in Monocle always calls the Screen > constructor with the scale parameter set to 1.0f. > > It seems to me the scale factor can be retrieved from the NativeScreen, > where it would by default return 1.0f. > That would allow e.g. the AndroidScreen to call into the native layer and > obtain the real scale factor. > > I can create an issue for this, unless I overlooked something. > > - Johan Go ahead and create an issue, as I think you are not missing anything. Oracle has not encountered a use case with Monocle for this, just like we have not enountered one for screen rotation (though I really did expect to need to do that sooner, rather than later). Fetching the value from NativeScreen sounds right. Dave -- David Hill Java Embedded Development "A man's feet should be planted in his country, but his eyes should survey the world." -- George Santayana (1863 - 1952) From mark.reinhold at oracle.com Thu Feb 12 22:04:45 2015 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Thu, 12 Feb 2015 14:04:45 -0800 (PST) Subject: JEP 239: Update JavaFX/WebView to the Latest Version of WebKit Message-ID: <20150212220445.44B8D4DB47@eggemoggin.niobe.net> New JEP Candidate: http://openjdk.java.net/jeps/239 - Mark From vadim.pakhnushev at oracle.com Fri Feb 13 18:11:14 2015 From: vadim.pakhnushev at oracle.com (Vadim Pakhnushev) Date: Fri, 13 Feb 2015 21:11:14 +0300 Subject: In(Sanity) Testing Mondays Message-ID: <54DE3E42.9060704@oracle.com> Reminder, Monday is our weekly sanity testing. You can find your testing assignment at: https://wiki.openjdk.java.net/display/OpenJFX/Sanity+Testing Also please remember that the repo will be locked from 1am PST until 1pm PST. Happy testing! Thanks, Vadim From morris.meyer at oracle.com Fri Feb 13 20:31:49 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Fri, 13 Feb 2015 15:31:49 -0500 Subject: [8u-dev] Review request: RT-35042: [Ensemble] DatePicker, "Options for locale->Show week numbers" is inconsistent with setting a locale. Message-ID: <54DE5F35.4040406@oracle.com> Kevin, David and Jonathan, Please review my fix to Ensemble8 -> DatePickerApp that correctly maintains the week numbers setting across locale changes. Thanks much. --morris JIRA - https://javafx-jira.kenai.com/browse/RT-35042 WEBREV - http://cr.openjdk.java.net/~morris/RT-35042.01 From tbee at tbee.org Sun Feb 15 18:32:26 2015 From: tbee at tbee.org (Tom Eugelink) Date: Sun, 15 Feb 2015 19:32:26 +0100 Subject: Rotate and Rotate transformation Message-ID: <54E0E63A.4040700@tbee.org> Just to check that I'm seeing this right: - The rotate property of a node can only rotate around the node's center. - The RotateTransition simply manipulates a node's rotate property. So as soon as you have to rotate around any other point except the center, these two classes cannot be used. The alternative is: - Use a Rotate transformation, which allows specifying the rotation center. - Animate that using a Timeline, because that is the easiest way to animatie a transformation. Tom From hastebrot at gmail.com Sun Feb 15 21:59:35 2015 From: hastebrot at gmail.com (Benjamin Gudehus) Date: Sun, 15 Feb 2015 22:59:35 +0100 Subject: Rotate and Rotate transformation In-Reply-To: <54E0E63A.4040700@tbee.org> References: <54E0E63A.4040700@tbee.org> Message-ID: Hi Tom, this seems to be the case. Node's rotate property only accepts x and y coordinates, but not pivotX and pivotY for the rotation center. Interestingly RotateTransition uses the rotate property (in Transition#interpolate()) instead of a Rotate transformation. If you want to specify pivot coordinates, you have to use the Rotate transformation (or the Scale transformation). I transform Rotate and Scale transformation with Timeline; it also provides a stop() method which I needed for a geographical information system. --Benjamin On 2/15/15, Tom Eugelink wrote: > Just to check that I'm seeing this right: > - The rotate property of a node can only rotate around the node's center. > - The RotateTransition simply manipulates a node's rotate property. > > So as soon as you have to rotate around any other point except the center, > these two classes cannot be used. > > The alternative is: > - Use a Rotate transformation, which allows specifying the rotation center. > - Animate that using a Timeline, because that is the easiest way to animatie > a transformation. > > Tom > From james.weaver at oracle.com Mon Feb 16 05:52:33 2015 From: james.weaver at oracle.com (James Weaver) Date: Mon, 16 Feb 2015 00:52:33 -0500 Subject: Rotate and Rotate transformation In-Reply-To: References: <54E0E63A.4040700@tbee.org> Message-ID: <54E185A1.5030104@oracle.com> Tom, For reference, ZenGuitar3D.java has an example of using the Rotate transformation, binding to values changing in a Timeline: https://www.dropbox.com/sh/a6l9ff4346fdaiq/AAC10hi5Jt9XXpdEaOQ_DJY0a?dl=0 Regards, James Weaver On 2/15/15 4:59 PM, Benjamin Gudehus wrote: > Hi Tom, > > this seems to be the case. > > Node's rotate property only accepts x and y coordinates, but not > pivotX and pivotY for the rotation center. Interestingly > RotateTransition uses the rotate property (in > Transition#interpolate()) instead of a Rotate transformation. > > If you want to specify pivot coordinates, you have to use the Rotate > transformation (or the Scale transformation). I transform Rotate and > Scale transformation with Timeline; it also provides a stop() method > which I needed for a geographical information system. > > --Benjamin > > > On 2/15/15, Tom Eugelink wrote: >> Just to check that I'm seeing this right: >> - The rotate property of a node can only rotate around the node's center. >> - The RotateTransition simply manipulates a node's rotate property. >> >> So as soon as you have to rotate around any other point except the center, >> these two classes cannot be used. >> >> The alternative is: >> - Use a Rotate transformation, which allows specifying the rotation center. >> - Animate that using a Timeline, because that is the easiest way to animatie >> a transformation. >> >> Tom >> -- Regards, James Weaver Java Technology Ambassador Oracle Corporation james.weaver at oracle.com Twitter: @JavaFXpert From tbee at tbee.org Mon Feb 16 06:33:47 2015 From: tbee at tbee.org (Tom Eugelink) Date: Mon, 16 Feb 2015 07:33:47 +0100 Subject: Rotate and Rotate transformation In-Reply-To: References: <54E0E63A.4040700@tbee.org> Message-ID: <54E18F4B.4040705@tbee.org> Ok, thanks for confirming. It seemed overkill to roll-in Timeline only to animate a single property; IMHO Timeline is aimed at animation orchestration, so it does not feel right. Adding pivot X & Y to node would make the rotation property much more useful. Tom On 15-2-2015 22:59, Benjamin Gudehus wrote: > Hi Tom, > > this seems to be the case. > > Node's rotate property only accepts x and y coordinates, but not > pivotX and pivotY for the rotation center. Interestingly > RotateTransition uses the rotate property (in > Transition#interpolate()) instead of a Rotate transformation. > > If you want to specify pivot coordinates, you have to use the Rotate > transformation (or the Scale transformation). I transform Rotate and > Scale transformation with Timeline; it also provides a stop() method > which I needed for a geographical information system. > > --Benjamin > > > On 2/15/15, Tom Eugelink wrote: >> Just to check that I'm seeing this right: >> - The rotate property of a node can only rotate around the node's center. >> - The RotateTransition simply manipulates a node's rotate property. >> >> So as soon as you have to rotate around any other point except the center, >> these two classes cannot be used. >> >> The alternative is: >> - Use a Rotate transformation, which allows specifying the rotation center. >> - Animate that using a Timeline, because that is the easiest way to animatie >> a transformation. >> >> Tom >> From irina.latysheva at oracle.com Mon Feb 16 15:01:49 2015 From: irina.latysheva at oracle.com (Irina Latysheva) Date: Mon, 16 Feb 2015 18:01:49 +0300 Subject: [openjfx/8u-dev/tests] Please review fix for RT-39999 Message-ID: <54E2065D.5050608@oracle.com> Anton, Kevin, Could you please review my fix for RT-39999 in openjfx/8u-dev/tests workspace? More details on the update are available in Jira issue: https://javafx-jira.kenai.com/browse/RT-39999 Webrev link: http://cr.openjdk.java.net/~yan/RT-39999/webrev.00/ -- Irina From kevin.rushforth at oracle.com Mon Feb 16 16:22:21 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 16 Feb 2015 08:22:21 -0800 Subject: Rotate and Rotate transformation In-Reply-To: <54E18F4B.4040705@tbee.org> References: <54E0E63A.4040700@tbee.org> <54E18F4B.4040705@tbee.org> Message-ID: <54E2193D.3080708@oracle.com> The following JIRA is tracking the request to provide control over the pivot point: https://javafx-jira.kenai.com/browse/RT-12849 So far it hasn't been a priority, and even though it is currently targeted for 9 it is unassigned and not likely to be done. -- Kevin Tom Eugelink wrote: > Ok, thanks for confirming. It seemed overkill to roll-in Timeline only > to animate a single property; IMHO Timeline is aimed at animation > orchestration, so it does not feel right. Adding pivot X & Y to node > would make the rotation property much more useful. > > Tom > > > On 15-2-2015 22:59, Benjamin Gudehus wrote: >> Hi Tom, >> >> this seems to be the case. >> >> Node's rotate property only accepts x and y coordinates, but not >> pivotX and pivotY for the rotation center. Interestingly >> RotateTransition uses the rotate property (in >> Transition#interpolate()) instead of a Rotate transformation. >> >> If you want to specify pivot coordinates, you have to use the Rotate >> transformation (or the Scale transformation). I transform Rotate and >> Scale transformation with Timeline; it also provides a stop() method >> which I needed for a geographical information system. >> >> --Benjamin >> >> >> On 2/15/15, Tom Eugelink wrote: >>> Just to check that I'm seeing this right: >>> - The rotate property of a node can only rotate around the node's >>> center. >>> - The RotateTransition simply manipulates a node's rotate property. >>> >>> So as soon as you have to rotate around any other point except the >>> center, >>> these two classes cannot be used. >>> >>> The alternative is: >>> - Use a Rotate transformation, which allows specifying the rotation >>> center. >>> - Animate that using a Timeline, because that is the easiest way to >>> animatie >>> a transformation. >>> >>> Tom >>> > From kevin.rushforth at oracle.com Mon Feb 16 21:06:29 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 16 Feb 2015 13:06:29 -0800 Subject: 8u-dev unlocked following this week's sanity testing Message-ID: <54E25BD5.5060206@oracle.com> From morris.meyer at oracle.com Mon Feb 16 22:02:57 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Mon, 16 Feb 2015 17:02:57 -0500 Subject: [8u60] Review request: RT-40008: Ensemble8 points to old URL for javadoc Message-ID: <54E26911.2@oracle.com> Kevin, Jonathan and David, Could you please review these changes to Ensemble8 to update the FX API docs urls to point to their proper places? Thanks much, --morris WEBREV - http://cr.openjdk.java.net/~morris/RT-40008.01/ JIRA - https://javafx-jira.kenai.com/browse/RT-40008 From tbee at tbee.org Tue Feb 17 13:02:51 2015 From: tbee at tbee.org (Tom Eugelink) Date: Tue, 17 Feb 2015 14:02:51 +0100 Subject: Event when CSS is applied Message-ID: <54E33BFB.9030105@tbee.org> I have a skin (of a control) that centers a Text node. This Text node can be styled via CSS, so this styling is a factor when centering. because larger font means wider text. The centering works perfectly, the only problem is figuring out when to center the node. At the moment I'm centering the node on every layoutChildren call of the skin, but this is way to often, because after applying the CSS chances are very low that the node will need to be repositioned. Basically I would like to be informed when the styling of a node has been applied or changed. Is there some place that can provide this information? Tom From hastebrot at gmail.com Tue Feb 17 13:24:38 2015 From: hastebrot at gmail.com (Benjamin Gudehus) Date: Tue, 17 Feb 2015 14:24:38 +0100 Subject: Event when CSS is applied In-Reply-To: <54E33BFB.9030105@tbee.org> References: <54E33BFB.9030105@tbee.org> Message-ID: >Basically I would like to be informed when the styling of a node has been applied or changed. There are isNeedsLayout() and needsLayoutProperty() and they might give Node-based information whether the the layout and thus the styling was applied. I guess this might be true, since doCSSPass() is called before doLayoutPass() in the JavaFX thread, but could be wrong on this regard. As another (more fuzzy) option you could place a custom Logger into PulseLogger and handle calls to the newPhase() method. The problem is, that it only gives Scene-based information, i.e. you don't see which Node was processed, so it might be unreliable information. I use a custom PulseLogger for performance tests. --Benjamin On 2/17/15, Tom Eugelink wrote: > I have a skin (of a control) that centers a Text node. This Text node can be > styled via CSS, so this styling is a factor when centering. because larger > font means wider text. > > The centering works perfectly, the only problem is figuring out when to > center the node. At the moment I'm centering the node on every > layoutChildren call of the skin, but this is way to often, because after > applying the CSS chances are very low that the node will need to be > repositioned. > > Basically I would like to be informed when the styling of a node has been > applied or changed. Is there some place that can provide this information? > > > Tom > From david.grieve at oracle.com Tue Feb 17 13:50:43 2015 From: david.grieve at oracle.com (David Grieve) Date: Tue, 17 Feb 2015 08:50:43 -0500 Subject: Event when CSS is applied In-Reply-To: <54E33BFB.9030105@tbee.org> References: <54E33BFB.9030105@tbee.org> Message-ID: <54E34733.9040001@oracle.com> On 2/17/15 8:02 AM, Tom Eugelink wrote: > I have a skin (of a control) that centers a Text node. This Text node > can be styled via CSS, so this styling is a factor when centering. > because larger font means wider text. > > The centering works perfectly, the only problem is figuring out when > to center the node. At the moment I'm centering the node on every > layoutChildren call of the skin, but this is way to often, because > after applying the CSS chances are very low that the node will need to > be repositioned. > > Basically I would like to be informed when the styling of a node has > been applied or changed. Is there some place that can provide this > information? > Not in general, no. But you can add a listener to a property that is styled by CSS and react to the change. You might add a listener to the Text node's fontProperty, for example. Clearly this isn't an all-purpose solution. Another approach is to hold onto the bounds (or maybe just the pref width and height) of the child node. If the old bounds doesn't equal the new bounds, then recenter. From tbee at tbee.org Tue Feb 17 15:06:27 2015 From: tbee at tbee.org (Tom Eugelink) Date: Tue, 17 Feb 2015 16:06:27 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> Message-ID: <54E358F3.5000409@tbee.org> needsLayoutProperty() is not available on Text, and I figure that on the container it in the end will call layoutChildren, which I'm using already. On 17-2-2015 14:24, Benjamin Gudehus wrote: >> Basically I would like to be informed when the styling of a node has been applied or changed. > There are isNeedsLayout() and needsLayoutProperty() and they might > give Node-based information whether the the layout and thus the > styling was applied. I guess this might be true, since doCSSPass() is > called before doLayoutPass() in the JavaFX thread, but could be wrong > on this regard. > > As another (more fuzzy) option you could place a custom Logger into > PulseLogger and handle calls to the newPhase() method. The problem is, > that it only gives Scene-based information, i.e. you don't see which > Node was processed, so it might be unreliable information. I use a > custom PulseLogger for performance tests. > > --Benjamin > > > On 2/17/15, Tom Eugelink wrote: >> I have a skin (of a control) that centers a Text node. This Text node can be >> styled via CSS, so this styling is a factor when centering. because larger >> font means wider text. >> >> The centering works perfectly, the only problem is figuring out when to >> center the node. At the moment I'm centering the node on every >> layoutChildren call of the skin, but this is way to often, because after >> applying the CSS chances are very low that the node will need to be >> repositioned. >> >> Basically I would like to be informed when the styling of a node has been >> applied or changed. Is there some place that can provide this information? >> >> >> Tom >> From tbee at tbee.org Tue Feb 17 15:14:15 2015 From: tbee at tbee.org (Tom Eugelink) Date: Tue, 17 Feb 2015 16:14:15 +0100 Subject: Event when CSS is applied In-Reply-To: <54E34733.9040001@oracle.com> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> Message-ID: <54E35AC7.10902@tbee.org> Registering to fontProperty works, but potentially requires a lot of listeners on every property that may affect the size, like effect, scale, etc. So I'm leaving it in layoutChildren for now; better once to many than not often enough. Would adding such an event be a big change? On 17-2-2015 14:50, David Grieve wrote: > > On 2/17/15 8:02 AM, Tom Eugelink wrote: >> I have a skin (of a control) that centers a Text node. This Text node can be styled via CSS, so this styling is a factor when centering. because larger font means wider text. >> >> The centering works perfectly, the only problem is figuring out when to center the node. At the moment I'm centering the node on every layoutChildren call of the skin, but this is way to often, because after applying the CSS chances are very low that the node will need to be repositioned. >> >> Basically I would like to be informed when the styling of a node has been applied or changed. Is there some place that can provide this information? >> > Not in general, no. But you can add a listener to a property that is styled by CSS and react to the change. You might add a listener to the Text node's fontProperty, for example. Clearly this isn't an all-purpose solution. Another approach is to hold onto the bounds (or maybe just the pref width and height) of the child node. If the old bounds doesn't equal the new bounds, then recenter. From tomas.mikula at gmail.com Tue Feb 17 18:05:35 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Tue, 17 Feb 2015 13:05:35 -0500 Subject: Event when CSS is applied In-Reply-To: <54E35AC7.10902@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> Message-ID: Hi Tom, suppose you have such an event and can tell whether CSS of your Text has changed. But is changed CSS the only time you want to re-position the Text? I guess you also need to re-position it when the size of the parent changes. I imagine the logic for determining whether you need to re-position the Text or not can get quite complicated. Why is it a problem that you reposition the Text too often? I imagine, and someone please correct me if I'm wrong, that when you ask for text.prefWidth(-1), you get a cached prefWidth from the last call, if no properties of Text have changed since the last call to prefWidth. I also suppose, and again correct me if I'm wrong, that if you resizeRelocate the Text to the exact same position and size as it already has, it does not incur any additional operations down the road compared to not calling resizeRelocate at all. So my conclusion is that repositioning the Text to the same place is not more expensive than checking whether the Text needs to be repositioned. Regards, Tomas On Tue, Feb 17, 2015 at 10:14 AM, Tom Eugelink wrote: > Registering to fontProperty works, but potentially requires a lot of > listeners on every property that may affect the size, like effect, scale, > etc. So I'm leaving it in layoutChildren for now; better once to many than > not often enough. > > Would adding such an event be a big change? > > > > > On 17-2-2015 14:50, David Grieve wrote: >> >> >> On 2/17/15 8:02 AM, Tom Eugelink wrote: >>> >>> I have a skin (of a control) that centers a Text node. This Text node can >>> be styled via CSS, so this styling is a factor when centering. because >>> larger font means wider text. >>> >>> The centering works perfectly, the only problem is figuring out when to >>> center the node. At the moment I'm centering the node on every >>> layoutChildren call of the skin, but this is way to often, because after >>> applying the CSS chances are very low that the node will need to be >>> repositioned. >>> >>> Basically I would like to be informed when the styling of a node has been >>> applied or changed. Is there some place that can provide this information? >>> >> Not in general, no. But you can add a listener to a property that is >> styled by CSS and react to the change. You might add a listener to the Text >> node's fontProperty, for example. Clearly this isn't an all-purpose >> solution. Another approach is to hold onto the bounds (or maybe just the >> pref width and height) of the child node. If the old bounds doesn't equal >> the new bounds, then recenter. > > From tbee at tbee.org Tue Feb 17 18:30:00 2015 From: tbee at tbee.org (Tom Eugelink) Date: Tue, 17 Feb 2015 19:30:00 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> Message-ID: <54E388A8.8040801@tbee.org> The control is a codewise polish up one of Gerrit's gauges (with permission!) and pulled into JFXtras (with tests and all). For an idea on what we are talking about: https://www.youtube.com/watch?v=RH5X1uBu1d8 The process of centering the Text in that circle is a bit more complex. 1. The value may vary between a min and max value. 2. I want the Text to automatically utilize the maximum available space, but not change size when a longer or shorter text is shown. To do this I have two additional Text nodes that have the same styling as the Text node (so these are on the scene, but not visible, otherwise CSS is not applied). These two text nodes get the maximum and minimum possible value set. Then on these two some pythagoras is applied and in that way one can determine the scale factor so that the value will never be rendered outside of the circle. Then the actual to-be-rendered value can be placed into the Text node and positioned in the centre of the circle. The problem is that a lot of these calculations depend on the CSS styling. What font is set? Bold or not? So I can only do these calculcation after the CSS has been applied. This unfortunately is not yet the case when the skin is instantiated. This means that if I do not used the layoutChildren, the initial presentation is totally off, untill the first min/max/value is set. So I would like to know when the CSS is applied to do the initial calculations. After that only when CSS, min or max changes is a recalculation required. Tom On 17-2-2015 19:05, Tomas Mikula wrote: > Hi Tom, > > suppose you have such an event and can tell whether CSS of your Text > has changed. But is changed CSS the only time you want to re-position > the Text? I guess you also need to re-position it when the size of the > parent changes. I imagine the logic for determining whether you need > to re-position the Text or not can get quite complicated. > > Why is it a problem that you reposition the Text too often? > > I imagine, and someone please correct me if I'm wrong, that when you > ask for text.prefWidth(-1), you get a cached prefWidth from the last > call, if no properties of Text have changed since the last call to > prefWidth. I also suppose, and again correct me if I'm wrong, that if > you resizeRelocate the Text to the exact same position and size as it > already has, it does not incur any additional operations down the road > compared to not calling resizeRelocate at all. So my conclusion is > that repositioning the Text to the same place is not more expensive > than checking whether the Text needs to be repositioned. > > Regards, > Tomas > > On Tue, Feb 17, 2015 at 10:14 AM, Tom Eugelink wrote: >> Registering to fontProperty works, but potentially requires a lot of >> listeners on every property that may affect the size, like effect, scale, >> etc. So I'm leaving it in layoutChildren for now; better once to many than >> not often enough. >> >> Would adding such an event be a big change? >> >> >> >> >> On 17-2-2015 14:50, David Grieve wrote: >>> >>> On 2/17/15 8:02 AM, Tom Eugelink wrote: >>>> I have a skin (of a control) that centers a Text node. This Text node can >>>> be styled via CSS, so this styling is a factor when centering. because >>>> larger font means wider text. >>>> >>>> The centering works perfectly, the only problem is figuring out when to >>>> center the node. At the moment I'm centering the node on every >>>> layoutChildren call of the skin, but this is way to often, because after >>>> applying the CSS chances are very low that the node will need to be >>>> repositioned. >>>> >>>> Basically I would like to be informed when the styling of a node has been >>>> applied or changed. Is there some place that can provide this information? >>>> >>> Not in general, no. But you can add a listener to a property that is >>> styled by CSS and react to the change. You might add a listener to the Text >>> node's fontProperty, for example. Clearly this isn't an all-purpose >>> solution. Another approach is to hold onto the bounds (or maybe just the >>> pref width and height) of the child node. If the old bounds doesn't equal >>> the new bounds, then recenter. >> From tomas.mikula at gmail.com Tue Feb 17 18:55:51 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Tue, 17 Feb 2015 13:55:51 -0500 Subject: Event when CSS is applied In-Reply-To: <54E388A8.8040801@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> Message-ID: On Tue, Feb 17, 2015 at 1:30 PM, Tom Eugelink wrote: > The control is a codewise polish up one of Gerrit's gauges (with > permission!) and pulled into JFXtras (with tests and all). For an idea on > what we are talking about: > https://www.youtube.com/watch?v=RH5X1uBu1d8 > > The process of centering the Text in that circle is a bit more complex. > 1. The value may vary between a min and max value. > 2. I want the Text to automatically utilize the maximum available space, but > not change size when a longer or shorter text is shown. > > To do this I have two additional Text nodes that have the same styling as > the Text node (so these are on the scene, but not visible, otherwise CSS is > not applied). These two text nodes get the maximum and minimum possible > value set. Then on these two some pythagoras is applied and in that way one > can determine the scale factor so that the value will never be rendered > outside of the circle. Then the actual to-be-rendered value can be placed > into the Text node and positioned in the centre of the circle. > > The problem is that a lot of these calculations depend on the CSS styling. > What font is set? Bold or not? So I can only do these calculcation after the > CSS has been applied. This unfortunately is not yet the case when the skin > is instantiated. This means that if I do not used the layoutChildren, the > initial presentation is totally off, untill the first min/max/value is set. Maybe I was misunderstood. I didn't suggest not doing it in layoutChildren. My conclusion was to keep doing it in layoutChildren and not worry about repositioning the text too often. Tomas > > So I would like to know when the CSS is applied to do the initial > calculations. After that only when CSS, min or max changes is a > recalculation required. > > Tom > > > > > On 17-2-2015 19:05, Tomas Mikula wrote: >> >> Hi Tom, >> >> suppose you have such an event and can tell whether CSS of your Text >> has changed. But is changed CSS the only time you want to re-position >> the Text? I guess you also need to re-position it when the size of the >> parent changes. I imagine the logic for determining whether you need >> to re-position the Text or not can get quite complicated. >> >> Why is it a problem that you reposition the Text too often? >> >> I imagine, and someone please correct me if I'm wrong, that when you >> ask for text.prefWidth(-1), you get a cached prefWidth from the last >> call, if no properties of Text have changed since the last call to >> prefWidth. I also suppose, and again correct me if I'm wrong, that if >> you resizeRelocate the Text to the exact same position and size as it >> already has, it does not incur any additional operations down the road >> compared to not calling resizeRelocate at all. So my conclusion is >> that repositioning the Text to the same place is not more expensive >> than checking whether the Text needs to be repositioned. >> >> Regards, >> Tomas >> >> On Tue, Feb 17, 2015 at 10:14 AM, Tom Eugelink wrote: >>> >>> Registering to fontProperty works, but potentially requires a lot of >>> listeners on every property that may affect the size, like effect, scale, >>> etc. So I'm leaving it in layoutChildren for now; better once to many >>> than >>> not often enough. >>> >>> Would adding such an event be a big change? >>> >>> >>> >>> >>> On 17-2-2015 14:50, David Grieve wrote: >>>> >>>> >>>> On 2/17/15 8:02 AM, Tom Eugelink wrote: >>>>> >>>>> I have a skin (of a control) that centers a Text node. This Text node >>>>> can >>>>> be styled via CSS, so this styling is a factor when centering. because >>>>> larger font means wider text. >>>>> >>>>> The centering works perfectly, the only problem is figuring out when to >>>>> center the node. At the moment I'm centering the node on every >>>>> layoutChildren call of the skin, but this is way to often, because >>>>> after >>>>> applying the CSS chances are very low that the node will need to be >>>>> repositioned. >>>>> >>>>> Basically I would like to be informed when the styling of a node has >>>>> been >>>>> applied or changed. Is there some place that can provide this >>>>> information? >>>>> >>>> Not in general, no. But you can add a listener to a property that is >>>> styled by CSS and react to the change. You might add a listener to the >>>> Text >>>> node's fontProperty, for example. Clearly this isn't an all-purpose >>>> solution. Another approach is to hold onto the bounds (or maybe just the >>>> pref width and height) of the child node. If the old bounds doesn't >>>> equal >>>> the new bounds, then recenter. >>> >>> > From david.grieve at oracle.com Tue Feb 17 19:01:31 2015 From: david.grieve at oracle.com (David Grieve) Date: Tue, 17 Feb 2015 14:01:31 -0500 Subject: Event when CSS is applied In-Reply-To: <54E388A8.8040801@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> Message-ID: <54E3900B.70404@oracle.com> On 2/17/15 1:30 PM, Tom Eugelink wrote: > The control is a codewise polish up one of Gerrit's gauges (with > permission!) and pulled into JFXtras (with tests and all). For an idea > on what we are talking about: > https://www.youtube.com/watch?v=RH5X1uBu1d8 > > The process of centering the Text in that circle is a bit more complex. > 1. The value may vary between a min and max value. > 2. I want the Text to automatically utilize the maximum available > space, but not change size when a longer or shorter text is shown. > > To do this I have two additional Text nodes that have the same styling > as the Text node (so these are on the scene, but not visible, > otherwise CSS is not applied). These two text nodes get the maximum > and minimum possible value set. Then on these two some pythagoras is > applied and in that way one can determine the scale factor so that the > value will never be rendered outside of the circle. Then the actual > to-be-rendered value can be placed into the Text node and positioned > in the centre of the circle. > > The problem is that a lot of these calculations depend on the CSS > styling. What font is set? Bold or not? So I can only do these > calculcation after the CSS has been applied. This unfortunately is not > yet the case when the skin is instantiated. This means that if I do > not used the layoutChildren, the initial presentation is totally off, > untill the first min/max/value is set. Have you looked at the javadoc for Node#applyCss()? > > > So I would like to know when the CSS is applied to do the initial > calculations. After that only when CSS, min or max changes is a > recalculation required. > > Tom > > > > On 17-2-2015 19:05, Tomas Mikula wrote: >> Hi Tom, >> >> suppose you have such an event and can tell whether CSS of your Text >> has changed. But is changed CSS the only time you want to re-position >> the Text? I guess you also need to re-position it when the size of the >> parent changes. I imagine the logic for determining whether you need >> to re-position the Text or not can get quite complicated. >> >> Why is it a problem that you reposition the Text too often? >> >> I imagine, and someone please correct me if I'm wrong, that when you >> ask for text.prefWidth(-1), you get a cached prefWidth from the last >> call, if no properties of Text have changed since the last call to >> prefWidth. I also suppose, and again correct me if I'm wrong, that if >> you resizeRelocate the Text to the exact same position and size as it >> already has, it does not incur any additional operations down the road >> compared to not calling resizeRelocate at all. So my conclusion is >> that repositioning the Text to the same place is not more expensive >> than checking whether the Text needs to be repositioned. >> >> Regards, >> Tomas >> >> On Tue, Feb 17, 2015 at 10:14 AM, Tom Eugelink wrote: >>> Registering to fontProperty works, but potentially requires a lot of >>> listeners on every property that may affect the size, like effect, >>> scale, >>> etc. So I'm leaving it in layoutChildren for now; better once to >>> many than >>> not often enough. >>> >>> Would adding such an event be a big change? >>> >>> >>> >>> >>> On 17-2-2015 14:50, David Grieve wrote: >>>> >>>> On 2/17/15 8:02 AM, Tom Eugelink wrote: >>>>> I have a skin (of a control) that centers a Text node. This Text >>>>> node can >>>>> be styled via CSS, so this styling is a factor when centering. >>>>> because >>>>> larger font means wider text. >>>>> >>>>> The centering works perfectly, the only problem is figuring out >>>>> when to >>>>> center the node. At the moment I'm centering the node on every >>>>> layoutChildren call of the skin, but this is way to often, because >>>>> after >>>>> applying the CSS chances are very low that the node will need to be >>>>> repositioned. >>>>> >>>>> Basically I would like to be informed when the styling of a node >>>>> has been >>>>> applied or changed. Is there some place that can provide this >>>>> information? >>>>> >>>> Not in general, no. But you can add a listener to a property that is >>>> styled by CSS and react to the change. You might add a listener to >>>> the Text >>>> node's fontProperty, for example. Clearly this isn't an all-purpose >>>> solution. Another approach is to hold onto the bounds (or maybe >>>> just the >>>> pref width and height) of the child node. If the old bounds doesn't >>>> equal >>>> the new bounds, then recenter. >>> > From tbee at tbee.org Tue Feb 17 19:37:04 2015 From: tbee at tbee.org (Tom Eugelink) Date: Tue, 17 Feb 2015 20:37:04 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> Message-ID: <54E39860.9000307@tbee.org> On 17-2-2015 19:55, Tomas Mikula wrote: > > Maybe I was misunderstood. I didn't suggest not doing it in > layoutChildren. My conclusion was to keep doing it in layoutChildren > and not worry about repositioning the text too often. > No, I understood, just repositioning is ok, but I need to do all; scaling calculations, repositioning, setting the text, because am I not able to do it once just after initialization. From tbee at tbee.org Tue Feb 17 22:05:27 2015 From: tbee at tbee.org (Tom Eugelink) Date: Tue, 17 Feb 2015 23:05:27 +0100 Subject: Event when CSS is applied In-Reply-To: <54E3900B.70404@oracle.com> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> Message-ID: <54E3BB27.5070803@tbee.org> On 17-2-2015 20:01, David Grieve wrote: > On 2/17/15 1:30 PM, Tom Eugelink wrote: >> The control is a codewise polish up one of Gerrit's gauges (with permission!) and pulled into JFXtras (with tests and all). For an idea on what we are talking about: >> https://www.youtube.com/watch?v=RH5X1uBu1d8 >> >> The process of centering the Text in that circle is a bit more complex. >> 1. The value may vary between a min and max value. >> 2. I want the Text to automatically utilize the maximum available space, but not change size when a longer or shorter text is shown. >> >> To do this I have two additional Text nodes that have the same styling as the Text node (so these are on the scene, but not visible, otherwise CSS is not applied). These two text nodes get the maximum and minimum possible value set. Then on these two some pythagoras is applied and in that way one can determine the scale factor so that the value will never be rendered outside of the circle. Then the actual to-be-rendered value can be placed into the Text node and positioned in the centre of the circle. >> >> The problem is that a lot of these calculations depend on the CSS styling. What font is set? Bold or not? So I can only do these calculcation after the CSS has been applied. This unfortunately is not yet the case when the skin is instantiated. This means that if I do not used the layoutChildren, the initial presentation is totally off, untill the first min/max/value is set. > Have you looked at the javadoc for Node#applyCss()? I did just now and tried calling that and layout when the skin is being instantiated, but apparently things are not setup right yet. Maybe layoutChildren with bound checking is the way to go. From tomas.mikula at gmail.com Tue Feb 17 22:15:12 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Tue, 17 Feb 2015 17:15:12 -0500 Subject: Event when CSS is applied In-Reply-To: <54E3BB27.5070803@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> Message-ID: Maybe if you can post the relevant part of your layoutChildren method so that others can look if they can suggest an improvement. Tomas On Tue, Feb 17, 2015 at 5:05 PM, Tom Eugelink wrote: > On 17-2-2015 20:01, David Grieve wrote: >> >> On 2/17/15 1:30 PM, Tom Eugelink wrote: >>> >>> The control is a codewise polish up one of Gerrit's gauges (with >>> permission!) and pulled into JFXtras (with tests and all). For an idea on >>> what we are talking about: >>> https://www.youtube.com/watch?v=RH5X1uBu1d8 >>> >>> The process of centering the Text in that circle is a bit more complex. >>> 1. The value may vary between a min and max value. >>> 2. I want the Text to automatically utilize the maximum available space, >>> but not change size when a longer or shorter text is shown. >>> >>> To do this I have two additional Text nodes that have the same styling as >>> the Text node (so these are on the scene, but not visible, otherwise CSS is >>> not applied). These two text nodes get the maximum and minimum possible >>> value set. Then on these two some pythagoras is applied and in that way one >>> can determine the scale factor so that the value will never be rendered >>> outside of the circle. Then the actual to-be-rendered value can be placed >>> into the Text node and positioned in the centre of the circle. >>> >>> The problem is that a lot of these calculations depend on the CSS >>> styling. What font is set? Bold or not? So I can only do these calculcation >>> after the CSS has been applied. This unfortunately is not yet the case when >>> the skin is instantiated. This means that if I do not used the >>> layoutChildren, the initial presentation is totally off, untill the first >>> min/max/value is set. >> >> Have you looked at the javadoc for Node#applyCss()? > > > I did just now and tried calling that and layout when the skin is being > instantiated, but apparently things are not setup right yet. > > Maybe layoutChildren with bound checking is the way to go. From james.graham at oracle.com Wed Feb 18 01:27:49 2015 From: james.graham at oracle.com (Jim Graham) Date: Tue, 17 Feb 2015 17:27:49 -0800 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications Message-ID: <54E3EA95.2020203@oracle.com> I'm currently investigating what changes we need to make to get Windows HiDPI support up and running. As it stands, anyone with a Hi DPI Windows machine will see all Java and JavaFX programs run very tiny since the Java executables have declared that we are "DPI Aware" in the program manifest for a few releases now. That setting was necessary to prevent the platform from pixel-scaling us back at a time when the actual DPIs of screens were not that drastically different from the norm and pixel scaling looked remarkably ugly compared to the amount of size difference it bought you. But, things are changing rapidly and there are a number of screens out there now upon which Windows recommends that you should scale by 1.5x up to 3x. A retina iMac or MacBook Pro (220 DPI) running Windows 7+, for example, will request us to scale by 2x, we'll implicitly indicate that we've heard that request by the fact that the Java manifest says we are "System DPI Aware" and they'll trust our sizes in pixels even though we calculated them based on a regular DPI screen - and we end up being half the size we want and nearly unreadable. There are also Windows laptops such as the Lenovo Yoga 2 Pro (released Oct 2013) and Yoga 3 Pro that have nearly 300DPI screens where the default pixel scale requested is 3x. Java and FX windows are even tinier and harder to read on those screens. (Side note: In FX, as it turns out, our "em" scaling in css is actually DPI aware so if you sized everything using CSS and the "em", then you might actually look OK. In practice, though, there are a ton of pixel dimensions in the default L&F CSS files so you'd have to do quite a bit of customization to make that work.) Adding a scale factor to the Windows platform code is not hard, and I have that code up and running. But, we run into the following issues that didn't come up when we did the retina port: - non-integer coordinates in events Our Mac code truncates and filters events to integers, but Windows may specify non-integer scaling so this gets trickier now. Certainly we can round or truncate, and filter for integers, but we end up in situations where the user can see the mouse move, but the program does not react because that event was filtered out. Note that a test program on the Mac does show that we sometimes repeat Mouse coordinates on retina screens which shows that even with the 2x scaling on Mac we are seeing repeated coordinates - they are somewhat rare, though, since I think the Mac internally only processes mouse moves in a virtual space. It will be much more common with Windows more flexible scaling, though, since the mouse cursor moves based on pixel distances, not based on filtered event distances. - screen dimensions For a single screen we can simply divide by the pixel scale, but with 3x scaling the division produces non-integers. This would also show up if we embrace the 125% and 150% scales that Windows documents/APIs recommend we support. But, a bigger issue happens with multi-monitor setups. The Mac lays out the screens (in the Control Panel UI, and in the bounds they report) in virtual coordinates based on the pixel scale. That, combined with the fact that they use 2x scaling only and screens are even numbers of pixels in size, means we can pass those numbers on and they don't look odd. But, Windows allows a wider range of scales (125%, 150%, 200%, 300%) and it also lays out screens in pixels which raises a couple of issues - non-integer screen sizes for some combinations of scale factors and pixel sizes, and also screens are supposed to lie against each others' edges so the user can line them up perfectly in the Control Panel and if we try to represent that same layout in "virtual scaled coordinates" the monitors may not line up correctly. I'll get into more detail on that below. So, my questions to developers are: - Would seeing non-integer event coordinates break your code? - Would seeing non-integer window sizes and positions break your code? - Would non-integer screen sizes break your code? - If we try to translate Windows Screen pixel sizes into virtual coordinates and the layout doesn't quite represent what they see in the Control Panel, how much of a problem is that? - If we try to translate Windows Screen pixel sizes into virtual coordinates and, due to a complex layout, our algorithm cannot get all of the edges to match each other as they do in pixel space and we need to punt, how much might it break code if there are gaps or overlaps in the reported Screen bounds (i.e. this is worse than "the layout doesn't quite look the same" I asked about above)? - If we provide a flag or scale factor on the screens to indicate that the dimensions provided are in pixels and you must convert your desired window sizes by the indicated scale factor in order to know how big to make your window - how much impact would that have? - As a followup to "screens in pixel sizes", we could alternately arrange so that specifying how big your Scene is and/or using the standard setWidth()/setHeight() methods on stage and relying on default window positioning or using the default "centerOnScreen()" types of positioning methods could be taught to work regardless of what we decide here. It would only be if you wanted to correlate all of the screens and come up with your own x,y,w,h - that would be where you might need to be aware if the screen dimensions are not in the same space as scene dimensions. To get an idea of the kinds of problems we might encounter when trying to translate the screens into "virtual coordinates", consider that the default layout of linearly placing all screens next to each other is easy to translate (though if one screen doesn't "divide out" evenly then some of the locations might be non-integers). But, consider a 3x3 grid of displays (i.e. 9 monitors in a square grid layout). If they are identical then the layout would be a perfectly aligned grid. If the middle screen has double (or half) the resolution of the others then we have to either have it float in the middle of a "virtual size" space that is too large for its dimensions, or have it overlap the 8 screens around the outside, or push the 8 screens around the outside away from each other so that they no longer touch. Since the user laid the screens out in pixels in the Control Panel UI, they believe that they may have created a perfect grid, but we will have to present an imperfect grid to the JavaFX program if we want to maintain the illusion that FX Screen object sizes are scaled. Even worse, the adjustments we have to make would be heuristic and depending on what we choose it might break what they wanted to achieve, or it might not matter, it depends on what they were thinking and what we independently decided as to how to best represent it. So, we could: - Expose the "screen dimensions are pixels which may not match the coordinates in your scenes" property of Windows screens. This may cause problems for programs that examine the screens and attempt to do their own custom positioning, but should not matter to programs that trust the default positioning, or centerOnScreen() method(s?). - Expose "screen dimensions are pixels", but make common APIs work in Virtual coordinates - scene/stage.setWidth/Height() could be in virtual coordinates for instance. Screen might have multiple getBounds() methods depending on if you want virtual coordinates or pixel coordinates and only relying on the pixel coordinate versions will work in Windows in all cases. The issue here is that sometimes the base APIs might not correlate well with each other, but they will make sense if you know the trick. - Try to convert Windows screens into logical coordinates that make sense. It will work for 99% of cases probably most of which are single screen or default linear layouts. In some number of corner cases, though, we may get it wrong and the values you find in screen bounds could have gaps or overlaps or bear no resemblance to how the user perceives his workspace. - Any other ideas? ...jim From james.graham at oracle.com Wed Feb 18 01:53:23 2015 From: james.graham at oracle.com (Jim Graham) Date: Tue, 17 Feb 2015 17:53:23 -0800 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: <54E3EA95.2020203@oracle.com> References: <54E3EA95.2020203@oracle.com> Message-ID: <54E3F093.9070708@oracle.com> One interesting point to note that makes one concern seem less compelling in a practical sense: On 2/17/2015 5:27 PM, Jim Graham wrote: > To get an idea of the kinds of problems we might encounter when trying > to translate the screens into "virtual coordinates", consider that the > default layout of linearly placing all screens next to each other is > easy to translate (though if one screen doesn't "divide out" evenly then > some of the locations might be non-integers). But, consider a 3x3 grid > of displays (i.e. 9 monitors in a square grid layout). If they are > identical then the layout would be a perfectly aligned grid. If the > middle screen has double (or half) the resolution of the others then we > have to either have it float in the middle of a "virtual size" space > that is too large for its dimensions, or have it overlap the 8 screens > around the outside, or push the 8 screens around the outside away from > each other so that they no longer touch. Since the user laid the > screens out in pixels in the Control Panel UI, they believe that they > may have created a perfect grid, but we will have to present an > imperfect grid to the JavaFX program if we want to maintain the illusion > that FX Screen object sizes are scaled. Even worse, the adjustments we > have to make would be heuristic and depending on what we choose it might > break what they wanted to achieve, or it might not matter, it depends on > what they were thinking and what we independently decided as to how to > best represent it. It is interesting to note that, in practice, this case would represent frustration for the user dealing with Windows before (s)he even tries to run a program. If the monitors look nice and grid-like on (or hovering above) their desk, and if they all have the same resolution, then they'll look nice and grid-like in the Windows CP. And, they'll all have the same DPI (unless one monitor has a broken EDID chip that reports a bad physical size), and our adjustments will be fine since all bounds will be divided by the same number. (Though, note that the issue with non-integer sizes still remains here as it does with single-monitor and linear-layouts.) If one of the monitors has a different resolution (but is identical in physical size), then the user will feel frustration in trying to get that physical layout to be represented in the Windows CP. The CP will want to show that Hi DPI monitor as twice the size of the other little rectangles since it has twice the number of pixels, and so the grid that the user sees in the CP won't "fit". It's hard to say what that user will do in response to that frustration, but when the pixel dimensions get to our code and we try to make sense of it in a virtual DPI world, our fumblings may not make it any worse than the Windows CP layout already made it, or it may be worse, but the user will have already embraced that frustration just trying to get a nice layout in the CP. If we reverse this and say that all of the monitors have the same pixel resolution and one of them is twice (or half) the physical size of the others, then they may lay out nicely in a grid in the CP since that is only concerned with their pixel sizes. But the user is not going to have a nice grid sitting in front of them in the Real World(tm) with the actual monitors. Our attempts to fudge what looks like an even grid in the CP may not match what they see in front of them on their desk, but would a user really want a grid of unmatched physical-sized monitors in front of them? So, in trying to come up with a practical scenario where the user has a nice layout of monitors in front of them, and they are happy with representing that layout in the CP, and we then mangle it in trying to translate it into virtual coordinate Screen objects - it's a theoretical case so far... ...jim From tbee at tbee.org Wed Feb 18 06:46:38 2015 From: tbee at tbee.org (Tom Eugelink) Date: Wed, 18 Feb 2015 07:46:38 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> Message-ID: <54E4354E.1000805@tbee.org> Sure! I'm very curious what can be done better. https://github.com/JFXtras/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/internal/scene/control/skin/gauge/linear/SimpleMetroArcGaugeSkin.java You can also checkout the sources, you should be able to run SimpleMetroArcGaugeTrial1.java without any other dependencies. Some of the other classes will have compilation errors, but the gauge should run. Tom On 17-2-2015 23:15, Tomas Mikula wrote: > Maybe if you can post the relevant part of your layoutChildren method > so that others can look if they can suggest an improvement. > > Tomas > > On Tue, Feb 17, 2015 at 5:05 PM, Tom Eugelink wrote: >> On 17-2-2015 20:01, David Grieve wrote: >>> On 2/17/15 1:30 PM, Tom Eugelink wrote: >>>> The control is a codewise polish up one of Gerrit's gauges (with >>>> permission!) and pulled into JFXtras (with tests and all). For an idea on >>>> what we are talking about: >>>> https://www.youtube.com/watch?v=RH5X1uBu1d8 >>>> >>>> The process of centering the Text in that circle is a bit more complex. >>>> 1. The value may vary between a min and max value. >>>> 2. I want the Text to automatically utilize the maximum available space, >>>> but not change size when a longer or shorter text is shown. >>>> >>>> To do this I have two additional Text nodes that have the same styling as >>>> the Text node (so these are on the scene, but not visible, otherwise CSS is >>>> not applied). These two text nodes get the maximum and minimum possible >>>> value set. Then on these two some pythagoras is applied and in that way one >>>> can determine the scale factor so that the value will never be rendered >>>> outside of the circle. Then the actual to-be-rendered value can be placed >>>> into the Text node and positioned in the centre of the circle. >>>> >>>> The problem is that a lot of these calculations depend on the CSS >>>> styling. What font is set? Bold or not? So I can only do these calculcation >>>> after the CSS has been applied. This unfortunately is not yet the case when >>>> the skin is instantiated. This means that if I do not used the >>>> layoutChildren, the initial presentation is totally off, untill the first >>>> min/max/value is set. >>> Have you looked at the javadoc for Node#applyCss()? >> >> I did just now and tried calling that and layout when the skin is being >> instantiated, but apparently things are not setup right yet. >> >> Maybe layoutChildren with bound checking is the way to go. From tomas.mikula at gmail.com Wed Feb 18 07:34:53 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Wed, 18 Feb 2015 02:34:53 -0500 Subject: Event when CSS is applied In-Reply-To: <54E4354E.1000805@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> Message-ID: OK, so the major problem I see is that a lot of layout is done outside layoutChildren, using code like this: needlePane = new Pane(); needlePane.widthProperty().addListener( (observable) -> { drawNeedlePane(); }); What I think should be done is, instead of trying to hack around Pane, create class NeedlePane that extends Region and overrides layoutChildren. It would create its children in the constructor (or take them as constructor parameters), add them to its children list right in the constructor and never clear them, and position them on the layout pass (i.e. in layoutChildren). The problem you have (or one of the problems) is that in the layout pass, when lStackPane sets the size of needlePane, drawNeedlePane() is triggered which clears needlePane's children (this is shortly after the CSS was applied to them, just before the layout pass that is currently in progress), then adds them quickly back, but without CSS applied. Another problem is that in Skin's layoutChilren, you are trying to layout grand-grand-children. You should only be laying out direct children. The code reads protected void layoutChildren(double arg0, double arg1, double arg2, double arg3) { super.layoutChildren(arg0, arg1, arg2, arg3); setValueText(); scaleValueText(); positionValueText(); } This is what it does: super.layoutChildren() resizes and positions lStackPane. It does not call layout() on it yet. The rest of the methods are positioning grand-children of that lStackPane. When the layoutChildren call returns, layout() will be called on all children, i.e. on lStackPane. Within lStackPane.layout(), lStackPane.layoutChildren() is called, which sets the width and height of needlePane, which triggers drawNeedlePane() (if size changed), which clears the children and adds them back. When lStackPane.layoutChildren() returns, needlePane.layout() is called, within which needlePane.layoutChildren() is called. This is where you should do the layout for valueText. Hope this helps. Tomas On Wed, Feb 18, 2015 at 1:46 AM, Tom Eugelink wrote: > Sure! I'm very curious what can be done better. > https://github.com/JFXtras/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/internal/scene/control/skin/gauge/linear/SimpleMetroArcGaugeSkin.java > > You can also checkout the sources, you should be able to run > SimpleMetroArcGaugeTrial1.java without any other dependencies. Some of the > other classes will have compilation errors, but the gauge should run. > > Tom > > > > On 17-2-2015 23:15, Tomas Mikula wrote: >> >> Maybe if you can post the relevant part of your layoutChildren method >> so that others can look if they can suggest an improvement. >> >> Tomas >> >> On Tue, Feb 17, 2015 at 5:05 PM, Tom Eugelink wrote: >>> >>> On 17-2-2015 20:01, David Grieve wrote: >>>> >>>> On 2/17/15 1:30 PM, Tom Eugelink wrote: >>>>> >>>>> The control is a codewise polish up one of Gerrit's gauges (with >>>>> permission!) and pulled into JFXtras (with tests and all). For an idea >>>>> on >>>>> what we are talking about: >>>>> https://www.youtube.com/watch?v=RH5X1uBu1d8 >>>>> >>>>> The process of centering the Text in that circle is a bit more complex. >>>>> 1. The value may vary between a min and max value. >>>>> 2. I want the Text to automatically utilize the maximum available >>>>> space, >>>>> but not change size when a longer or shorter text is shown. >>>>> >>>>> To do this I have two additional Text nodes that have the same styling >>>>> as >>>>> the Text node (so these are on the scene, but not visible, otherwise >>>>> CSS is >>>>> not applied). These two text nodes get the maximum and minimum possible >>>>> value set. Then on these two some pythagoras is applied and in that way >>>>> one >>>>> can determine the scale factor so that the value will never be rendered >>>>> outside of the circle. Then the actual to-be-rendered value can be >>>>> placed >>>>> into the Text node and positioned in the centre of the circle. >>>>> >>>>> The problem is that a lot of these calculations depend on the CSS >>>>> styling. What font is set? Bold or not? So I can only do these >>>>> calculcation >>>>> after the CSS has been applied. This unfortunately is not yet the case >>>>> when >>>>> the skin is instantiated. This means that if I do not used the >>>>> layoutChildren, the initial presentation is totally off, untill the >>>>> first >>>>> min/max/value is set. >>>> >>>> Have you looked at the javadoc for Node#applyCss()? >>> >>> >>> I did just now and tried calling that and layout when the skin is being >>> instantiated, but apparently things are not setup right yet. >>> >>> Maybe layoutChildren with bound checking is the way to go. > > From tbee at tbee.org Wed Feb 18 08:01:49 2015 From: tbee at tbee.org (Tom Eugelink) Date: Wed, 18 Feb 2015 09:01:49 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> Message-ID: <54E446ED.10206@tbee.org> On 18-2-2015 08:34, Tomas Mikula wrote: > Hope this helps. > I'll give it a try! Maybe it will solve some of the TBEERNOT (TODO) tags further down the code. Tom From tomas.mikula at gmail.com Wed Feb 18 08:10:00 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Wed, 18 Feb 2015 03:10:00 -0500 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> Message-ID: In case this information was buried in the previous email, maybe all you need to better understand the problem is that layout() works roughly* like this: public final void layout() { layoutChildren(); for(Node child: getChildren()) { child.layout(); } } layoutChildren() just resizes and positions child nodes (only direct children), it does not call layout() on them. You do not (usually) call layout() directly, it is called on the root node in the layout pass. Neither can you override layout(), it is final. * In reality, it first checks whether layout is needed at all. Also, it only calls layout() on children that are Parents (other Nodes do not have that method). And there's another piece that prevents recursive calls to layout() on the same node. On Wed, Feb 18, 2015 at 2:34 AM, Tomas Mikula wrote: > OK, so the major problem I see is that a lot of layout is done outside > layoutChildren, using code like this: > > needlePane = new Pane(); > needlePane.widthProperty().addListener( (observable) -> { > drawNeedlePane(); > }); > > What I think should be done is, instead of trying to hack around Pane, > create class NeedlePane that extends Region and overrides > layoutChildren. It would create its children in the constructor (or > take them as constructor parameters), add them to its children list > right in the constructor and never clear them, and position them on > the layout pass (i.e. in layoutChildren). > > The problem you have (or one of the problems) is that in the layout > pass, when lStackPane sets the size of needlePane, drawNeedlePane() is > triggered which clears needlePane's children (this is shortly after > the CSS was applied to them, just before the layout pass that is > currently in progress), then adds them quickly back, but without CSS > applied. > > Another problem is that in Skin's layoutChilren, you are trying to > layout grand-grand-children. You should only be laying out direct > children. The code reads > > protected void layoutChildren(double arg0, double arg1, double arg2, > double arg3) { > super.layoutChildren(arg0, arg1, arg2, arg3); > setValueText(); > scaleValueText(); > positionValueText(); > } > > This is what it does: > > super.layoutChildren() resizes and positions lStackPane. It does not > call layout() on it yet. > > The rest of the methods are positioning grand-children of that lStackPane. > > When the layoutChildren call returns, layout() will be called on all > children, i.e. on lStackPane. Within lStackPane.layout(), > lStackPane.layoutChildren() is called, which sets the width and height > of needlePane, which triggers drawNeedlePane() (if size changed), > which clears the children and adds them back. When > lStackPane.layoutChildren() returns, needlePane.layout() is called, > within which needlePane.layoutChildren() is called. This is where you > should do the layout for valueText. > > Hope this helps. > Tomas > > > On Wed, Feb 18, 2015 at 1:46 AM, Tom Eugelink wrote: >> Sure! I'm very curious what can be done better. >> https://github.com/JFXtras/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/internal/scene/control/skin/gauge/linear/SimpleMetroArcGaugeSkin.java >> >> You can also checkout the sources, you should be able to run >> SimpleMetroArcGaugeTrial1.java without any other dependencies. Some of the >> other classes will have compilation errors, but the gauge should run. >> >> Tom >> >> >> >> On 17-2-2015 23:15, Tomas Mikula wrote: >>> >>> Maybe if you can post the relevant part of your layoutChildren method >>> so that others can look if they can suggest an improvement. >>> >>> Tomas >>> >>> On Tue, Feb 17, 2015 at 5:05 PM, Tom Eugelink wrote: >>>> >>>> On 17-2-2015 20:01, David Grieve wrote: >>>>> >>>>> On 2/17/15 1:30 PM, Tom Eugelink wrote: >>>>>> >>>>>> The control is a codewise polish up one of Gerrit's gauges (with >>>>>> permission!) and pulled into JFXtras (with tests and all). For an idea >>>>>> on >>>>>> what we are talking about: >>>>>> https://www.youtube.com/watch?v=RH5X1uBu1d8 >>>>>> >>>>>> The process of centering the Text in that circle is a bit more complex. >>>>>> 1. The value may vary between a min and max value. >>>>>> 2. I want the Text to automatically utilize the maximum available >>>>>> space, >>>>>> but not change size when a longer or shorter text is shown. >>>>>> >>>>>> To do this I have two additional Text nodes that have the same styling >>>>>> as >>>>>> the Text node (so these are on the scene, but not visible, otherwise >>>>>> CSS is >>>>>> not applied). These two text nodes get the maximum and minimum possible >>>>>> value set. Then on these two some pythagoras is applied and in that way >>>>>> one >>>>>> can determine the scale factor so that the value will never be rendered >>>>>> outside of the circle. Then the actual to-be-rendered value can be >>>>>> placed >>>>>> into the Text node and positioned in the centre of the circle. >>>>>> >>>>>> The problem is that a lot of these calculations depend on the CSS >>>>>> styling. What font is set? Bold or not? So I can only do these >>>>>> calculcation >>>>>> after the CSS has been applied. This unfortunately is not yet the case >>>>>> when >>>>>> the skin is instantiated. This means that if I do not used the >>>>>> layoutChildren, the initial presentation is totally off, untill the >>>>>> first >>>>>> min/max/value is set. >>>>> >>>>> Have you looked at the javadoc for Node#applyCss()? >>>> >>>> >>>> I did just now and tried calling that and layout when the skin is being >>>> instantiated, but apparently things are not setup right yet. >>>> >>>> Maybe layoutChildren with bound checking is the way to go. >> >> From lehmann at media-interactive.de Wed Feb 18 10:13:16 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Wed, 18 Feb 2015 11:13:16 +0100 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: <54E3F093.9070708@oracle.com> References: <54E3EA95.2020203@oracle.com> <54E3F093.9070708@oracle.com> Message-ID: <54E465BC.5090607@media-interactive.de> Hi Jim, interesting read. I guess I learned more about the topic than I can help. Also found this resource interesting: http://kynosarges.de/GuiDpiScaling.html Some thoughts. Obviously it is less desirable to require every application to do their own scaling. I can't imagine that this would work on a larger basis. As to the question of integer vs float coordinates, there is a lot of snapToPixel stuff going on. And one of the reasons is to get crisp pixel-aligned lines. Snapping to logical coordinates could then snap to non-integer physical coordinates (if the scaling factor is 125% or somesuch). Which may be ok if hidpi makes up for it... As to em-based styling, I was under the impression that there was a constant factor for 1em. Reading section "RESIZING FOR DIFFERENT SCREEN DPI" in modena.css I am not so sure anymore. The resource above also is unsure (FWIW): "JavaFX em handling is inconsistent, sometimes referring to the automatically acquired system font but at other times yielding a hard-coded default size." Finally, it would be nice to get information about the actual screen DPI. In my tests Screen.getDpi always returns 96, regardless of what it actually is... Werner From mike at plan99.net Wed Feb 18 11:23:29 2015 From: mike at plan99.net (Mike Hearn) Date: Wed, 18 Feb 2015 12:23:29 +0100 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: <54E465BC.5090607@media-interactive.de> References: <54E3EA95.2020203@oracle.com> <54E3F093.9070708@oracle.com> <54E465BC.5090607@media-interactive.de> Message-ID: > > Finally, it would be nice to get information about the actual screen DPI. > In my tests Screen.getDpi always returns 96, regardless of what it actually > is... You can reflectively access Screen.getPixelScale() to learn if you're on Retina. Of course, don't expect to swap out the JRE for a newer one automatically if you do this (I bundle so it's not so problematic). WRT Jim's questions: - Would seeing non-integer event coordinates break your code? No. - Would seeing non-integer window sizes and positions break your code? No. I serialize window co-ordinates to disk so the main window appears in the same place and size across app restarts, but I just checked and I'm saving them as doubles so it would just work. - Would non-integer screen sizes break your code? No. - If we provide a flag or scale factor on the screens to indicate that the dimensions provided are in pixels and you must convert your desired window sizes by the indicated scale factor in order to know how big to make your window - how much impact would that have? You mean like Screen.getPixelScale()? Honestly I find this stuff confusing. Re-defining "pixel" to mean something other than dot on a screen matrix breaks my entire lifetime's mental model of how screens work. I'd almost prefer to just specify everything in terms of some abstract unit like an 'em' and then not think about pixels at all, though I realise that isn't compatible with how the JavaFX API works. The notion of screen vs stage pixels is likely to be especially confusing. From lehmann at media-interactive.de Wed Feb 18 11:31:12 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Wed, 18 Feb 2015 12:31:12 +0100 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: References: <54E3EA95.2020203@oracle.com> <54E3F093.9070708@oracle.com> <54E465BC.5090607@media-interactive.de> Message-ID: <54E47800.7010000@media-interactive.de> My usecase is not about "retina or not". It is about showing a report result in "actual size" which means I need to scale it depending on the screen DPI. Current workaround is this... -Dcom.sun.javafx.screenDPI=109 ...but I can't really advertise this to users. Werner On 18.02.2015 12:23, Mike Hearn wrote: > You can reflectively access Screen.getPixelScale() to learn if you're on > Retina. Of course, don't expect to swap out the JRE for a newer one > automatically if you do this (I bundle so it's not so problematic). From anton.tarasov at oracle.com Wed Feb 18 16:22:08 2015 From: anton.tarasov at oracle.com (Anton V. Tarasov) Date: Wed, 18 Feb 2015 19:22:08 +0300 Subject: [8u60] Review request: RT-37371 IllegalThreadStateException in WebView when loading flickr.com Message-ID: <54E4BC30.2080605@oracle.com> Hi Kevin, Vadim, Please review the fix: https://javafx-jira.kenai.com/browse/RT-37371 http://cr.openjdk.java.net/~ant/RT-37371/webrev.0 Thanks, Anton. From tbee at tbee.org Wed Feb 18 19:32:59 2015 From: tbee at tbee.org (Tom Eugelink) Date: Wed, 18 Feb 2015 20:32:59 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> Message-ID: <54E4E8EB.6030905@tbee.org> On 18-2-2015 08:34, Tomas Mikula wrote: > What I think should be done is, instead of trying to hack around Pane, > create class NeedlePane that extends Region and overrides > layoutChildren. It would create its children in the constructor (or > take them as constructor parameters), add them to its children list > right in the constructor and never clear them, and position them on > the layout pass (i.e. in layoutChildren). > Creating a DialPane is not such a problem, but creating a path only once and the only layout it turns out to be more of a challenge: the constructed but not yet correctly initialized path elements do not behave well with the rotate. It is an approach with merrit though, especially in resizing. Tom From james.graham at oracle.com Wed Feb 18 19:41:42 2015 From: james.graham at oracle.com (Jim Graham) Date: Wed, 18 Feb 2015 11:41:42 -0800 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: <54E465BC.5090607@media-interactive.de> References: <54E3EA95.2020203@oracle.com> <54E3F093.9070708@oracle.com> <54E465BC.5090607@media-interactive.de> Message-ID: <54E4EAF6.7010108@oracle.com> Thanks for looking at this Werner! On 2/18/2015 2:13 AM, Werner Lehmann wrote: > Hi Jim, > > As to the question of integer vs float > coordinates, there is a lot of snapToPixel stuff going on. And one of > the reasons is to get crisp pixel-aligned lines. Snapping to logical > coordinates could then snap to non-integer physical coordinates (if the > scaling factor is 125% or somesuch). Which may be ok if hidpi makes up > for it... We have a number of "snap-to-pixel" cases within the FX code base for the very reason you state. I'm also wondering how often those calculations appear in application code? Our intention is to (likely not in 8u60) provide a pixelScale attribute on some class (Scene? Stage? etc) so that snap-to-pixel can do its work. We may initially (and we must until we provide that API) only support integer scales (so at least retina gets its 2x and super-hi screens can get their 3x) since those would not "undo" the calculations of snap-to-pixel. To embrace non-integer scales in rendering we would need to expose that pixel scale and then the code that does pixel snapping would need to use: snappedCoord = Math.round(rawCoord * pixelScale) / pixelScale; and all values would have to be floating point (the API tends to use doubles for numbers). Unfortunately, when you said: > Some thoughts. Obviously it is less desirable to require every > application to do their own scaling. I can't imagine that this > would work on a larger basis. That is the Windows model. They tell you how much you should scale your own content, and then they ask you to tell them how many actual pixels you want the window to be. You are then supposed to calculate a scaled version of your rendering, figure out how many pixels it is, and give that number to them. With FX, this could be as simple as providing a scaling transform above the root (this is actually how we render the scene) and letting everything else to its work. Nodes are supposed to embrace scaling from their ancestry so technically our nodes should already understand how to do this, but it may be a surprise when the root node doesn't see IDENTITY in its incoming "localToParent" transform. Would it? If we went that way, then snap-to-pixel would work just fine as long as code that performed that calculation actually checked its full scene transform instead of just relying on "I know that my app code hasn't set any transforms in any of my parents so this node must be still at a 1:1 pixel scale". In terms of what you said about "if HiDPI makes up for it"... Actually retina sort of does this. The user can specify a number of resolutions in the preferences CP, but they always only use 2x scaling at the rendering level. The default is a scaling preference where the screen appears exactly 2 pixels per logical scaled coordinate and there is no pixel scaling. But, if you specify some other preference for screen content, then they use pixel stretching to get from the 2x scale that the application sees to the size on the screen requested by the user's preference. I have to look at their algorithm, but I've always been under the impression that it isn't simple linear interpolation. Personally, I run my retina MBP screen, which has a native resolution of 2880x1800 and a "best for retina" scaling recommendation of "appears as if it is 1440x900" - but I run it in "appears like 1680x1050" mode so that I can fit more content on the screen. As a result, I am always getting some pixel stretching in reality, but I don't really notice it. This could be chalked up to "very Hi DPI screens cover a lot of pixel sins", or it could be "Apple chose an incredibly good pixel scaling filter". I need to look more into that. One thing to note is that this only works well on retina screens so it would probably not be a good technique for achieving the 125% scaling that many Windows screens request/recommend... ...jim From tomas.mikula at gmail.com Wed Feb 18 19:43:29 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Wed, 18 Feb 2015 14:43:29 -0500 Subject: Event when CSS is applied In-Reply-To: <54E4E8EB.6030905@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> <54E4E8EB.6030905@tbee.org> Message-ID: On Wed, Feb 18, 2015 at 2:32 PM, Tom Eugelink wrote: > On 18-2-2015 08:34, Tomas Mikula wrote: >> >> What I think should be done is, instead of trying to hack around Pane, >> create class NeedlePane that extends Region and overrides >> layoutChildren. It would create its children in the constructor (or >> take them as constructor parameters), add them to its children list >> right in the constructor and never clear them, and position them on >> the layout pass (i.e. in layoutChildren). >> > > Creating a DialPane is not such a problem, but creating a path only once and > the only layout it turns out to be more of a challenge: the constructed but > not yet correctly initialized path elements do not behave well with the > rotate. It is an approach with merrit though, especially in resizing. I meant my advice to apply only to Nodes. PathElements are not Nodes. For example, there is no CSS applied to them, only to the containing Path. I would just clear() and recreate them on each layout, if that is simpler. Since they are not nodes (thus not part of the scene graph by themselves), the comment about not modifying grand-children in layoutChildren does not apply to them. Best, Tomas > > Tom From james.graham at oracle.com Wed Feb 18 19:52:31 2015 From: james.graham at oracle.com (Jim Graham) Date: Wed, 18 Feb 2015 11:52:31 -0800 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: <54E465BC.5090607@media-interactive.de> References: <54E3EA95.2020203@oracle.com> <54E3F093.9070708@oracle.com> <54E465BC.5090607@media-interactive.de> Message-ID: <54E4ED7F.6090701@oracle.com> On 2/18/2015 2:13 AM, Werner Lehmann wrote: > Finally, it would be nice to get information about the actual screen > DPI. In my tests Screen.getDpi always returns 96, regardless of what it > actually is... I'm not sure if there is a legacy API for that value in Windows pre-Win8.1, but I know that we have been using "::GetDeviceCaps(hDC, LOGPIXELSX)" to get our value for Screen.getDPI(). That method returns the effective scale of a screen, which is what they want you to use to compute a scale factor that is relative to the users preferences. If the user chooses "I want to make things bigger or smaller on the screen" in the Displays CP, then they can request that the default font be 100%, 125%, 150% and sometimes 200% (and, on a Yoga Pro, they can even ask for 300%). Depending on that setting you will see 96, 120, 144, 192, or 288 from the LOGPIXELSX/Y and you are supposed to scale yourself by N/96.0. *NOTE* that you this setting does not change between logout/reboots so if the user changes this setting in the CP, it will continue to return the old information until they reboot or log out and log back in. Then the new settings will be retrieved. (I can see why they wouldn't want it to change dynamically when an app is running, but I'm disappointed that they don't allow it to change when an app is quit and restarted...) In Win8.1 they have a new method "GetDPIForMonitor(DPI_TYPE)" where you can ask for "Effective DPI" which is roughly the LOGPIXELSXY information that represents "scale yourself by N/96.0", or you can ask for "Raw DPI" which is the actual physical pixels per physical inch measurement. This value can also change dynamically if the user modifies their Display CP preferences. I plan to support the use of that new API soon, but it will only be effective in Windows 8.1 or later since the API was introduced in 8.1... ...jim From tbee at tbee.org Wed Feb 18 20:20:33 2015 From: tbee at tbee.org (Tom Eugelink) Date: Wed, 18 Feb 2015 21:20:33 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> <54E4E8EB.6030905@tbee.org> Message-ID: <54E4F411.8090703@tbee.org> I like the improvements to the code. Thanks! Tom From tomas.mikula at gmail.com Wed Feb 18 20:49:56 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Wed, 18 Feb 2015 15:49:56 -0500 Subject: Event when CSS is applied In-Reply-To: <54E4F411.8090703@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> <54E4E8EB.6030905@tbee.org> <54E4F411.8090703@tbee.org> Message-ID: So back to your original question: > Basically I would like to be informed when the styling of a node has been applied or changed. Is there some place that can provide this information? Turns out you don't actually need this information ;) Regards, Tomas On Wed, Feb 18, 2015 at 3:20 PM, Tom Eugelink wrote: > I like the improvements to the code. Thanks! > > Tom From tbee at tbee.org Wed Feb 18 21:37:02 2015 From: tbee at tbee.org (Tom Eugelink) Date: Wed, 18 Feb 2015 22:37:02 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> <54E4E8EB.6030905@tbee.org> <54E4F411.8090703@tbee.org> Message-ID: <54E505FE.4020401@tbee.org> On 18-2-2015 21:49, Tomas Mikula wrote: > So back to your original question: > >> Basically I would like to be informed when the styling of a node has been applied or changed. Is there some place that can provide this information? > Turns out you don't actually need this information ;) > Indeed. Pattern learned. What does surprise me is that JavaFX aims at doing things via composition, that is why almost everything is final, and where the structure in my original code comes from. This turns out is best solved with inheritance. Tom From tomas.mikula at gmail.com Wed Feb 18 21:50:14 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Wed, 18 Feb 2015 16:50:14 -0500 Subject: Event when CSS is applied In-Reply-To: <54E505FE.4020401@tbee.org> References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> <54E4E8EB.6030905@tbee.org> <54E4F411.8090703@tbee.org> <54E505FE.4020401@tbee.org> Message-ID: Hmm, my view is rather reverse to yours: The fact that the implementation of layout is best solved with inheritance is a sign that JavaFX does _not_ aim enough at doing things via composition. Tomas On Wed, Feb 18, 2015 at 4:37 PM, Tom Eugelink wrote: > > > On 18-2-2015 21:49, Tomas Mikula wrote: >> >> So back to your original question: >> >>> Basically I would like to be informed when the styling of a node has been >>> applied or changed. Is there some place that can provide this information? >> >> Turns out you don't actually need this information ;) >> > > > Indeed. Pattern learned. > > What does surprise me is that JavaFX aims at doing things via composition, > that is why almost everything is final, and where the structure in my > original code comes from. This turns out is best solved with inheritance. > > Tom > From tbee at tbee.org Thu Feb 19 07:20:31 2015 From: tbee at tbee.org (Tom Eugelink) Date: Thu, 19 Feb 2015 08:20:31 +0100 Subject: Event when CSS is applied In-Reply-To: References: <54E33BFB.9030105@tbee.org> <54E34733.9040001@oracle.com> <54E35AC7.10902@tbee.org> <54E388A8.8040801@tbee.org> <54E3900B.70404@oracle.com> <54E3BB27.5070803@tbee.org> <54E4354E.1000805@tbee.org> <54E4E8EB.6030905@tbee.org> <54E4F411.8090703@tbee.org> <54E505FE.4020401@tbee.org> Message-ID: <54E58EBF.7090303@tbee.org> (after a night's sleep) Well... I was trying to do things by composition and it did not work. My implemention worked, but it had to depend on a layoutChildren, only at the top level (Skin), which was not fine grained enough. Interesting is that for JFXtras Agenda I used the inherit pattern, but because Agenda has a lot of nested layout (week -> day -> appointment -> time, title, ...). Inheritance was used there out of a need for encapsulation; the composition code got very complex. But it probably saved me from a lot of CSS and layout woos. Now, back to the gauge, I just tried to see if I could hammer a composition pattern onto NeedlePane. The separation between construction and layout is a good thing, so I ended up doing this: - Removing the whole NeedlePane class and replace it with a "Pane needlePane = new Pane();" since we're doing absolute layout. - Convert the constructor to a method "private void constructNeedlePane()" - Convert the layoutChildren to a method "private void layoutNeedlePane()" - Then I tried to wire it up by listening to "needlePane.needsLayoutProperty()" That did not work... It worked partially, which was weird. What of course did work was hooking into layoutChildren(): final private Pane needlePane = new Pane() { @Override protected void layoutChildren() { super.layoutChildren(); layoutNeedlePane(); } }; So, now I have composed the layout with a smallish hack. But, getting back to my remark on Agenda... Encapsulation was a good thing there, and actually I like using "extends" (I always complain when things are final, and I cannot override). So I'm not too displeased with what we ended up with. ;-) Tom On 18-2-2015 22:50, Tomas Mikula wrote: > Hmm, my view is rather reverse to yours: > The fact that the implementation of layout is best solved with > inheritance is a sign that JavaFX does _not_ aim enough at doing > things via composition. > > Tomas > > On Wed, Feb 18, 2015 at 4:37 PM, Tom Eugelink wrote: >> >> On 18-2-2015 21:49, Tomas Mikula wrote: >>> So back to your original question: >>> >>>> Basically I would like to be informed when the styling of a node has been >>>> applied or changed. Is there some place that can provide this information? >>> Turns out you don't actually need this information ;) >>> >> >> Indeed. Pattern learned. >> >> What does surprise me is that JavaFX aims at doing things via composition, >> that is why almost everything is final, and where the structure in my >> original code comes from. This turns out is best solved with inheritance. >> >> Tom >> From joerg.wille at gmail.com Thu Feb 19 11:04:11 2015 From: joerg.wille at gmail.com (=?UTF-8?Q?J=C3=B6rg_Wille?=) Date: Thu, 19 Feb 2015 12:04:11 +0100 Subject: Are TouchEvents supposed to work on Mac OS X? Message-ID: I use OnTouchMoved Event in an application and the handler gets called on Windows 7 as I expected. But the handler gets never called when running the application on Mac OS X 10.9 although Gesture-Events rotate and zoom work. I tried by starting app with -Dcom.sun.javafx.touch=true but this does not work. Using -Dquantum.verbose=true reports many: "handleMouseEvent: unhandled type: 223" when moving a finger on the sceen. Might the monitor be the problem? Or is it not supposed to work? Btw, how can I enable logging and set log level for glass (e.g. to see some logging from native-glass/lens/input/udev/udevInput.c)? From vadim.pakhnushev at oracle.com Fri Feb 20 14:30:37 2015 From: vadim.pakhnushev at oracle.com (Vadim Pakhnushev) Date: Fri, 20 Feb 2015 17:30:37 +0300 Subject: In(Sanity) Testing Mondays Message-ID: <54E7450D.1040309@oracle.com> Reminder, Monday is our weekly sanity testing. You can find your testing assignment at: https://wiki.openjdk.java.net/display/OpenJFX/Sanity+Testing Also please remember that the repo will be locked from 1am PST until 1pm PST. Happy testing! Thanks, Vadim From johan at lodgon.com Fri Feb 20 15:47:42 2015 From: johan at lodgon.com (Johan Vos) Date: Fri, 20 Feb 2015 16:47:42 +0100 Subject: performance Message-ID: Hi, I am looking for a "standard" way to test "performance" of JavaFX on different platforms (especially mobile). I know there are a number of apps that show the fps, and it can also be measured in prism itself, but is there some benchmark app? Also, is there a quantitative standard for measuring the quality of how a JavaFX implementation responds to input events? The reason I'm asking the latter is because on iOS, the response on swipe events is "slower" than on Android -- but that's not a quantitative statement. I am confident we can improve this, but it would be nice to have some before and after numbers, to measure the improvements. Thanks, - Johan From hastebrot at gmail.com Fri Feb 20 16:28:12 2015 From: hastebrot at gmail.com (Benjamin Gudehus) Date: Fri, 20 Feb 2015 17:28:12 +0100 Subject: performance In-Reply-To: References: Message-ID: Hi Johan, >I am looking for a "standard" way to test "performance" of JavaFX on different platforms I'm also looking for this. We have a small testing suite for cartographic map render performance (i.e. a lot of shapes, caching, transformation handling). Well, this is no "standard" suite. I guess the Oracle performance team must have a testing suite. >Also, is there a quantitative standard for measuring the quality of how a JavaFX implementation responds to input events? I have no solution for event response time, but my current approach for javafx/render thread "usage" (i.e. how long does it take to render? which percentage of time is JavaFX idling or rendering?) is to add a listener to com.sun.javafx.logging.PulseLogger (the logger that normally outputs to standard output if -Djavafx.pulseLogger=true) and record calls to pulseStart(), pulseEnd(), renderStart() and renderEnd() as timestamp ranges. com.sun.javafx.logging.Logger also has newInput() which could be helpful for event response times. PulseLogger and PerformanceTracker are internally a little mess, but they deliver suitable information. Luckily it is possible to replace the private fields with custom logger implementations. --Benjamin On 2/20/15, Johan Vos wrote: > Hi, > > I am looking for a "standard" way to test "performance" of JavaFX on > different platforms (especially mobile). I know there are a number of apps > that show the fps, and it can also be measured in prism itself, but is > there some benchmark app? > > Also, is there a quantitative standard for measuring the quality of how a > JavaFX implementation responds to input events? The reason I'm asking the > latter is because on iOS, the response on swipe events is "slower" than on > Android -- but that's not a quantitative statement. > I am confident we can improve this, but it would be nice to have some > before and after numbers, to measure the improvements. > > Thanks, > > - Johan > From michael at netopyr.com Fri Feb 20 18:07:36 2015 From: michael at netopyr.com (Michael Heinrichs) Date: Fri, 20 Feb 2015 19:07:36 +0100 Subject: performance In-Reply-To: References: Message-ID: Hi Johan, I would be careful with using a benchmark app. The problem is that there is no typical JavaFX application and any kind of performance optimization must be heavily weighted against possible performance degradation for other types of applications. A benchmark app tends to skew your optimization effort towards optimizing mostly for the benchmark app. Instead I would extract benchmarks from applications where you see performance issues, e.g. I would try to extract a benchmark from the application where you noticed the slower swipe events, and optimize only until the performance becomes acceptable. This will still distort your optimization effort, but at least towards a real world issue. :) But I am pretty sure you are aware of the risks and want to use a benchmark app anyway. ;) A good suite of benchmarks is GUIMark 2 http://www.craftymind.com/guimark2/ . I think there is a JavaFX implementation, but I am not sure, if it is available. What is missing completely in GUIMark 2 are UI controls, which are the most important ingredient in many applications. I remember one very simple, but highly effective benchmark: just a ListView with many entries, which was scrolled up and down. (That particular use case was always killing us on mobile.) Now I would probably use a TableView or TreeTableView. When I investigated poor response time, I usually measured the time between triggering an event until the screen changed as a reaction. In my opinion, it does not make sense to measure an input event in isolation, because poor response time can be caused by something completely different, thus one should try to get as close as possible to what the user experiences. Cheers, Michael > On 20 Feb 2015, at 16:47, Johan Vos wrote: > > Hi, > > I am looking for a "standard" way to test "performance" of JavaFX on > different platforms (especially mobile). I know there are a number of apps > that show the fps, and it can also be measured in prism itself, but is > there some benchmark app? > > Also, is there a quantitative standard for measuring the quality of how a > JavaFX implementation responds to input events? The reason I'm asking the > latter is because on iOS, the response on swipe events is "slower" than on > Android -- but that's not a quantitative statement. > I am confident we can improve this, but it would be nice to have some > before and after numbers, to measure the improvements. > > Thanks, > > - Johan From kevin.rushforth at oracle.com Fri Feb 20 22:10:26 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 20 Feb 2015 14:10:26 -0800 Subject: HEADS-UP: [9] New WebKit + compiler upgrade for FX 9 Message-ID: <54E7B0D2.1000905@oracle.com> As a heads-up, I will push the following fixes to 9-dev today. If there are no build problems, they will be integrated to 9 master early next week and will be in JDK 9-b52. This will not affect 8u-dev (yet). 1) RT-36726: Update to the Latest Version of WebKit https://javafx-jira.kenai.com/browse/RT-36726 This has been developed (mostly by Anton Tarasov with help from a couple others) in an internal sandbox for the last few months, and has undergone much testing including a full webkit test cycle by our SQE team. The changeset patch is 185 Mbytes and touches 11,688 files including added, removed, modifiled files. I tried generating a webrev, but it is just too big and unweildy to upload (over 1.6 GBytes). You will be able to see the changset patch once I push it on Anton's behalf. This resolves many of the outstanding WebView crashes. 2) RT-40105: Enable new compilers by default for production builds https://javafx-jira.kenai.com/browse/RT-40105 http://cr.openjdk.java.net/~kcr/RT-40105/webrev.00/ Amy has already reviewed and approved these compiler update changes. The main difference is that the default compiler on Windows (Visual Studio 2013) and Mac (Xcode 5.1.1 with macosx10.9 sdk) has changed, although we will still build if you have older compilers. A couple notes about the compiler upgrade: * This is targeted for 9-dev, so it will not affect most developers yet since 8u-dev is still where most work is happening. And even if you do build 9-dev, the existing compilers (e.g., VS 2010 for windows) will build everything just fine except WebKit, which most developers don't build anyway. We do hope to backport this to 8u-dev in 3 or 4 weeks time, so be on the look out. I plan to give one week's notice when that happens, and we will have hopefully worked out the bugs by then so it shouldn't disrupt too much. * For Linux users: you will need to use Ubuntu 14.04 or Oracle Linux 7 (or RHEL 7) if you want to run WebView programs. It will no longer run on Ubuntu 13 or earlier. Everything else should run OK, but is no longer going to be supported. * For Windows and Mac users you should be fine as long as don't want to build Webkit on older platforms / compilers. WebView programs should continue to run, although this hasn't been well tested. Let me know if you have any questions. -- Kevin From mike at plan99.net Fri Feb 20 22:30:15 2015 From: mike at plan99.net (Mike Hearn) Date: Fri, 20 Feb 2015 23:30:15 +0100 Subject: HEADS-UP: [9] New WebKit + compiler upgrade for FX 9 In-Reply-To: <54E7B0D2.1000905@oracle.com> References: <54E7B0D2.1000905@oracle.com> Message-ID: > > The changeset patch is 185 Mbytes and touches 11,688 files including > added, removed, modifiled files. I tried generating a webrev, but it is > just too big and unweildy to upload (over 1.6 GBytes). A 185 megabyte patch!? That is ...... mind boggling. I don't envy you guys! Couple of questions: 1) I'm curious if there are plans to sync with WebKit upstream more frequently from now on to try and reduce the pain of upgrades. As WebKit is so complex and security sensitive, and not sandboxed in the same way as Chrome, regular updates seem vital for security. Of course this doesn't matter if you are just rendering your own content but for displaying potentially hostile content, it seems important. 2) Have you considered using Blink instead, perhaps that way you would get the sandboxing tech from Chromium? Or does the WebKit JFX uses now have cross-platform sandboxing in it as well? Thanks! From kevin.rushforth at oracle.com Fri Feb 20 22:35:49 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 20 Feb 2015 14:35:49 -0800 Subject: HEADS-UP: [9] New WebKit + compiler upgrade for FX 9 In-Reply-To: References: <54E7B0D2.1000905@oracle.com> Message-ID: <54E7B6C5.8080208@oracle.com> Quick answers: 1) Yes, we hope to get on a more regular cadence with updates. This one was particularly painful because WebKit moved to requiring C++11 meaning it was dependent on the compiler upgrade. The next one might be somewhat painful as well since they have moved from Qmake to Automake. 2) We've only thought about using Blink in a "Hmm, I wonder if that might make sense some day" sense. We haven't given any serious thought to it. Anton might have some thoughts on the sandboxing question. -- Kevin Mike Hearn wrote: > > The changeset patch is 185 Mbytes and touches 11,688 files > including added, removed, modifiled files. I tried generating a > webrev, but it is just too big and unweildy to upload (over 1.6 > GBytes). > > > A 185 megabyte patch!? That is ...... mind boggling. I don't envy you > guys! > > Couple of questions: > > 1) I'm curious if there are plans to sync with WebKit upstream more > frequently from now on to try and reduce the pain of upgrades. As > WebKit is so complex and security sensitive, and not sandboxed in the > same way as Chrome, regular updates seem vital for security. Of course > this doesn't matter if you are just rendering your own content but for > displaying potentially hostile content, it seems important. > > > 2) Have you considered using Blink instead, perhaps that way you would > get the sandboxing tech from Chromium? Or does the WebKit JFX uses now > have cross-platform sandboxing in it as well? > > > Thanks! From felix.bembrick at gmail.com Fri Feb 20 23:13:36 2015 From: felix.bembrick at gmail.com (Felix Bembrick) Date: Sat, 21 Feb 2015 10:13:36 +1100 Subject: performance In-Reply-To: References: Message-ID: As some of you are aware I have been working on an application I call FXMark which may do at least some of these things that you are looking for. Unfortunately due to some rather tragic recent personal events and circumstances it has been delayed very much but I am working on it now again and hope to be available as soon as possible. However, given that those circumstances I mentioned are still on-going and it's difficult to tell when things might improve, I am not in a position to commit to any kind of release date at this stage. Sorry I cannot provide any more info than that be I thought you'd at least like to know that an app which may be what your looking for is currently well under development. Cheers, Felix On 21 February 2015 at 05:07, Michael Heinrichs wrote: > Hi Johan, > > I would be careful with using a benchmark app. The problem is that there > is no typical JavaFX application and any kind of performance optimization > must be heavily weighted against possible performance degradation for other > types of applications. A benchmark app tends to skew your optimization > effort towards optimizing mostly for the benchmark app. Instead I would > extract benchmarks from applications where you see performance issues, e.g. > I would try to extract a benchmark from the application where you noticed > the slower swipe events, and optimize only until the performance becomes > acceptable. This will still distort your optimization effort, but at least > towards a real world issue. :) > > But I am pretty sure you are aware of the risks and want to use a > benchmark app anyway. ;) A good suite of benchmarks is GUIMark 2 > http://www.craftymind.com/guimark2/ . > I think there is a JavaFX implementation, but I am not sure, if it is > available. What is missing completely in GUIMark 2 are UI controls, which > are the most important ingredient in many applications. I remember one very > simple, but highly effective benchmark: just a ListView with many entries, > which was scrolled up and down. (That particular use case was always > killing us on mobile.) Now I would probably use a TableView or > TreeTableView. > > When I investigated poor response time, I usually measured the time > between triggering an event until the screen changed as a reaction. In my > opinion, it does not make sense to measure an input event in isolation, > because poor response time can be caused by something completely different, > thus one should try to get as close as possible to what the user > experiences. > > Cheers, > Michael > > > > > On 20 Feb 2015, at 16:47, Johan Vos wrote: > > > > Hi, > > > > I am looking for a "standard" way to test "performance" of JavaFX on > > different platforms (especially mobile). I know there are a number of > apps > > that show the fps, and it can also be measured in prism itself, but is > > there some benchmark app? > > > > Also, is there a quantitative standard for measuring the quality of how a > > JavaFX implementation responds to input events? The reason I'm asking the > > latter is because on iOS, the response on swipe events is "slower" than > on > > Android -- but that's not a quantitative statement. > > I am confident we can improve this, but it would be nice to have some > > before and after numbers, to measure the improvements. > > > > Thanks, > > > > - Johan > > From michael at netopyr.com Sat Feb 21 13:06:07 2015 From: michael at netopyr.com (Michael Heinrichs) Date: Sat, 21 Feb 2015 14:06:07 +0100 Subject: Gradients w/o BGRA_PRE Message-ID: Hi, I am experimenting with JavaFX on top of WebGL. Right now I am stuck implementing gradients, but maybe somebody from this list can help. WebGL usually does not support the pixel format BGRA_PRE. From my understanding, the ES2 renderer should work with such a configuration, too. But when I try to use a gradient, at some point PaintHelper.initGradientTextures() is called, which requires the pixel format BGRA_PRE Obviously something about my configuration is wrong. But I cannot figure out, where the alternative implementation resides. How should the implementation of gradients work if BGRA_PRE is not available? Thanks, Michael From be.gentner at googlemail.com Sun Feb 22 16:12:56 2015 From: be.gentner at googlemail.com (Benjamin Gentner) Date: Sun, 22 Feb 2015 17:12:56 +0100 Subject: Deploy javafx.beans.property.* as separate JAR library Message-ID: <1424621576.2857.0.camel@googlemail.com> Hello, any possibility to release the functionality contained in javafx.beans.property.* and required dependencies as separate JAR library? It may be useful for various applications which don't use JavaFX to separate view (presentation) and domain model. I use observable properties from JavaFX for a game prototype written in Java and libGDX currently. I simply use a part of the sources from the OpenJFX project. Are there any plans to release that part of JavaFX as a separate independent library? If not can I release that part on Github with the same license? What steps should I do before? A few points: - Migrate packages from javafx.* to something different? - Break dependencies to hidden/private JDK/OpenFX classes - Remove all classes and functionality which are not required for observable properties Regards, beegee From james.graham at oracle.com Sun Feb 22 23:55:35 2015 From: james.graham at oracle.com (Jim Graham) Date: Sun, 22 Feb 2015 15:55:35 -0800 Subject: Gradients w/o BGRA_PRE In-Reply-To: References: Message-ID: <54EA6C77.607@oracle.com> Hi Michael, What error are you seeing, or is it just rendering incorrectly? Looking at the code in ES2Texture.uploadPixels() it looks like ES2 might support BGRA via an extension. Perhaps we've only encountered platforms with that extension so far. Otherwise, if I read the code correctly it looks like we will just pretend the incoming data is in RGBA format, which would mean that the rendering would happen, but the red and blue components would be swapped. Is that what you are seeing? ...jim On 2/21/2015 5:06 AM, Michael Heinrichs wrote: > Hi, > > I am experimenting with JavaFX on top of WebGL. Right now I am stuck implementing gradients, but maybe somebody from this list can help. > > WebGL usually does not support the pixel format BGRA_PRE. From my understanding, the ES2 renderer should work with such a configuration, too. But when I try to use a gradient, at some point PaintHelper.initGradientTextures() is called, which requires the pixel format BGRA_PRE Obviously something about my configuration is wrong. But I cannot figure out, where the alternative implementation resides. How should the implementation of gradients work if BGRA_PRE is not available? > > Thanks, > Michael > From tbee at tbee.org Mon Feb 23 08:03:20 2015 From: tbee at tbee.org (Tom Eugelink) Date: Mon, 23 Feb 2015 09:03:20 +0100 Subject: focus property in composed control Message-ID: <54EADEC8.5020702@tbee.org> JFXtras has a number of extended textfields (BigDecimal, Calendar, LocalDate, ...). These controls use a TextField in their skin to compose this control. These extended textfield controls have a readonly focusProperty()... What would be the best way to forward the focusProperty of the TextField to the control's focusProperty? - Binding is not possible, because it is read only. - Setting the value in the skin is not possible, because it is read only. - setFocused method is protected final What works is the following setup: - create a _public_ focusForwardProperty in the Skin - listen to the focusProperty of TextField and set the focusForwardProperty accordingly - listen to the skinProperty in the Control and when set, bind a listener to the focusForwardProperty - in this listener call setFocused with the value of focusForwardProperty This approach at least prevents the control's API to be polluted with public methods, but requires a property just for the sake of publishing the value. Ideally one would like to bind both focusProperties. Tom From michael at netopyr.com Mon Feb 23 08:33:38 2015 From: michael at netopyr.com (Michael Heinrichs) Date: Mon, 23 Feb 2015 09:33:38 +0100 Subject: focus property in composed control In-Reply-To: <54EADEC8.5020702@tbee.org> References: <54EADEC8.5020702@tbee.org> Message-ID: <0FC1F191-7DE3-4A94-B8CE-A659A81A244A@netopyr.com> Hi Tom, can you provide a code example? I am not sure I understand all the details correctly. :) In particular it is important to know which of the properties are defined in your code and which properties you are just using. For example it is possible to bind a readonly property, but only if it is defined in your code. Cheers, Michael > On 23 Feb 2015, at 09:03, Tom Eugelink wrote: > > JFXtras has a number of extended textfields (BigDecimal, Calendar, LocalDate, ...). These controls use a TextField in their skin to compose this control. These extended textfield controls have a readonly focusProperty()... What would be the best way to forward the focusProperty of the TextField to the control's focusProperty? > - Binding is not possible, because it is read only. > - Setting the value in the skin is not possible, because it is read only. > - setFocused method is protected final > > What works is the following setup: > - create a _public_ focusForwardProperty in the Skin > - listen to the focusProperty of TextField and set the focusForwardProperty accordingly > - listen to the skinProperty in the Control and when set, bind a listener to the focusForwardProperty > - in this listener call setFocused with the value of focusForwardProperty > > This approach at least prevents the control's API to be polluted with public methods, but requires a property just for the sake of publishing the value. Ideally one would like to bind both focusProperties. > > Tom From michael at netopyr.com Mon Feb 23 09:51:13 2015 From: michael at netopyr.com (Michael Heinrichs) Date: Mon, 23 Feb 2015 10:51:13 +0100 Subject: Gradients w/o BGRA_PRE In-Reply-To: <54EA6C77.607@oracle.com> References: <54EA6C77.607@oracle.com> Message-ID: <3A0C6623-8AD6-4C9B-8A67-FBD6FB8C80BE@netopyr.com> Hi Jim, thanks for your reply. Right now I do not see anything. PaintHelper.initGradientTextures() eventually calls ES2Texture.create(), which checks if the requested pixel format is supported. This test fails in my case, because WebGL is ES2 only and the extension is not supported. But when I disable this test and pretend that BGRA is RGBA, I see exactly what you describe: the red and the blue channel are swapped. Thanks, Michael > On 23 Feb 2015, at 00:55, Jim Graham wrote: > > Hi Michael, > > What error are you seeing, or is it just rendering incorrectly? > > Looking at the code in ES2Texture.uploadPixels() it looks like ES2 might support BGRA via an extension. Perhaps we've only encountered platforms with that extension so far. Otherwise, if I read the code correctly it looks like we will just pretend the incoming data is in RGBA format, which would mean that the rendering would happen, but the red and blue components would be swapped. Is that what you are seeing? > > ...jim > > On 2/21/2015 5:06 AM, Michael Heinrichs wrote: >> Hi, >> >> I am experimenting with JavaFX on top of WebGL. Right now I am stuck implementing gradients, but maybe somebody from this list can help. >> >> WebGL usually does not support the pixel format BGRA_PRE. From my understanding, the ES2 renderer should work with such a configuration, too. But when I try to use a gradient, at some point PaintHelper.initGradientTextures() is called, which requires the pixel format BGRA_PRE Obviously something about my configuration is wrong. But I cannot figure out, where the alternative implementation resides. How should the implementation of gradients work if BGRA_PRE is not available? >> >> Thanks, >> Michael >> From tbee at tbee.org Mon Feb 23 09:54:25 2015 From: tbee at tbee.org (Tom Eugelink) Date: Mon, 23 Feb 2015 10:54:25 +0100 Subject: focus property in composed control In-Reply-To: <0FC1F191-7DE3-4A94-B8CE-A659A81A244A@netopyr.com> References: <54EADEC8.5020702@tbee.org> <0FC1F191-7DE3-4A94-B8CE-A659A81A244A@netopyr.com> Message-ID: <54EAF8D1.1050802@tbee.org> It actually is fairly simple. This is what ideally should happen: CalendarTextField extends Control - Node has: ReadOnlyBooleanProperty focusProperty(); CalendarTextFieldSkin extends Skin - private TextField textField = new TextField(); - *getSkinnable().focusProperty().bind(textField.focusProperty())* But this is not allowed, so I got it working like this: CalendarTextFieldSkin extends Skin - private TextField textField = new TextField(); - public BooleanProperty focusForward = new SimpleBooleanProperty(); - textField.focusedProperty().addListener( (observable) -> { focusForward.set(textField.focusedProperty().get()); }); CalendarTextField extends Control - constructor: skinProperty().addListener( (observable) -> { Skin skin = getSkin(); if (skin instanceof CalendarTextFieldSkin) { CalendarTextFieldSkin lCalendarTextFieldSkin = (CalendarTextFieldSkin)skin; lCalendarTextFieldSkin.focusForward.addListener( (observable2) -> { *super.setFocused(lCalendarTextFieldSkin.focusForward.get());* }); } }); https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/CalendarTextFieldSkin.java line 146 and 209 https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/scene/control/CalendarTextField.java line 90 On 23-2-2015 09:33, Michael Heinrichs wrote: > Hi Tom, > > can you provide a code example? I am not sure I understand all the details correctly. :) In particular it is important to know which of the properties are defined in your code and which properties you are just using. For example it is possible to bind a readonly property, but only if it is defined in your code. > > Cheers, > Michael > > >> On 23 Feb 2015, at 09:03, Tom Eugelink wrote: >> >> JFXtras has a number of extended textfields (BigDecimal, Calendar, LocalDate, ...). These controls use a TextField in their skin to compose this control. These extended textfield controls have a readonly focusProperty()... What would be the best way to forward the focusProperty of the TextField to the control's focusProperty? >> - Binding is not possible, because it is read only. >> - Setting the value in the skin is not possible, because it is read only. >> - setFocused method is protected final >> >> What works is the following setup: >> - create a _public_ focusForwardProperty in the Skin >> - listen to the focusProperty of TextField and set the focusForwardProperty accordingly >> - listen to the skinProperty in the Control and when set, bind a listener to the focusForwardProperty >> - in this listener call setFocused with the value of focusForwardProperty >> >> This approach at least prevents the control's API to be polluted with public methods, but requires a property just for the sake of publishing the value. Ideally one would like to bind both focusProperties. >> >> Tom From lehmann at media-interactive.de Mon Feb 23 10:51:38 2015 From: lehmann at media-interactive.de (Werner Lehmann) Date: Mon, 23 Feb 2015 11:51:38 +0100 Subject: focus property in composed control In-Reply-To: <54EADEC8.5020702@tbee.org> References: <54EADEC8.5020702@tbee.org> Message-ID: <54EB063A.2030504@media-interactive.de> Hi Tom, lately I've been battling similar issues. One important thing I learned here is that if my custom control wraps a TextField in its skin I have to make sure that the custom control is not focus-traversable. It also seems difficult to have focus on the custom control in terms of Node.focused while actual focus is on the TextField in the skin. ComboBox may have the same issue with its embedded TextField. At least the FakeFocusTextField inside the ComboBoxListViewSkin looks like a workaround for this. But I can't do the same because this uses (package) private API. And the creative implementation of Node.FocusedProperty (to make sure that focus switch is an atomic change for focus change listeners) reminded me of Tomas' latest posting about "Suspendable listener notifications". This would be nice to have in FX so we don't need private workarounds... > http://tomasmikula.github.io/blog/2015/02/10/val-a-better-observablevalue.html Werner On 23.02.2015 09:03, Tom Eugelink wrote: > What would be the best way to forward the focusProperty of the > TextField to the control's focusProperty? From kevin.rushforth at oracle.com Mon Feb 23 16:16:24 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 23 Feb 2015 08:16:24 -0800 Subject: Deploy javafx.beans.property.* as separate JAR library In-Reply-To: <1424621576.2857.0.camel@googlemail.com> References: <1424621576.2857.0.camel@googlemail.com> Message-ID: <54EB5258.30706@oracle.com> JavaFX classes, including beans functionality, are delivered with the JDK and we have no plan to make them available separately. -- Kevin Benjamin Gentner wrote: > Hello, > > any possibility to release the functionality contained in > javafx.beans.property.* and required dependencies as separate JAR > library? It may be useful for various applications which don't use > JavaFX to separate view (presentation) and domain model. > > I use observable properties from JavaFX for a game prototype written in > Java and libGDX currently. I simply use a part of the sources from the > OpenJFX project. Are there any plans to release that part of JavaFX as a > separate independent library? If not can I release that part on Github > with the same license? What steps should I do before? A few points: > > - Migrate packages from javafx.* to something different? > - Break dependencies to hidden/private JDK/OpenFX classes > - Remove all classes and functionality which are not required for > observable properties > > > Regards, > beegee > > From tomas.mikula at gmail.com Mon Feb 23 16:33:01 2015 From: tomas.mikula at gmail.com (Tomas Mikula) Date: Mon, 23 Feb 2015 11:33:01 -0500 Subject: Deploy javafx.beans.property.* as separate JAR library In-Reply-To: <54EB5258.30706@oracle.com> References: <1424621576.2857.0.camel@googlemail.com> <54EB5258.30706@oracle.com> Message-ID: This seems to me like a good candidate for modularization when project Jigsaw [1] arrives. [1] http://openjdk.java.net/projects/jigsaw/ On Mon, Feb 23, 2015 at 11:16 AM, Kevin Rushforth wrote: > JavaFX classes, including beans functionality, are delivered with the JDK > and we have no plan to make them available separately. > > -- Kevin > > > Benjamin Gentner wrote: >> >> Hello, >> >> any possibility to release the functionality contained in >> javafx.beans.property.* and required dependencies as separate JAR >> library? It may be useful for various applications which don't use >> JavaFX to separate view (presentation) and domain model. >> >> I use observable properties from JavaFX for a game prototype written in >> Java and libGDX currently. I simply use a part of the sources from the >> OpenJFX project. Are there any plans to release that part of JavaFX as a >> separate independent library? If not can I release that part on Github >> with the same license? What steps should I do before? A few points: >> >> - Migrate packages from javafx.* to something different? >> - Break dependencies to hidden/private JDK/OpenFX classes >> - Remove all classes and functionality which are not required for >> observable properties >> >> >> Regards, >> beegee >> >> From calegria at gmail.com Mon Feb 23 19:28:07 2015 From: calegria at gmail.com (Carlos Alegria Galicia) Date: Mon, 23 Feb 2015 13:28:07 -0600 Subject: crash on linux box Message-ID: Hi everyone, I have downloaded and built 8u60_b03 on linux, and my programs are crashing when I use certain JavaFx components. >From the hs_err file (attached), I can see that it seems to be an issue with my video driver (i915). I have an intel GMA card (GM965/GL960 integrated graphics controller) with the opensource driver on linux (Arch Linux). ?Does anyone have some pointers on where to find some info about this issue? Thanks, Carlos Alegr?a PS. An apology if this is not the correct mailist to post this question. Could not found a more suitable one in the site. From james.graham at oracle.com Mon Feb 23 19:53:47 2015 From: james.graham at oracle.com (Jim Graham) Date: Mon, 23 Feb 2015 11:53:47 -0800 Subject: Gradients w/o BGRA_PRE In-Reply-To: <3A0C6623-8AD6-4C9B-8A67-FBD6FB8C80BE@netopyr.com> References: <54EA6C77.607@oracle.com> <3A0C6623-8AD6-4C9B-8A67-FBD6FB8C80BE@netopyr.com> Message-ID: <54EB854B.7070101@oracle.com> Ah, I see. I was looking at the code that uploaded the pixels which behaved as I described, but I didn't check the texture creation code, which does look like it will reject it as you indicate. It looks like insertInterpColor, which computes the image data for the texture from the gradient colors, could handle either BGRA or RGBA just by changing the indices it uses. Is RGBA universally supported on Linux/OGL2/D3D? If so, then we could switch to that. Otherwise we'd have to factor in conditional BGRA vs RGBA tests into the appropriate places (probably just remember which was supported by the ResourceFactory in the initGradientTextures() function and have the insert() function test and modify its indices as appropriate)... ...jim On 2/23/2015 1:51 AM, Michael Heinrichs wrote: > Hi Jim, > > thanks for your reply. Right now I do not see anything. PaintHelper.initGradientTextures() eventually calls ES2Texture.create(), which checks if the requested pixel format is supported. This test fails in my case, because WebGL is ES2 only and the extension is not supported. But when I disable this test and pretend that BGRA is RGBA, I see exactly what you describe: the red and the blue channel are swapped. > > Thanks, > Michael > > >> On 23 Feb 2015, at 00:55, Jim Graham wrote: >> >> Hi Michael, >> >> What error are you seeing, or is it just rendering incorrectly? >> >> Looking at the code in ES2Texture.uploadPixels() it looks like ES2 might support BGRA via an extension. Perhaps we've only encountered platforms with that extension so far. Otherwise, if I read the code correctly it looks like we will just pretend the incoming data is in RGBA format, which would mean that the rendering would happen, but the red and blue components would be swapped. Is that what you are seeing? >> >> ...jim >> >> On 2/21/2015 5:06 AM, Michael Heinrichs wrote: >>> Hi, >>> >>> I am experimenting with JavaFX on top of WebGL. Right now I am stuck implementing gradients, but maybe somebody from this list can help. >>> >>> WebGL usually does not support the pixel format BGRA_PRE. From my understanding, the ES2 renderer should work with such a configuration, too. But when I try to use a gradient, at some point PaintHelper.initGradientTextures() is called, which requires the pixel format BGRA_PRE Obviously something about my configuration is wrong. But I cannot figure out, where the alternative implementation resides. How should the implementation of gradients work if BGRA_PRE is not available? >>> >>> Thanks, >>> Michael >>> > From james.graham at oracle.com Mon Feb 23 19:58:08 2015 From: james.graham at oracle.com (Jim Graham) Date: Mon, 23 Feb 2015 11:58:08 -0800 Subject: Gradients w/o BGRA_PRE In-Reply-To: <54EB854B.7070101@oracle.com> References: <54EA6C77.607@oracle.com> <3A0C6623-8AD6-4C9B-8A67-FBD6FB8C80BE@netopyr.com> <54EB854B.7070101@oracle.com> Message-ID: <54EB8650.9070105@oracle.com> Oh dear, it is a bit worse than that. The texture creation code doesn't even have an enum constant to specify BYTE_RGBA_PRE. It has BYTE_BGRA_PRE (which is used by this code with a byte array) and INT_RGBA_PRE (which would involve more than simply index twiddling to support). So, if INT_RGBA was universally supported, the code could be refactored to use that. If we have to do it conditionally, that could be done as well as I said below, but it would involve factoring "how do we store these components and into which array?" rather than just index twiddling... ...jim On 2/23/2015 11:53 AM, Jim Graham wrote: > Ah, I see. I was looking at the code that uploaded the pixels which > behaved as I described, but I didn't check the texture creation code, > which does look like it will reject it as you indicate. > > It looks like insertInterpColor, which computes the image data for the > texture from the gradient colors, could handle either BGRA or RGBA just > by changing the indices it uses. Is RGBA universally supported on > Linux/OGL2/D3D? If so, then we could switch to that. Otherwise we'd > have to factor in conditional BGRA vs RGBA tests into the appropriate > places (probably just remember which was supported by the > ResourceFactory in the initGradientTextures() function and have the > insert() function test and modify its indices as appropriate)... > > ...jim > > On 2/23/2015 1:51 AM, Michael Heinrichs wrote: >> Hi Jim, >> >> thanks for your reply. Right now I do not see anything. >> PaintHelper.initGradientTextures() eventually calls >> ES2Texture.create(), which checks if the requested pixel format is >> supported. This test fails in my case, because WebGL is ES2 only and >> the extension is not supported. But when I disable this test and >> pretend that BGRA is RGBA, I see exactly what you describe: the red >> and the blue channel are swapped. >> >> Thanks, >> Michael >> >> >>> On 23 Feb 2015, at 00:55, Jim Graham wrote: >>> >>> Hi Michael, >>> >>> What error are you seeing, or is it just rendering incorrectly? >>> >>> Looking at the code in ES2Texture.uploadPixels() it looks like ES2 >>> might support BGRA via an extension. Perhaps we've only encountered >>> platforms with that extension so far. Otherwise, if I read the code >>> correctly it looks like we will just pretend the incoming data is in >>> RGBA format, which would mean that the rendering would happen, but >>> the red and blue components would be swapped. Is that what you are >>> seeing? >>> >>> ...jim >>> >>> On 2/21/2015 5:06 AM, Michael Heinrichs wrote: >>>> Hi, >>>> >>>> I am experimenting with JavaFX on top of WebGL. Right now I am stuck >>>> implementing gradients, but maybe somebody from this list can help. >>>> >>>> WebGL usually does not support the pixel format BGRA_PRE. From my >>>> understanding, the ES2 renderer should work with such a >>>> configuration, too. But when I try to use a gradient, at some point >>>> PaintHelper.initGradientTextures() is called, which requires the >>>> pixel format BGRA_PRE Obviously something about my configuration is >>>> wrong. But I cannot figure out, where the alternative implementation >>>> resides. How should the implementation of gradients work if BGRA_PRE >>>> is not available? >>>> >>>> Thanks, >>>> Michael >>>> >> From johan at lodgon.com Mon Feb 23 20:01:03 2015 From: johan at lodgon.com (Johan Vos) Date: Mon, 23 Feb 2015 21:01:03 +0100 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: <54E3EA95.2020203@oracle.com> References: <54E3EA95.2020203@oracle.com> Message-ID: Hi Jim, Not sure this is really relevant to your thread, but I added HiDPI to Android recently. On my Nexus 5, with scale factor of 3 I noticed issues with e.g. ScrollPane, which has snapToPixel defaulting to true. The result was a blurry screen when scrolling. When I added a scrollPane.setSnapToPixel(false) line, the blurring was gone. Again, not sure this relates to your question, but in this case it seems a problem that the default behaviour tries to snap to an integer (1). - Johan 2015-02-18 2:27 GMT+01:00 Jim Graham : > I'm currently investigating what changes we need to make to get Windows > HiDPI support up and running. As it stands, anyone with a Hi DPI Windows > machine will see all Java and JavaFX programs run very tiny since the Java > executables have declared that we are "DPI Aware" in the program manifest > for a few releases now. That setting was necessary to prevent the platform > from pixel-scaling us back at a time when the actual DPIs of screens were > not that drastically different from the norm and pixel scaling looked > remarkably ugly compared to the amount of size difference it bought you. > > But, things are changing rapidly and there are a number of screens out > there now upon which Windows recommends that you should scale by 1.5x up to > 3x. A retina iMac or MacBook Pro (220 DPI) running Windows 7+, for > example, will request us to scale by 2x, we'll implicitly indicate that > we've heard that request by the fact that the Java manifest says we are > "System DPI Aware" and they'll trust our sizes in pixels even though we > calculated them based on a regular DPI screen - and we end up being half > the size we want and nearly unreadable. There are also Windows laptops > such as the Lenovo Yoga 2 Pro (released Oct 2013) and Yoga 3 Pro that have > nearly 300DPI screens where the default pixel scale requested is 3x. Java > and FX windows are even tinier and harder to read on those screens. > > (Side note: In FX, as it turns out, our "em" scaling in css is actually > DPI aware so if you sized everything using CSS and the "em", then you might > actually look OK. In practice, though, there are a ton of pixel dimensions > in the default L&F CSS files so you'd have to do quite a bit of > customization to make that work.) > > Adding a scale factor to the Windows platform code is not hard, and I have > that code up and running. But, we run into the following issues that > didn't come up when we did the retina port: > > - non-integer coordinates in events > > Our Mac code truncates and filters events to integers, but Windows may > specify non-integer scaling so this gets trickier now. Certainly we can > round or truncate, and filter for integers, but we end up in situations > where the user can see the mouse move, but the program does not react > because that event was filtered out. Note that a test program on the Mac > does show that we sometimes repeat Mouse coordinates on retina screens > which shows that even with the 2x scaling on Mac we are seeing repeated > coordinates - they are somewhat rare, though, since I think the Mac > internally only processes mouse moves in a virtual space. It will be much > more common with Windows more flexible scaling, though, since the mouse > cursor moves based on pixel distances, not based on filtered event > distances. > > - screen dimensions > > For a single screen we can simply divide by the pixel scale, but with 3x > scaling the division produces non-integers. This would also show up if we > embrace the 125% and 150% scales that Windows documents/APIs recommend we > support. > > But, a bigger issue happens with multi-monitor setups. The Mac lays out > the screens (in the Control Panel UI, and in the bounds they report) in > virtual coordinates based on the pixel scale. That, combined with the fact > that they use 2x scaling only and screens are even numbers of pixels in > size, means we can pass those numbers on and they don't look odd. But, > Windows allows a wider range of scales (125%, 150%, 200%, 300%) and it also > lays out screens in pixels which raises a couple of issues - non-integer > screen sizes for some combinations of scale factors and pixel sizes, and > also screens are supposed to lie against each others' edges so the user can > line them up perfectly in the Control Panel and if we try to represent that > same layout in "virtual scaled coordinates" the monitors may not line up > correctly. I'll get into more detail on that below. > > So, my questions to developers are: > > - Would seeing non-integer event coordinates break your code? > - Would seeing non-integer window sizes and positions break your code? > - Would non-integer screen sizes break your code? > - If we try to translate Windows Screen pixel sizes into virtual > coordinates and the layout doesn't quite represent what they see in the > Control Panel, how much of a problem is that? > - If we try to translate Windows Screen pixel sizes into virtual > coordinates and, due to a complex layout, our algorithm cannot get all of > the edges to match each other as they do in pixel space and we need to > punt, how much might it break code if there are gaps or overlaps in the > reported Screen bounds (i.e. this is worse than "the layout doesn't quite > look the same" I asked about above)? > - If we provide a flag or scale factor on the screens to indicate that the > dimensions provided are in pixels and you must convert your desired window > sizes by the indicated scale factor in order to know how big to make your > window - how much impact would that have? > - As a followup to "screens in pixel sizes", we could alternately arrange > so that specifying how big your Scene is and/or using the standard > setWidth()/setHeight() methods on stage and relying on default window > positioning or using the default "centerOnScreen()" types of positioning > methods could be taught to work regardless of what we decide here. It > would only be if you wanted to correlate all of the screens and come up > with your own x,y,w,h - that would be where you might need to be aware if > the screen dimensions are not in the same space as scene dimensions. > > To get an idea of the kinds of problems we might encounter when trying to > translate the screens into "virtual coordinates", consider that the default > layout of linearly placing all screens next to each other is easy to > translate (though if one screen doesn't "divide out" evenly then some of > the locations might be non-integers). But, consider a 3x3 grid of displays > (i.e. 9 monitors in a square grid layout). If they are identical then the > layout would be a perfectly aligned grid. If the middle screen has double > (or half) the resolution of the others then we have to either have it float > in the middle of a "virtual size" space that is too large for its > dimensions, or have it overlap the 8 screens around the outside, or push > the 8 screens around the outside away from each other so that they no > longer touch. Since the user laid the screens out in pixels in the Control > Panel UI, they believe that they may have created a perfect grid, but we > will have to present an imperfect grid to the JavaFX program if we want to > maintain the illusion that FX Screen object sizes are scaled. Even worse, > the adjustments we have to make would be heuristic and depending on what we > choose it might break what they wanted to achieve, or it might not matter, > it depends on what they were thinking and what we independently decided as > to how to best represent it. > > So, we could: > > - Expose the "screen dimensions are pixels which may not match the > coordinates in your scenes" property of Windows screens. This may cause > problems for programs that examine the screens and attempt to do their own > custom positioning, but should not matter to programs that trust the > default positioning, or centerOnScreen() method(s?). > > - Expose "screen dimensions are pixels", but make common APIs work in > Virtual coordinates - scene/stage.setWidth/Height() could be in virtual > coordinates for instance. Screen might have multiple getBounds() methods > depending on if you want virtual coordinates or pixel coordinates and only > relying on the pixel coordinate versions will work in Windows in all > cases. The issue here is that sometimes the base APIs might not correlate > well with each other, but they will make sense if you know the trick. > > - Try to convert Windows screens into logical coordinates that make > sense. It will work for 99% of cases probably most of which are single > screen or default linear layouts. In some number of corner cases, though, > we may get it wrong and the values you find in screen bounds could have > gaps or overlaps or bear no resemblance to how the user perceives his > workspace. > > - Any other ideas? > > ...jim > From james.graham at oracle.com Mon Feb 23 20:18:48 2015 From: james.graham at oracle.com (Jim Graham) Date: Mon, 23 Feb 2015 12:18:48 -0800 Subject: Question/feedback regarding Windows Hi DPI support and how it will affect applications In-Reply-To: References: <54E3EA95.2020203@oracle.com> Message-ID: <54EB8B28.1060002@oracle.com> Hi Johan, That is interesting, especially since it worked better without the snapToPixel. Also, with a scale factor of 3 integer coordinates should have been the same as pixel aligned coordinates, so it's unclear how the snapToPixel could have been at fault (it would have been snapToEvery3rdPixel which should have been just as smooth as "snap to every pixel"). Was it a scale factor of "3.0", or a scale factor of "something close to 3"? ...jim On 2/23/2015 12:01 PM, Johan Vos wrote: > Hi Jim, > > Not sure this is really relevant to your thread, but I added HiDPI to > Android recently. > On my Nexus 5, with scale factor of 3 I noticed issues with e.g. > ScrollPane, which has snapToPixel defaulting to true. The result was a > blurry screen when scrolling. When I added a > scrollPane.setSnapToPixel(false) line, the blurring was gone. Again, not > sure this relates to your question, but in this case it seems a problem > that the default behaviour tries to snap to an integer (1). > > - Johan > > 2015-02-18 2:27 GMT+01:00 Jim Graham >: > > I'm currently investigating what changes we need to make to get > Windows HiDPI support up and running. As it stands, anyone with a > Hi DPI Windows machine will see all Java and JavaFX programs run > very tiny since the Java executables have declared that we are "DPI > Aware" in the program manifest for a few releases now. That setting > was necessary to prevent the platform from pixel-scaling us back at > a time when the actual DPIs of screens were not that drastically > different from the norm and pixel scaling looked remarkably ugly > compared to the amount of size difference it bought you. > > But, things are changing rapidly and there are a number of screens > out there now upon which Windows recommends that you should scale by > 1.5x up to 3x. A retina iMac or MacBook Pro (220 DPI) running > Windows 7+, for example, will request us to scale by 2x, we'll > implicitly indicate that we've heard that request by the fact that > the Java manifest says we are "System DPI Aware" and they'll trust > our sizes in pixels even though we calculated them based on a > regular DPI screen - and we end up being half the size we want and > nearly unreadable. There are also Windows laptops such as the > Lenovo Yoga 2 Pro (released Oct 2013) and Yoga 3 Pro that have > nearly 300DPI screens where the default pixel scale requested is > 3x. Java and FX windows are even tinier and harder to read on those > screens. > > (Side note: In FX, as it turns out, our "em" scaling in css is > actually DPI aware so if you sized everything using CSS and the > "em", then you might actually look OK. In practice, though, there > are a ton of pixel dimensions in the default L&F CSS files so you'd > have to do quite a bit of customization to make that work.) > > Adding a scale factor to the Windows platform code is not hard, and > I have that code up and running. But, we run into the following > issues that didn't come up when we did the retina port: > > - non-integer coordinates in events > > Our Mac code truncates and filters events to integers, but Windows > may specify non-integer scaling so this gets trickier now. > Certainly we can round or truncate, and filter for integers, but we > end up in situations where the user can see the mouse move, but the > program does not react because that event was filtered out. Note > that a test program on the Mac does show that we sometimes repeat > Mouse coordinates on retina screens which shows that even with the > 2x scaling on Mac we are seeing repeated coordinates - they are > somewhat rare, though, since I think the Mac internally only > processes mouse moves in a virtual space. It will be much more > common with Windows more flexible scaling, though, since the mouse > cursor moves based on pixel distances, not based on filtered event > distances. > > - screen dimensions > > For a single screen we can simply divide by the pixel scale, but > with 3x scaling the division produces non-integers. This would also > show up if we embrace the 125% and 150% scales that Windows > documents/APIs recommend we support. > > But, a bigger issue happens with multi-monitor setups. The Mac lays > out the screens (in the Control Panel UI, and in the bounds they > report) in virtual coordinates based on the pixel scale. That, > combined with the fact that they use 2x scaling only and screens are > even numbers of pixels in size, means we can pass those numbers on > and they don't look odd. But, Windows allows a wider range of > scales (125%, 150%, 200%, 300%) and it also lays out screens in > pixels which raises a couple of issues - non-integer screen sizes > for some combinations of scale factors and pixel sizes, and also > screens are supposed to lie against each others' edges so the user > can line them up perfectly in the Control Panel and if we try to > represent that same layout in "virtual scaled coordinates" the > monitors may not line up correctly. I'll get into more detail on > that below. > > So, my questions to developers are: > > - Would seeing non-integer event coordinates break your code? > - Would seeing non-integer window sizes and positions break your code? > - Would non-integer screen sizes break your code? > - If we try to translate Windows Screen pixel sizes into virtual > coordinates and the layout doesn't quite represent what they see in > the Control Panel, how much of a problem is that? > - If we try to translate Windows Screen pixel sizes into virtual > coordinates and, due to a complex layout, our algorithm cannot get > all of the edges to match each other as they do in pixel space and > we need to punt, how much might it break code if there are gaps or > overlaps in the reported Screen bounds (i.e. this is worse than "the > layout doesn't quite look the same" I asked about above)? > - If we provide a flag or scale factor on the screens to indicate > that the dimensions provided are in pixels and you must convert your > desired window sizes by the indicated scale factor in order to know > how big to make your window - how much impact would that have? > - As a followup to "screens in pixel sizes", we could alternately > arrange so that specifying how big your Scene is and/or using the > standard setWidth()/setHeight() methods on stage and relying on > default window positioning or using the default "centerOnScreen()" > types of positioning methods could be taught to work regardless of > what we decide here. It would only be if you wanted to correlate > all of the screens and come up with your own x,y,w,h - that would be > where you might need to be aware if the screen dimensions are not in > the same space as scene dimensions. > > To get an idea of the kinds of problems we might encounter when > trying to translate the screens into "virtual coordinates", consider > that the default layout of linearly placing all screens next to each > other is easy to translate (though if one screen doesn't "divide > out" evenly then some of the locations might be non-integers). But, > consider a 3x3 grid of displays (i.e. 9 monitors in a square grid > layout). If they are identical then the layout would be a perfectly > aligned grid. If the middle screen has double (or half) the > resolution of the others then we have to either have it float in the > middle of a "virtual size" space that is too large for its > dimensions, or have it overlap the 8 screens around the outside, or > push the 8 screens around the outside away from each other so that > they no longer touch. Since the user laid the screens out in pixels > in the Control Panel UI, they believe that they may have created a > perfect grid, but we will have to present an imperfect grid to the > JavaFX program if we want to maintain the illusion that FX Screen > object sizes are scaled. Even worse, the adjustments we have to > make would be heuristic and depending on what we choose it might > break what they wanted to achieve, or it might not matter, it > depends on what they were thinking and what we independently decided > as to how to best represent it. > > So, we could: > > - Expose the "screen dimensions are pixels which may not match the > coordinates in your scenes" property of Windows screens. This may > cause problems for programs that examine the screens and attempt to > do their own custom positioning, but should not matter to programs > that trust the default positioning, or centerOnScreen() method(s?). > > - Expose "screen dimensions are pixels", but make common APIs work > in Virtual coordinates - scene/stage.setWidth/Height() could be in > virtual coordinates for instance. Screen might have multiple > getBounds() methods depending on if you want virtual coordinates or > pixel coordinates and only relying on the pixel coordinate versions > will work in Windows in all cases. The issue here is that sometimes > the base APIs might not correlate well with each other, but they > will make sense if you know the trick. > > - Try to convert Windows screens into logical coordinates that make > sense. It will work for 99% of cases probably most of which are > single screen or default linear layouts. In some number of corner > cases, though, we may get it wrong and the values you find in screen > bounds could have gaps or overlaps or bear no resemblance to how the > user perceives his workspace. > > - Any other ideas? > > ...jim > > From kevin.rushforth at oracle.com Mon Feb 23 20:20:16 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 23 Feb 2015 12:20:16 -0800 Subject: crash on linux box In-Reply-To: References: Message-ID: <54EB8B80.5040003@oracle.com> The GM965 is a very old and unsupported graphics card. If you would like to file a JIRA [1] and include the output of: java -Dprism.verbose=true ... we'll take a look at blacklisting the driver. As a workaround you might try: java -Dprism.order=sw ... which is the SW fallback that we would automatically do if the card was blacklisted. -- Kevin [1] https://wiki.openjdk.java.net/display/OpenJFX/Submitting+a+Bug+Report Carlos Alegria Galicia wrote: > Hi everyone, > > I have downloaded and built 8u60_b03 on linux, and my programs are crashing > when I use certain JavaFx components. > > From the hs_err file (attached), I can see that it seems to be an issue > with my video driver (i915). I have an intel GMA card (GM965/GL960 > integrated graphics controller) with the opensource driver on linux (Arch > Linux). > > ?Does anyone have some pointers on where to find some info about this issue? > > Thanks, > Carlos Alegr?a > > PS. An apology if this is not the correct mailist to post this question. > Could not found a more suitable one in the site. > From kevin.rushforth at oracle.com Mon Feb 23 20:59:20 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 23 Feb 2015 12:59:20 -0800 Subject: 8u-dev unlocked following this week's sanity testing Message-ID: <54EB94A8.8040402@oracle.com> From calegria at gmail.com Mon Feb 23 21:09:54 2015 From: calegria at gmail.com (Carlos Alegria Galicia) Date: Mon, 23 Feb 2015 15:09:54 -0600 Subject: crash on linux box In-Reply-To: <54EB8B80.5040003@oracle.com> References: <54EB8B80.5040003@oracle.com> Message-ID: Kevin, Thanks for your answer. The workaround works. Will post the bug as soon as I can. -- Carlos Alegr?a On Mon, Feb 23, 2015 at 2:20 PM, Kevin Rushforth wrote: > The GM965 is a very old and unsupported graphics card. If you would like > to file a JIRA [1] and include the output of: > > java -Dprism.verbose=true ... > > we'll take a look at blacklisting the driver. As a workaround you might > try: > > java -Dprism.order=sw ... > > which is the SW fallback that we would automatically do if the card was > blacklisted. > > -- Kevin > > [1] https://wiki.openjdk.java.net/display/OpenJFX/Submitting+a+Bug+Report > > > > Carlos Alegria Galicia wrote: > >> Hi everyone, >> >> I have downloaded and built 8u60_b03 on linux, and my programs are >> crashing >> when I use certain JavaFx components. >> >> From the hs_err file (attached), I can see that it seems to be an issue >> with my video driver (i915). I have an intel GMA card (GM965/GL960 >> integrated graphics controller) with the opensource driver on linux (Arch >> Linux). >> >> ?Does anyone have some pointers on where to find some info about this >> issue? >> >> Thanks, >> Carlos Alegr?a >> >> PS. An apology if this is not the correct mailist to post this question. >> Could not found a more suitable one in the site. >> >> > From kevin.rushforth at oracle.com Tue Feb 24 00:42:20 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Mon, 23 Feb 2015 16:42:20 -0800 Subject: [8u] review request Message-ID: <54EBC8EC.2080008@oracle.com> David, Please review the following simple change to fast-fail the build with a more meaningful error message if the DirectX SDK (or Windows SDK) is not installed. https://javafx-jira.kenai.com/browse/RT-40125 http://cr.openjdk.java.net/~kcr/RT-40125/webrev.00/ Thanks. -- Kevin From dmitry.cherepanov at oracle.com Tue Feb 24 10:21:50 2015 From: dmitry.cherepanov at oracle.com (Dmitry Cherepanov) Date: Tue, 24 Feb 2015 13:21:50 +0300 Subject: [8u60] review request for RT-22993: Native installer - allow user to choose installation directory Message-ID: <54EC50BE.7050003@oracle.com> Danno, Could you please review the fix for RT-22993 JIRA: https://javafx-jira.kenai.com/browse/RT-22993 Webrev: http://cr.openjdk.java.net/~dcherepanov/RT-22993/webrev.0 Thanks, Dmitry From anton.tarasov at oracle.com Tue Feb 24 12:03:21 2015 From: anton.tarasov at oracle.com (Anton V. Tarasov) Date: Tue, 24 Feb 2015 15:03:21 +0300 Subject: HEADS-UP: [9] New WebKit + compiler upgrade for FX 9 In-Reply-To: <54E7B6C5.8080208@oracle.com> References: <54E7B0D2.1000905@oracle.com> <54E7B6C5.8080208@oracle.com> Message-ID: <54EC6889.2090806@oracle.com> Hi Mike, From the very beggining of the WebView project the idea behind it was to provide deep integration with JFX and the Java platform itself. That, btw, was one of the reason why the choice was made in favor of WebKit, which provided a good level of flexibility. As result, the WebView component has become a true JFX Node, smoothly fitting in the GUI (for instance, even the HTML input controls are made up of their JFX counterparts). So, WebView rendering design was subordinate to JFX architecture and its threading model. Also, the things like images and media processing are also integrated into JFX. What's specially important - networking. All the connections and data exchange are performed on behalf of the Java platform, allowing for the corresponding Java security policy to be applied. Thus, WebView relies on JFX and Java in terms of global security (this of course doesn't cover the lowlevel security of the native code where we rely on WebKit itself). I'm not aware of the details behind the Chromium "sandbox", but AFAICS its total sandboxing is achieved by means of deep integration with platform API (on every supported platform). This seems to be quite distant from the concepts behind JFX/WebView. What comes into the mind immediately is the fact that Chromium model demands a separate renderer (in a separate process) per sandbox, whereas JFX has a single Render thread on which WebView is rendered as well. So, switching to this architecture would either require serious rewrite of JFX (making it subordinate to WebView), or complete separation of WebView itself, virtually making the embedding model "heavyweight". Heavyweight embedding has its own pros and cons. However, the fact is that the embedding model initially chosen for the web component was "lightweight". So, I can just repeat what Kevin said: "I wonder if that might make sense some day"... Thanks, Anton. On 21.02.2015 1:35, Kevin Rushforth wrote: > Quick answers: > > 1) Yes, we hope to get on a more regular cadence with updates. This one was particularly painful > because WebKit moved to requiring C++11 meaning it was dependent on the compiler upgrade. The next > one might be somewhat painful as well since they have moved from Qmake to Automake. > > 2) We've only thought about using Blink in a "Hmm, I wonder if that might make sense some day" > sense. We haven't given any serious thought to it. Anton might have some thoughts on the > sandboxing question. > > -- Kevin > > > Mike Hearn wrote: >> >> The changeset patch is 185 Mbytes and touches 11,688 files including added, removed, >> modifiled files. I tried generating a webrev, but it is just too big and unweildy to upload >> (over 1.6 GBytes). >> >> >> A 185 megabyte patch!? That is ...... mind boggling. I don't envy you guys! >> >> Couple of questions: >> >> 1) I'm curious if there are plans to sync with WebKit upstream more frequently from now on to try >> and reduce the pain of upgrades. As WebKit is so complex and security sensitive, and not >> sandboxed in the same way as Chrome, regular updates seem vital for security. Of course this >> doesn't matter if you are just rendering your own content but for displaying potentially hostile >> content, it seems important. >> >> >> 2) Have you considered using Blink instead, perhaps that way you would get the sandboxing tech >> from Chromium? Or does the WebKit JFX uses now have cross-platform sandboxing in it as well? >> >> >> Thanks! From mike at plan99.net Tue Feb 24 12:24:03 2015 From: mike at plan99.net (Mike Hearn) Date: Tue, 24 Feb 2015 13:24:03 +0100 Subject: HEADS-UP: [9] New WebKit + compiler upgrade for FX 9 In-Reply-To: <54EC6889.2090806@oracle.com> References: <54E7B0D2.1000905@oracle.com> <54E7B6C5.8080208@oracle.com> <54EC6889.2090806@oracle.com> Message-ID: I see, thanks for the background Anton. I haven't used WebView in my own app (partly because it's security sensitive) so didn't realise how integrated the control is! That's indeed a very impressive level of integration. It's possible I'm over-thinking this. Disabling JavaScript is probably enough to satisfy many use cases with acceptable levels of security. Alternatively, occasionally I look around for a pure-Java HTML/CSS rendering engine. But most of the ones I've found are quite primitive. From anton.tarasov at oracle.com Tue Feb 24 15:59:53 2015 From: anton.tarasov at oracle.com (Anton V. Tarasov) Date: Tue, 24 Feb 2015 18:59:53 +0300 Subject: HEADS-UP: [9] New WebKit + compiler upgrade for FX 9 In-Reply-To: References: <54E7B0D2.1000905@oracle.com> <54E7B6C5.8080208@oracle.com> <54EC6889.2090806@oracle.com> Message-ID: <54EC9FF9.8010102@oracle.com> On 24.02.2015 15:24, Mike Hearn wrote: > I see, thanks for the background Anton. I haven't used WebView in my own app (partly because it's > security sensitive) so didn't realise how integrated the control is! That's indeed a very > impressive level of integration. You're welcome! > > It's possible I'm over-thinking this. Disabling JavaScript is probably enough to satisfy many use > cases with acceptable levels of security. > > Alternatively, occasionally I look around for a pure-Java HTML/CSS rendering engine. But most of > the ones I've found are quite primitive. I suppose so, because otherwise they would need to compete with WebKit that is a challenge... Regards, Anton. From navdeepsingh.sidhu95 at gmail.com Tue Feb 24 17:06:28 2015 From: navdeepsingh.sidhu95 at gmail.com (Navdeep Singh Sidhu) Date: Tue, 24 Feb 2015 22:36:28 +0530 Subject: Missing Text Problem Javafx JDK1.8u31 Message-ID: Hello, I am experiencing a weird problem with Javafx on Linux Mint Cinnamon 17.1 . Text in javafx application is missing as shown in attachment. Is this the problem of OS or am i missing some packages?? -- Regards Navdeep Singh Sidhu From morris.meyer at oracle.com Tue Feb 24 20:31:46 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Tue, 24 Feb 2015 15:31:46 -0500 Subject: [8u-dev] Review request: RT-39797: Glass sometimes prints warning message on exit Message-ID: <54ECDFB2.1040004@oracle.com> Folks, Could I get a review of these changes? As Glass invokeLater is not thread-safe, and since the JNI native method MacApplication._submitForLaterInvocation() only adds the GlassRunnable when the event thread is still running and Java is still around, I'm dealing with this extraneous GlassRunnable in a similar manner as RT-39688. Thanks, --morris WEBREV - http://cr.openjdk.java.net/~morris/RT-39797.01a JIRA - https://javafx-jira.kenai.com/browse/RT-39797 From james.graham at oracle.com Wed Feb 25 23:29:22 2015 From: james.graham at oracle.com (Jim Graham) Date: Wed, 25 Feb 2015 15:29:22 -0800 Subject: 8u60 Review request: RT-40041 Findbugs issue yt0 is dead code in Curve.refineTForY Message-ID: <54EE5AD2.2010408@oracle.com> webrev: http://cr.openjdk.java.net/~flar/RT-40041/webrev.00/ Jira: https://javafx-jira.kenai.com/browse/RT-40041 ...jim From johan at lodgon.com Thu Feb 26 09:18:37 2015 From: johan at lodgon.com (Johan Vos) Date: Thu, 26 Feb 2015 10:18:37 +0100 Subject: HiDPI scalefactor Message-ID: Hi, Another one on HiDPI. We had an issue on mobile where clicking a ComboBox showed the items on a wrong place on HiDPI devices. It turned out that this was due to a mismatch between logical and physical screensize. In the ES2SwapChain, the physical width is mainly used (e.g. in createGraphics). Hence, I made the AndroidScreen return the physical width (i.e. 320 pixels * scaleFactor 3). However, the getContentX() and getContentY() methods don't do that conversion in the case of embedded. When I modify this code like below, and take the scaling into account, it works. Should I create an issue for this, with the attached diff? This is not in embedded/mobile specific code, so I want to be extremely careful not to break anything. Thanks, - Johan diff -r 95ca0933010c modules/graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java --- a/modules/graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java Tue Feb 24 13:53:50 2015 +0100 +++ b/modules/graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java Thu Feb 26 10:06:33 2015 +0100 @@ -247,7 +247,7 @@ // EGL doesn't have a window manager, so we need to ask the window for // the x/y offset to use if (PlatformUtil.useEGL()) { - return pState.getWindowX(); + return (int)(pState.getWindowX() * pixelScaleFactor); } else { return 0; } @@ -257,8 +257,8 @@ // EGL doesn't have a window manager, so we need to ask the window // for the x/y offset to use if (PlatformUtil.useEGL()) { - return pState.getScreenHeight() - - pState.getHeight() - pState.getWindowY(); + return (int)((pState.getScreenHeight() - + pState.getHeight() - pState.getWindowY()) * pixelScaleFactor); } else { return 0; } From james.graham at oracle.com Thu Feb 26 10:42:49 2015 From: james.graham at oracle.com (Jim Graham) Date: Thu, 26 Feb 2015 02:42:49 -0800 Subject: HiDPI scalefactor In-Reply-To: References: Message-ID: <54EEF8A9.10807@oracle.com> Hi Johan, Can you file a Jira issue for this? ...jim On 2/26/15 1:18 AM, Johan Vos wrote: > Hi, > > Another one on HiDPI. > We had an issue on mobile where clicking a ComboBox showed the items on a > wrong place on HiDPI devices. > It turned out that this was due to a mismatch between logical and physical > screensize. In the ES2SwapChain, the physical width is mainly used (e.g. in > createGraphics). Hence, I made the AndroidScreen return the physical width > (i.e. 320 pixels * scaleFactor 3). > > However, the getContentX() and getContentY() methods don't do that > conversion in the case of embedded. When I modify this code like below, and > take the scaling into account, it works. > > Should I create an issue for this, with the attached diff? This is not in > embedded/mobile specific code, so I want to be extremely careful not to > break anything. > > Thanks, > > - Johan > > > diff -r 95ca0933010c > modules/graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java > --- a/modules/graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java Tue > Feb 24 13:53:50 2015 +0100 > +++ b/modules/graphics/src/main/java/com/sun/prism/es2/ES2SwapChain.java Thu > Feb 26 10:06:33 2015 +0100 > @@ -247,7 +247,7 @@ > // EGL doesn't have a window manager, so we need to ask the window > for > // the x/y offset to use > if (PlatformUtil.useEGL()) { > - return pState.getWindowX(); > + return (int)(pState.getWindowX() * pixelScaleFactor); > } else { > return 0; > } > @@ -257,8 +257,8 @@ > // EGL doesn't have a window manager, so we need to ask the window > // for the x/y offset to use > if (PlatformUtil.useEGL()) { > - return pState.getScreenHeight() - > - pState.getHeight() - pState.getWindowY(); > + return (int)((pState.getScreenHeight() - > + pState.getHeight() - pState.getWindowY()) * > pixelScaleFactor); > } else { > return 0; > } > From morris.meyer at oracle.com Thu Feb 26 22:45:25 2015 From: morris.meyer at oracle.com (Morris Meyer) Date: Thu, 26 Feb 2015 17:45:25 -0500 Subject: [8u-dev] Review request: RT-39108: [HelloCheckBox] Sample needs additional controls for Accessibility testing Message-ID: <54EFA205.7050606@oracle.com> Kevin, David and Jonathan, Could you please review my accessibility additions to HelloCheckBox? Thanks much, --morris WEBREV - http://cr.openjdk.java.net/~morris/RT-39108.01 JIRA - https://javafx-jira.kenai.com/browse/RT-39108 From adam at adamish.com Fri Feb 27 06:28:16 2015 From: adam at adamish.com (Adam Granger) Date: Fri, 27 Feb 2015 05:28:16 -0100 Subject: Integrating Spring with FXML nested controllers Message-ID: <2f005cd2a46467351b4dd8c16fc20c79.squirrel@webmail.adamish.com> I'd be interested in the groups opinions... From http://stackoverflow.com/questions/28741472/integrating-spring-with-fxml-nested-controllers I'm implementing a large application using JavaFX but unsure how to deal with nested controllers and Spring. * The FXML has already been provided by the design team and has up to 3 levels of nested FXML using the include mechanism. * Models will be defined in Spring * I need to inject the models into all the nested controllers * There are multiple instances of controllers of the same type. i.e. parts of the screen are identical but powered by different instances of the same model type. My work so far -------------- * I've read [Stephen Chin's blog - JavaFX in Spring Day 2 ? Configuration and FXML][1] and other SO questions however these only deals with top level controllers. * I experimented with FXMLLoader.setControllerFactory() mechanism and defining the controllers in the application context, however this only gives the class of the controller to create, which means there is no way to differentiate the two controllers of the same type but with different data. Problem with using controller factory: loader.setControllerFactory(new Callback, Object>() { @Override public Object call(Class param) { // OK but doesn't work when multiple instances controller of same type return context.getBean(param); } }); * My best approach so far is for the top level controller to be wired up using Stephen Chin approach. * For the case with multiple bean instances the parent controller will get references to the specific beans via @Autowire/@Qualifer and then set on the corresponding controller. * The next level of controllers can be wired up too by exposing them on the top level controller and calling autowire() Specific questions ------------------ * Is there anyway of using controller factory mechanism so I can define the controllers in the spring context instead so that it is easier to wire them up ? * Is there some other method I can use? Example ------- Spring context Top level Nested level Application main public class NestedControllersSpring extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/app-context.xml"); FXMLLoader loader = new FXMLLoader(getClass().getResource("/top-level.fxml")); stage.setScene(new Scene(loader.load())); TopLevelController top = loader.getController(); context.getAutowireCapableBeanFactory().autowireBean(top); context.getAutowireCapableBeanFactory().autowireBean(top.getAController()); context.getAutowireCapableBeanFactory().autowireBean(top.getBController()); top.init(); // needed because autowire doesn't call @PostConstruct stage.show(); } } Top level controller public class TopLevelController { @FXML private NestedController aController; @FXML private NestedController bController; @Autowired @Qualifier("modelA") private Model a; @Autowired @Qualifier("modelB") private Model b; @PostConstruct public void init() { aController.setModel(a); bController.setModel(b); } public NestedController getAController() { return aController; } public NestedController getBController() { return bController; } } [1]: http://steveonjava.com/javafx-in-spring-day-2/ From adam at adamish.com Fri Feb 27 06:43:46 2015 From: adam at adamish.com (Adam Granger) Date: Fri, 27 Feb 2015 05:43:46 -0100 Subject: Using JavaFX on VMWare / Linux Message-ID: The company I work at mandate Linux development is done on a Redhat 6.x guest within VMPlayer/Workstation on top of a Windows XP host. Previous debugging has led me to believe, correct me if I'm wrong, that drivers in the guest used to support OpenGL via VMWare expose the guests hardware/driver strings such as "vmware" etc, not the hosts hardware/driver. Sorry I've not got the details with me right now, they're at work, will update later... I'd like to know if 1) acceleration is expected to work on the guest if the host has a supported GPU configuration? 2) how the whitelist / blacklist system in prism works in this case? - I believe it sees "vmware" and then assumes vmware isn't "nvidia" etc. and gives up - how can it see the hosts physical GPU hardware/driver correctly to make an informed choice? 3) is it possible to disable/override the white/blacklist system albeit at risk? Kind regards, Adam. From chien.yang at oracle.com Fri Feb 27 07:11:34 2015 From: chien.yang at oracle.com (Chien Yang) Date: Thu, 26 Feb 2015 23:11:34 -0800 Subject: Using JavaFX on VMWare / Linux In-Reply-To: References: Message-ID: <54F018A6.3030105@oracle.com> Hi Adam, I would like to inform you that VMware is not a certified hypervisor for Oracle JDK 8 and JRE 8, and hardware rendering is not supported in guest systems on Oracle VM, VirtualBox and Hyper-V Server 2012. Please see this link for details information: http://www.oracle.com/technetwork/java/javase/certconfig-2095354.html - Chien On 2/26/15 10:43 PM, Adam Granger wrote: > The company I work at mandate Linux development is done on a Redhat 6.x > guest within VMPlayer/Workstation on top of a Windows XP host. > > Previous debugging has led me to believe, correct me if I'm wrong, that > drivers in the guest used to support OpenGL via VMWare expose the guests > hardware/driver strings such as "vmware" etc, not the hosts > hardware/driver. Sorry I've not got the details with me right now, they're > at work, will update later... > > I'd like to know if > > 1) acceleration is expected to work on the guest if the host has a > supported GPU configuration? > 2) how the whitelist / blacklist system in prism works in this case? > - I believe it sees "vmware" and then assumes vmware isn't "nvidia" > etc. and gives up > - how can it see the hosts physical GPU hardware/driver correctly to > make an informed choice? > 3) is it possible to disable/override the white/blacklist system albeit > at risk? > > Kind regards, > > Adam. > > > > From joerg.wille at gmail.com Fri Feb 27 08:26:12 2015 From: joerg.wille at gmail.com (=?UTF-8?Q?J=C3=B6rg_Wille?=) Date: Fri, 27 Feb 2015 09:26:12 +0100 Subject: Using JavaFX on VMWare / Linux Message-ID: Hi Adam, VMWare is not officially supported but as my test shows, only DirectX rendering does not work. If you do not have high workload for graphics in your application you can force software rendering by starting your application like this: java -Dprism.order=es2,j2d -jar app.jar (This tries out rendering engines in this order and leads to sw-rendering on windows and OpenGL on mac and linux) or if you package your app with the javapackager you can add this line to package.cfg: jvmarg.1=-Dprism.order=es2,j2d - Joerg From vadim.pakhnushev at oracle.com Fri Feb 27 14:30:54 2015 From: vadim.pakhnushev at oracle.com (Vadim Pakhnushev) Date: Fri, 27 Feb 2015 17:30:54 +0300 Subject: In(Sanity) Testing Mondays Message-ID: <54F07F9E.3010703@oracle.com> Reminder, Monday is our weekly sanity testing. You can find your testing assignment at: https://wiki.openjdk.java.net/display/OpenJFX/Sanity+Testing Also please remember that the repo will be locked from 1am PST until 1pm PST. Happy testing! Thanks, Vadim From victor.dyakov at oracle.com Fri Feb 27 14:51:23 2015 From: victor.dyakov at oracle.com (Victor D'yakov) Date: Fri, 27 Feb 2015 17:51:23 +0300 Subject: In(Sanity) Testing Mondays In-Reply-To: <54F07F9E.3010703@oracle.com> References: <54F07F9E.3010703@oracle.com> Message-ID: <54F0846B.5090404@oracle.com> Vadim, Please add Leif for Controls. Thanks, Victor On 27.02.2015 17:30, Vadim Pakhnushev wrote: > Reminder, Monday is our weekly sanity testing. > > You can find your testing assignment at: > > https://wiki.openjdk.java.net/display/OpenJFX/Sanity+Testing > > Also please remember that the repo will be locked from 1am PST until > 1pm PST. > > Happy testing! > > Thanks, > Vadim From kevin.rushforth at oracle.com Fri Feb 27 16:28:08 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 27 Feb 2015 08:28:08 -0800 Subject: Using JavaFX on VMWare / Linux In-Reply-To: References: Message-ID: <54F09B18.40403@oracle.com> We neither test nor recommend using the j2d pipeline for onscreen rendering, so that should be: java -Dprism.order=es2,sw ... -- Kevin J?rg Wille wrote: > Hi Adam, > VMWare is not officially supported but as my test shows, only DirectX > rendering does not work. If you do not have high workload for graphics in > your application you can force software rendering by starting your > application like this: > java -Dprism.order=es2,j2d -jar app.jar > (This tries out rendering engines in this order and leads to sw-rendering > on windows and OpenGL on mac and linux) > or if you package your app with the javapackager you can add this line to > package.cfg: > jvmarg.1=-Dprism.order=es2,j2d > > - Joerg > From kevin.rushforth at oracle.com Fri Feb 27 16:28:30 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 27 Feb 2015 08:28:30 -0800 Subject: Using JavaFX on VMWare / Linux In-Reply-To: <54F018A6.3030105@oracle.com> References: <54F018A6.3030105@oracle.com> Message-ID: <54F09B2E.2010709@oracle.com> Chien is correct that this is not a supported config. However, I know of cases where it has been used successfully without HW acceleration enabled (not sure whether it would work with HW acceleration, but there would be more risk in doing that). -- Kevin Chien Yang wrote: > Hi Adam, > > I would like to inform you that VMware is not a certified hypervisor > for Oracle JDK 8 and JRE 8, and hardware rendering is not supported in > guest systems on Oracle VM, VirtualBox and Hyper-V Server 2012. Please > see this link for details information: > > http://www.oracle.com/technetwork/java/javase/certconfig-2095354.html > > - Chien > > > On 2/26/15 10:43 PM, Adam Granger wrote: >> The company I work at mandate Linux development is done on a Redhat 6.x >> guest within VMPlayer/Workstation on top of a Windows XP host. >> >> Previous debugging has led me to believe, correct me if I'm wrong, that >> drivers in the guest used to support OpenGL via VMWare expose the guests >> hardware/driver strings such as "vmware" etc, not the hosts >> hardware/driver. Sorry I've not got the details with me right now, >> they're >> at work, will update later... >> >> I'd like to know if >> >> 1) acceleration is expected to work on the guest if the host has a >> supported GPU configuration? >> 2) how the whitelist / blacklist system in prism works in this case? >> - I believe it sees "vmware" and then assumes vmware isn't "nvidia" >> etc. and gives up >> - how can it see the hosts physical GPU hardware/driver >> correctly to >> make an informed choice? >> 3) is it possible to disable/override the white/blacklist system >> albeit >> at risk? >> >> Kind regards, >> >> Adam. >> >> >> >> > From johan at lodgon.com Fri Feb 27 19:06:44 2015 From: johan at lodgon.com (Johan Vos) Date: Fri, 27 Feb 2015 20:06:44 +0100 Subject: mobile status Message-ID: Hi, Quick update from the mobile ports: as you might know, LodgON is working together with RoboVM to work on the iOS port. There is some funding for this effort, so we could add more resources to it. One of the major goals is to have the Android port and the iOS port at the same level. If an API works on Android, it should work on iOS as well and vice versa. Most users of the mobile ports target both iOS and Android, and we want to provide WORA and FOPFAP (Fail One Platform, Fail All Platforms ;)). One of the major achievements is a gradle plugin we created, which allows to build Android and iOS executables using the same code and the same plugin. This plugin also retrieves the RoboVM AOT compiler form iOS artifacts, and it retrieves the JavaFX SDK's for Android and iOS, which are uploaded to Maven Central. Both the plugin as well as the SDK's are built on our Jenkins server, and uploaded as SNAPSHOTs to the snapshot repo. Builds are uploaded whenever we feel a major achievement is reached. The plugin is very easy to use, and it is described at http://javafxports.org/page/Getting_Started Note that we are currently at build 4 of the plugin, which uses build 4 of the JavaFX mobile SDK's. You can point the plugin to use older or newer versions of the SDK's. One of the next things we want to do, is to integrate with the java(fx)packager. In order to create our gradle plugin, we had to untangle step by step what is needed to create an Android Package or an iOS Package. If I understood it correctly, using these same steps should be possible in a java(fx)packager plugin. The other thing we have to do is to send all changes back to OpenJFX. There is some work involved here, as we made both specific as well as a few generic changes. However, I think that everyone could benefit from this work. We have to redo all our homework, and check line by line if it is really needed, working correctly, and not breaking anything. I think it makes no sense for doing this in the 8u40 branch anymore, but we should target 8u60 once 8u40 is released. Finally, many congratulations to the whole team (current and past developers) that created JavaFX. It is an amazing piece of software, and I personally don't think there is a better UI toolkit available (at least for Java developers like I am). I hope the availability of JavaFX on Mobile can have a positive impact on the whole JavaFX platform. I'll be back later with more (also commercial) news. - Johan From michael at netopyr.com Fri Feb 27 22:29:03 2015 From: michael at netopyr.com (Michael Heinrichs) Date: Fri, 27 Feb 2015 23:29:03 +0100 Subject: Gradients w/o BGRA_PRE In-Reply-To: <54EB8650.9070105@oracle.com> References: <54EA6C77.607@oracle.com> <3A0C6623-8AD6-4C9B-8A67-FBD6FB8C80BE@netopyr.com> <54EB854B.7070101@oracle.com> <54EB8650.9070105@oracle.com> Message-ID: <16E66751-5FB3-4F9E-A05F-84B5FFE67D72@netopyr.com> Hi Jim, after disabling the test and switching the channels in insertInterpColor(), gradients are rendered correctly. It is a hack, but it works for now. :) Thanks for the hint. The format supported by default in ES 2.0 is actually BYTE_RGBA and not INT_RGBA. I think it makes sense to use a byte array in both cases as you initially suggested. - Michael > On 23 Feb 2015, at 20:58, Jim Graham wrote: > > Oh dear, it is a bit worse than that. The texture creation code doesn't even have an enum constant to specify BYTE_RGBA_PRE. It has BYTE_BGRA_PRE (which is used by this code with a byte array) and INT_RGBA_PRE (which would involve more than simply index twiddling to support). > > So, if INT_RGBA was universally supported, the code could be refactored to use that. If we have to do it conditionally, that could be done as well as I said below, but it would involve factoring "how do we store these components and into which array?" rather than just index twiddling... > > ...jim > > On 2/23/2015 11:53 AM, Jim Graham wrote: >> Ah, I see. I was looking at the code that uploaded the pixels which >> behaved as I described, but I didn't check the texture creation code, >> which does look like it will reject it as you indicate. >> >> It looks like insertInterpColor, which computes the image data for the >> texture from the gradient colors, could handle either BGRA or RGBA just >> by changing the indices it uses. Is RGBA universally supported on >> Linux/OGL2/D3D? If so, then we could switch to that. Otherwise we'd >> have to factor in conditional BGRA vs RGBA tests into the appropriate >> places (probably just remember which was supported by the >> ResourceFactory in the initGradientTextures() function and have the >> insert() function test and modify its indices as appropriate)... >> >> ...jim >> >> On 2/23/2015 1:51 AM, Michael Heinrichs wrote: >>> Hi Jim, >>> >>> thanks for your reply. Right now I do not see anything. >>> PaintHelper.initGradientTextures() eventually calls >>> ES2Texture.create(), which checks if the requested pixel format is >>> supported. This test fails in my case, because WebGL is ES2 only and >>> the extension is not supported. But when I disable this test and >>> pretend that BGRA is RGBA, I see exactly what you describe: the red >>> and the blue channel are swapped. >>> >>> Thanks, >>> Michael >>> >>> >>>> On 23 Feb 2015, at 00:55, Jim Graham wrote: >>>> >>>> Hi Michael, >>>> >>>> What error are you seeing, or is it just rendering incorrectly? >>>> >>>> Looking at the code in ES2Texture.uploadPixels() it looks like ES2 >>>> might support BGRA via an extension. Perhaps we've only encountered >>>> platforms with that extension so far. Otherwise, if I read the code >>>> correctly it looks like we will just pretend the incoming data is in >>>> RGBA format, which would mean that the rendering would happen, but >>>> the red and blue components would be swapped. Is that what you are >>>> seeing? >>>> >>>> ...jim >>>> >>>> On 2/21/2015 5:06 AM, Michael Heinrichs wrote: >>>>> Hi, >>>>> >>>>> I am experimenting with JavaFX on top of WebGL. Right now I am stuck >>>>> implementing gradients, but maybe somebody from this list can help. >>>>> >>>>> WebGL usually does not support the pixel format BGRA_PRE. From my >>>>> understanding, the ES2 renderer should work with such a >>>>> configuration, too. But when I try to use a gradient, at some point >>>>> PaintHelper.initGradientTextures() is called, which requires the >>>>> pixel format BGRA_PRE Obviously something about my configuration is >>>>> wrong. But I cannot figure out, where the alternative implementation >>>>> resides. How should the implementation of gradients work if BGRA_PRE >>>>> is not available? >>>>> >>>>> Thanks, >>>>> Michael >>>>> >>> From james.graham at oracle.com Fri Feb 27 22:44:14 2015 From: james.graham at oracle.com (Jim Graham) Date: Fri, 27 Feb 2015 14:44:14 -0800 Subject: Gradients w/o BGRA_PRE In-Reply-To: <16E66751-5FB3-4F9E-A05F-84B5FFE67D72@netopyr.com> References: <54EA6C77.607@oracle.com> <3A0C6623-8AD6-4C9B-8A67-FBD6FB8C80BE@netopyr.com> <54EB854B.7070101@oracle.com> <54EB8650.9070105@oracle.com> <16E66751-5FB3-4F9E-A05F-84B5FFE67D72@netopyr.com> Message-ID: <54F0F33E.1010806@oracle.com> My suggestion would be to add BYTE_RGBA_PRE to the PixelFormat enums and that ES2 claims it supports and have the gradient code then test for either BYTE_BGRA_PRE or BYTE_RGBA_PRE support and use the appropriate indices depending on the result... ...jim On 2/27/15 2:29 PM, Michael Heinrichs wrote: > Hi Jim, > > after disabling the test and switching the channels in insertInterpColor(), gradients are rendered correctly. It is a hack, but it works for now. :) Thanks for the hint. > > The format supported by default in ES 2.0 is actually BYTE_RGBA and not INT_RGBA. I think it makes sense to use a byte array in both cases as you initially suggested. > > - Michael > > > >> On 23 Feb 2015, at 20:58, Jim Graham wrote: >> >> Oh dear, it is a bit worse than that. The texture creation code doesn't even have an enum constant to specify BYTE_RGBA_PRE. It has BYTE_BGRA_PRE (which is used by this code with a byte array) and INT_RGBA_PRE (which would involve more than simply index twiddling to support). >> >> So, if INT_RGBA was universally supported, the code could be refactored to use that. If we have to do it conditionally, that could be done as well as I said below, but it would involve factoring "how do we store these components and into which array?" rather than just index twiddling... >> >> ...jim >> >> On 2/23/2015 11:53 AM, Jim Graham wrote: >>> Ah, I see. I was looking at the code that uploaded the pixels which >>> behaved as I described, but I didn't check the texture creation code, >>> which does look like it will reject it as you indicate. >>> >>> It looks like insertInterpColor, which computes the image data for the >>> texture from the gradient colors, could handle either BGRA or RGBA just >>> by changing the indices it uses. Is RGBA universally supported on >>> Linux/OGL2/D3D? If so, then we could switch to that. Otherwise we'd >>> have to factor in conditional BGRA vs RGBA tests into the appropriate >>> places (probably just remember which was supported by the >>> ResourceFactory in the initGradientTextures() function and have the >>> insert() function test and modify its indices as appropriate)... >>> >>> ...jim >>> >>> On 2/23/2015 1:51 AM, Michael Heinrichs wrote: >>>> Hi Jim, >>>> >>>> thanks for your reply. Right now I do not see anything. >>>> PaintHelper.initGradientTextures() eventually calls >>>> ES2Texture.create(), which checks if the requested pixel format is >>>> supported. This test fails in my case, because WebGL is ES2 only and >>>> the extension is not supported. But when I disable this test and >>>> pretend that BGRA is RGBA, I see exactly what you describe: the red >>>> and the blue channel are swapped. >>>> >>>> Thanks, >>>> Michael >>>> >>>> >>>>> On 23 Feb 2015, at 00:55, Jim Graham wrote: >>>>> >>>>> Hi Michael, >>>>> >>>>> What error are you seeing, or is it just rendering incorrectly? >>>>> >>>>> Looking at the code in ES2Texture.uploadPixels() it looks like ES2 >>>>> might support BGRA via an extension. Perhaps we've only encountered >>>>> platforms with that extension so far. Otherwise, if I read the code >>>>> correctly it looks like we will just pretend the incoming data is in >>>>> RGBA format, which would mean that the rendering would happen, but >>>>> the red and blue components would be swapped. Is that what you are >>>>> seeing? >>>>> >>>>> ...jim >>>>> >>>>> On 2/21/2015 5:06 AM, Michael Heinrichs wrote: >>>>>> Hi, >>>>>> >>>>>> I am experimenting with JavaFX on top of WebGL. Right now I am stuck >>>>>> implementing gradients, but maybe somebody from this list can help. >>>>>> >>>>>> WebGL usually does not support the pixel format BGRA_PRE. From my >>>>>> understanding, the ES2 renderer should work with such a >>>>>> configuration, too. But when I try to use a gradient, at some point >>>>>> PaintHelper.initGradientTextures() is called, which requires the >>>>>> pixel format BGRA_PRE Obviously something about my configuration is >>>>>> wrong. But I cannot figure out, where the alternative implementation >>>>>> resides. How should the implementation of gradients work if BGRA_PRE >>>>>> is not available? >>>>>> >>>>>> Thanks, >>>>>> Michael >>>>>> >>>> > From kevin.rushforth at oracle.com Fri Feb 27 23:39:15 2015 From: kevin.rushforth at oracle.com (Kevin Rushforth) Date: Fri, 27 Feb 2015 15:39:15 -0800 Subject: mobile status In-Reply-To: References: Message-ID: <54F10023.6020901@oracle.com> Thanks for the update Johan! Sounds like good progress. -- Kevin Johan Vos wrote: > Hi, > > Quick update from the mobile ports: as you might know, LodgON is working > together with RoboVM to work on the iOS port. There is some funding for > this effort, so we could add more resources to it. > > One of the major goals is to have the Android port and the iOS port at the > same level. If an API works on Android, it should work on iOS as well and > vice versa. Most users of the mobile ports target both iOS and Android, and > we want to provide WORA and FOPFAP (Fail One Platform, Fail All Platforms > ;)). > > One of the major achievements is a gradle plugin we created, which allows > to build Android and iOS executables using the same code and the same > plugin. This plugin also retrieves the RoboVM AOT compiler form iOS > artifacts, and it retrieves the JavaFX SDK's for Android and iOS, which are > uploaded to Maven Central. > Both the plugin as well as the SDK's are built on our Jenkins server, and > uploaded as SNAPSHOTs to the snapshot repo. Builds are uploaded whenever we > feel a major achievement is reached. > > The plugin is very easy to use, and it is described at > http://javafxports.org/page/Getting_Started > Note that we are currently at build 4 of the plugin, which uses build 4 of > the JavaFX mobile SDK's. You can point the plugin to use older or newer > versions of the SDK's. > > One of the next things we want to do, is to integrate with the > java(fx)packager. In order to create our gradle plugin, we had to untangle > step by step what is needed to create an Android Package or an iOS Package. > If I understood it correctly, using these same steps should be possible in > a java(fx)packager plugin. > > The other thing we have to do is to send all changes back to OpenJFX. There > is some work involved here, as we made both specific as well as a few > generic changes. However, I think that everyone could benefit from this > work. We have to redo all our homework, and check line by line if it is > really needed, working correctly, and not breaking anything. > I think it makes no sense for doing this in the 8u40 branch anymore, but we > should target 8u60 once 8u40 is released. > > Finally, many congratulations to the whole team (current and past > developers) that created JavaFX. It is an amazing piece of software, and I > personally don't think there is a better UI toolkit available (at least for > Java developers like I am). > I hope the availability of JavaFX on Mobile can have a positive impact on > the whole JavaFX platform. > > I'll be back later with more (also commercial) news. > > - Johan >