hg: openjfx/8u-dev/rt: 2 new changesets
Changeset: cdc219ec5ce8 Author:David Grieve Date: 2014-09-19 13:54 -0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/cdc219ec5ce8 [TEST-ONLY] RT-38687: [CSS] Using setUserAgentStylesheet() with @import syntax issue ! modules/graphics/src/test/java/com/sun/javafx/css/StyleManagerTest.java + modules/graphics/src/test/resources/com/sun/javafx/css/rt38637.css Changeset: 8a674e9f9438 Author:David Grieve Date: 2014-09-19 14:26 -0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/8a674e9f9438 RT-38687: [CSS] Using setUserAgentStylesheet() with @import syntax issue ! modules/graphics/src/main/java/com/sun/javafx/css/Rule.java ! modules/graphics/src/main/java/com/sun/javafx/css/StyleManager.java
Re: How to suppress platform logger output
Hi Peter, this one seems to work, based on your former suggestion: com.sun.javafx.binding.Logging.getLogger().setLevel(sun.util.logging.PlatformLogger.Level.OFF); Thanks for that. Of course I am not sure if that also kills other binding-related logs I might be interested in but generally I'd prefer a runtime exception anyway. And in this particular case of a select binding it is normal operation to come across null values. About the slf4j bridge, I had shortly looked into it but it feels a bit extreme to add a jar file, modify logging, and pay the perfomance penalty mentioned on that site to get a selectString binding :) Werner On 19.09.2014 16:46, Peter Levart wrote: Alternatively, you can have PlatformLogger output through Log4J. Use jul-to-slf4j bridge and slf4j-Log4J backend. See here: http://www.slf4j.org/legacy.html#jul-to-slf4j
hg: openjfx/8u-dev/rt: RT-38312: Modify Packager to remove QT Kit platform when creating Mac App Store bundles
Changeset: ac413b6468e9 Author:shemnon Date: 2014-09-18 23:07 -0600 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/ac413b6468e9 RT-38312: Modify Packager to remove QT Kit platform when creating Mac App Store bundles Summary: Remove unneeded debugging code ! modules/fxpackager/src/main/java/com/oracle/tools/packager/mac/MacAppStoreBundler.java
Re: How to suppress platform logger output
On 09/19/2014 04:38 PM, Peter Levart wrote: On 09/19/2014 01:34 PM, Werner Lehmann wrote: Hi, I'd like to use one of the Bindings.select* methods but can't really accept the tons of stderr output it generates for null steps. According to this ticket... [#RT-35957] Bindings class spits out a lot of unneeded log messages https://javafx-jira.kenai.com/browse/RT-35957 ... 8u20 resolves this by logging on the FINE level. But how can I suppress this output then? As far as I know the platform logger logs to stderr if JDK logging is not used - and we are on log4j. That doesn't mean you can't configure JDK logging as well. If not for anything else, just to silence PlatformLogger output. Alternatively, you can have PlatformLogger output through Log4J. Use jul-to-slf4j bridge and slf4j-Log4J backend. See here: http://www.slf4j.org/legacy.html#jul-to-slf4j Regards, Peter Which means I get FINE logging on stderr which does not help much. Can you use the platform logger API? Like the following: sun.util.logging.PlatformLogger .getLogger("bla.bla") .setLevel(sun.util.logging.PlatformLogger.Level.WARNING); Regards, Peter Rgds Werner Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue WARNING: Exception while evaluating select-binding [parent, value] Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue INFO: Property 'value' in ReadOnlyObjectProperty [bean: TreeItem [ value: b ], name: parent, value: null] is null java.lang.NullPointerException at com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:481) at com.sun.javafx.binding.SelectBinding$AsString.computeValue(SelectBinding.java:394) at javafx.beans.binding.StringBinding.get(StringBinding.java:152) at mint.javafx.report.design.model.elements.MintJRTextField.main(MintJRTextField.java:182) //TreeItem t1 = new TreeItem("a"); TreeItem t2 = new TreeItem("b"); TreeItem t3 = new TreeItem("c"); //t1.getChildren().add(t2); t2.getChildren().add(t3); StringBinding binding = Bindings.selectString(t3, "parent", "parent", "value"); System.out.println(binding.get());
Re: How to suppress platform logger output
On 09/19/2014 01:34 PM, Werner Lehmann wrote: Hi, I'd like to use one of the Bindings.select* methods but can't really accept the tons of stderr output it generates for null steps. According to this ticket... [#RT-35957] Bindings class spits out a lot of unneeded log messages https://javafx-jira.kenai.com/browse/RT-35957 ... 8u20 resolves this by logging on the FINE level. But how can I suppress this output then? As far as I know the platform logger logs to stderr if JDK logging is not used - and we are on log4j. Which means I get FINE logging on stderr which does not help much. Can you use the platform logger API? Like the following: sun.util.logging.PlatformLogger .getLogger("bla.bla") .setLevel(sun.util.logging.PlatformLogger.Level.WARNING); Regards, Peter Rgds Werner Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue WARNING: Exception while evaluating select-binding [parent, value] Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue INFO: Property 'value' in ReadOnlyObjectProperty [bean: TreeItem [ value: b ], name: parent, value: null] is null java.lang.NullPointerException at com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:481) at com.sun.javafx.binding.SelectBinding$AsString.computeValue(SelectBinding.java:394) at javafx.beans.binding.StringBinding.get(StringBinding.java:152) at mint.javafx.report.design.model.elements.MintJRTextField.main(MintJRTextField.java:182) //TreeItem t1 = new TreeItem("a"); TreeItem t2 = new TreeItem("b"); TreeItem t3 = new TreeItem("c"); //t1.getChildren().add(t2); t2.getChildren().add(t3); StringBinding binding = Bindings.selectString(t3, "parent", "parent", "value"); System.out.println(binding.get());
Re: How to suppress platform logger output
Hi Nicolai, On 19.09.2014 15:43, Nicolai Parlog wrote: a little off topic but it might still be relevant for you. thanks, I noticed that ticket and found Tomas' blog to be a very interesting read. However, this is for a Webstart application and we already have way too many dependencies for me to add another because it is convenient for one occassion. If it weren't so much boilerplate to do this I would probably quickly hack it up myself :) Werner
Re: How to suppress platform logger output
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Werner, a little off topic but it might still be relevant for you. There is a feature request logged in the JavaFX-Jira[1] which asks for a type safe way to use Bindings.select. It the comments two libraries are mentioned which do this (and more) and make selecting on object hierarchies way easier: * EasyBind by Toimas Mikula [2] (who is also on this list) * LibFX by me [3] I would recommend checking them out. I'm happy to answer questions and I'm sure so is Tomas. so long ... Nicolai [1] https://javafx-jira.kenai.com/browse/RT-35923 [2] https://github.com/TomasMikula/EasyBind [3] https://github.com/CodeFX-org/LibFX On 19.09.2014 13:34, Werner Lehmann wrote: > Hi, > > I'd like to use one of the Bindings.select* methods but can't > really accept the tons of stderr output it generates for null > steps. According to this ticket... > > [#RT-35957] Bindings class spits out a lot of unneeded log > messages https://javafx-jira.kenai.com/browse/RT-35957 > > ... 8u20 resolves this by logging on the FINE level. But how can I > suppress this output then? As far as I know the platform logger > logs to stderr if JDK logging is not used - and we are on log4j. > Which means I get FINE logging on stderr which does not help much. > > Rgds Werner > >> Sep 19, 2014 1:33:32 PM >> com.sun.javafx.binding.SelectBinding$SelectBindingHelper >> getObservableValue WARNING: Exception while evaluating >> select-binding [parent, value] Sep 19, 2014 1:33:32 PM >> com.sun.javafx.binding.SelectBinding$SelectBindingHelper >> getObservableValue INFO: Property 'value' in >> ReadOnlyObjectProperty [bean: TreeItem [ value: b ], name: >> parent, value: null] is null java.lang.NullPointerException at >> com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:481) >> >> >> at >> com.sun.javafx.binding.SelectBinding$AsString.computeValue(SelectBinding.java:394) >> >> >> at javafx.beans.binding.StringBinding.get(StringBinding.java:152) >> at >> mint.javafx.report.design.model.elements.MintJRTextField.main(MintJRTextField.java:182) >> > >> //TreeItem t1 = new TreeItem("a"); >> TreeItem t2 = new TreeItem("b"); TreeItem >> t3 = new TreeItem("c"); >> >> //t1.getChildren().add(t2); t2.getChildren().add(t3); >> >> StringBinding binding = Bindings.selectString(t3, "parent", >> "parent", "value"); System.out.println(binding.get()); > - -- PGP Key: http://keys.gnupg.net/pks/lookup?op=vindex&search=0xCA3BAD2E9CCCD509 Web: http:\\codefx.org a blog about software development http:\\do-foss.de Free and Open Source Software for the City of Dortmund -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJUHDL6AAoJEMo7rS6czNUJtE0QAI+gUo1ILmSKbZ6YbVbMK4oN iEby4uqqhfv+GK/0rXQo5Q4u6Z5pvWg3HlRs8V9tqAEgyy+iIkqswprEGCrr1hjb UGPLQdUIp+U1pOZzhiZk5a/JqPJXB83HQ34e18Ewc2eHfrRPgYHF4ytuJh5cGkUw qh1Fp/Pm5B3Yo9Kwdir7YkeIZQzrKclgB1Dn50uoYK6hdXLd+mUMbRu9DmWYKaT/ e5sulmPXxda2LEAHdHrpq97f85GFZ21xn4JEDdlMGCfTKJ6KHe5mTlwWbLv9S6Zs 8nXcPgbBvy8QtQyKq7Zt5xP2vdwNYswObyV4FsT4lAS0/Mjz2BVQGVL4xq86seuo RGOc398DTHgyfmC4NKXr7Uf7f40cGeTeEGDR01Ix245EFzGnOwS7qrX9ji6G6o93 cZt2MjBikrebd1aKtssNYmWT8VmopupLZHaexWYpvrNzJEfyqG2D7WO7sop6uZd9 3uqFQpSCwpuq6ajSBzvKQvGey3pFyoEBFhkB/AkI9yj0ddpMRq65KgHecn9zdsRH LyQfcj1TovCN5dZhpORNFEtWArPVf7NteNAbOU4gi96pN85Yj0mupFJQuJFR/ve2 GRoAWA+4u+u/fkl+pP2p1fzoBHTYE94+/it39PRvjdXxGAG3fC7Pmf6Yj29LNCOO na15PD3aq9vxjpfNb9yp =TbuV -END PGP SIGNATURE-
hg: openjfx/8u-dev/rt: RT-38395: Add ability to resolve the URL given with an @import statement relative to the FX runtime
Changeset: 835a333ec7ee Author:David Grieve Date: 2014-09-19 08:44 -0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/835a333ec7ee RT-38395: Add ability to resolve the URL given with an @import statement relative to the FX runtime Reviewed-by: kcr ! modules/graphics/src/main/java/com/sun/javafx/css/StyleManager.java ! modules/graphics/src/main/java/com/sun/javafx/css/converters/URLConverter.java ! modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java + tests/system/src/test/java/com/sun/javafx/css/StylesheetWithSecurityManagerTest.java + tests/system/src/test/resources/com/sun/javafx/css/StylesheetTest.css
JavaFX webapp navigation interception & downloads
Hello all, In the context of embedding/wrapping existing web applications in a Java client, I am facing some issues especially in regard of navigation interception & file download. My first use case was to be able to navigate to PDFs exposed by a web application. First I did not found a convenient API in JavaFX to register a kind of "download plugin". Then, I found that some people were monitoring webengine.location property. This solution is very simple to setup but it fails when you want to intercept several navigations to the same item. Finally, I ended in investigating & demoing a way of doing it by using javascript & java-javascript bridges possibilities. I pushed my demo app to github: https://github.com/McFoggy/fxnav-interceptor What I do is: - loading the webapp - from java, inject a javascript lib - from java, inject java bridges to this JS lib - from JS, monitor the DOM - on JS DOM modification, java bridges are called and install 'ClickListener' instances on appropriate JS DOM nodes (anchors in the example) - when user click links, JS events are fired, handled by Java bridges, that can then download the target of the link and consume the JS event Do you think of easier way of doing this: - in the current JavaFX version (8u20)? - in future versions? Several tickets are already opened https://javafx-jira.kenai.com/browse/RT-19046 https://javafx-jira.kenai.com/browse/RT-36498, but I did not found any target version for them, any info? Thanks for feedback & keep on going with the great stuff you already provided. Matthieu Brouillard
TableView loses focused cell after sorting
I just noticed something odd in the TableView wrt sorting and the focused cell. It seems that if there are selected cells, after resorting, the TableView restores the selected cells (because the TablePositions will have changed), but in doing so, the focused cell is cleared. This happens in the private TableView.updateSelection() as a result of calling clearSelection(). It would seem to me that that it should cache the focused cell and restore that after sorting. Would you agree? Should I file a JIRA issue?
Thoughts about the use cases for Dialog
Hi I am playing around with the new Dialog API in 8u40. I am evaluating if the Dialog class could be the base for a custom Dialog implementation (Wizard) for use in a business application. The use cases for these dialogs usually require the calculation of the return value based on user input. This calculation may be a long running operation, in which case a progress bar should be displayed and the operation should be cancellable. If the operation is cancelled or could not be completed because of i.e. a database error, the dialog should stay open, so the user may change his input and try again. I am unsure, on how to setup the actions of the buttons. I tried to use a result converter to start a Service which is bound to the progress bar, cancel button and so on. This doesn't work of course, because the dialog will close before the service is done with its calculation. Since I cannot overwrite the event handler for the dialog buttons, the workaround I found was to consume the ActionEvent.ACTION in the capturing phase with an event filter and bypass the result converter altogether (which smells like a hack to me ...). Am I missing something here? Considering my difficulties above, I have the feeling that the dialogs may only be targeted for small input or information dialogs like the Alert dialog where the result value can be processed after the dialog has been closed. On the other hand, the API itself seems to have had larger constructs (i.e. Wizards) in mind, since there are things like a ButtonType.NEXT. What are your thoughts and plans concerning the Dialog class? Thanks for your time! Smile Christoph -- Christoph Keimel EM-SOFTWARE GmbH
How to suppress platform logger output
Hi, I'd like to use one of the Bindings.select* methods but can't really accept the tons of stderr output it generates for null steps. According to this ticket... [#RT-35957] Bindings class spits out a lot of unneeded log messages https://javafx-jira.kenai.com/browse/RT-35957 ... 8u20 resolves this by logging on the FINE level. But how can I suppress this output then? As far as I know the platform logger logs to stderr if JDK logging is not used - and we are on log4j. Which means I get FINE logging on stderr which does not help much. Rgds Werner Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue WARNING: Exception while evaluating select-binding [parent, value] Sep 19, 2014 1:33:32 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue INFO: Property 'value' in ReadOnlyObjectProperty [bean: TreeItem [ value: b ], name: parent, value: null] is null java.lang.NullPointerException at com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:481) at com.sun.javafx.binding.SelectBinding$AsString.computeValue(SelectBinding.java:394) at javafx.beans.binding.StringBinding.get(StringBinding.java:152) at mint.javafx.report.design.model.elements.MintJRTextField.main(MintJRTextField.java:182) //TreeItem t1 = new TreeItem("a"); TreeItem t2 = new TreeItem("b"); TreeItem t3 = new TreeItem("c"); //t1.getChildren().add(t2); t2.getChildren().add(t3); StringBinding binding = Bindings.selectString(t3, "parent", "parent", "value"); System.out.println(binding.get());
Re: JavaFX (1.7.0_45) and Applet: problem with layout
Could you provide a screen shot? R. On 19 Sep 2014, at 12:07, Fabrizio Giudici wrote: > On Tue, 16 Sep 2014 11:55:26 +0200, Fabrizio Giudici > wrote: > >> Hello. >> >> A customer submitted me a problem concerning a Java WebStart applet made >> with JavaFX (JDK 1.7.0_45): the thing works, but at the beginning the >> rendering in the browser is such that a number of pixels are off the >> rendered area at the right and bottom borders. The problem happens with >> Internet Explorer and Firefox on Windows 8, even though by different pixel >> amounts. Just clicking with the mouse anywhere cause a re-computation of the >> layout so everything is ok. >> >> I can't review all of the code, so I focused on the FXML and worked on it by >> removing unneeded stuff and making sure that PREFERRED_SIZE is used whenever >> it makes sense. But the problem is always there. At this point, I think that >> a reasonable workaround would be to force a layout re-computation just after >> the initialization... but how am I supposed to do that? >> >> On a second instance, I'd like to understand what's wrong. >> > > Bump... anyone on this? Thanks. > > -- > Fabrizio Giudici - Java Architect @ Tidalwave s.a.s. > "We make Java work. Everywhere." > http://tidalwave.it/fabrizio/blog - fabrizio.giud...@tidalwave.it
Re: JavaFX (1.7.0_45) and Applet: problem with layout
On Tue, 16 Sep 2014 11:55:26 +0200, Fabrizio Giudici wrote: Hello. A customer submitted me a problem concerning a Java WebStart applet made with JavaFX (JDK 1.7.0_45): the thing works, but at the beginning the rendering in the browser is such that a number of pixels are off the rendered area at the right and bottom borders. The problem happens with Internet Explorer and Firefox on Windows 8, even though by different pixel amounts. Just clicking with the mouse anywhere cause a re-computation of the layout so everything is ok. I can't review all of the code, so I focused on the FXML and worked on it by removing unneeded stuff and making sure that PREFERRED_SIZE is used whenever it makes sense. But the problem is always there. At this point, I think that a reasonable workaround would be to force a layout re-computation just after the initialization... but how am I supposed to do that? On a second instance, I'd like to understand what's wrong. Bump... anyone on this? Thanks. -- Fabrizio Giudici - Java Architect @ Tidalwave s.a.s. "We make Java work. Everywhere." http://tidalwave.it/fabrizio/blog - fabrizio.giud...@tidalwave.it