hg: openjfx/8u-dev/rt: 2 new changesets
Changeset: 93a63c9eb06f Author:Martin Sladecek martin.slade...@oracle.com Date: 2014-03-17 08:59 +0100 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/93a63c9eb06f RT-36152 TableHeaders behave badly when horizontal scrollbar is visible RT-34897 [ListView] ListView not downsizing cells when its breadth shrinks Reviewed by: jgiles ! modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java Changeset: a9e3c226abab Author:Martin Sladecek martin.slade...@oracle.com Date: 2014-03-17 09:00 +0100 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/a9e3c226abab RT-36134 [ScrollPane] Scrolling into bounds not consistent Reviewed by: jgiles ! modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java
Re: SceneBuilder Integration in NetBeans
Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) On Sun, Mar 16, 2014 at 8:30 PM, Sven Reimers sven.reim...@gmail.comwrote: Hi guys, hope someone can help me with the exception pasted below. Any idea how to go on from here? The code is available at https://bitbucket.org/sreimers/nbscenebuilder/ Thanks -Sven java.lang.IllegalArgumentException: failed to parse:scene.builder.internal at java.awt.datatransfer.DataFlavor.init(DataFlavor.java:488) at javafx.embed.swing.SwingDnD$DnDTransferable.getTransferDataFlavors(SwingDnD.java:398) at sun.awt.datatransfer.DataTransferer.getFormatsForTransferable(DataTransferer.java:655) at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:131) at sun.lwawt.macosx.CDragSourceContextPeer.startDrag(CDragSourceContextPeer.java:88) at java.awt.dnd.DragSource.startDrag(DragSource.java:321) at java.awt.dnd.DragSource.startDrag(DragSource.java:426) at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:237) at javafx.embed.swing.SwingDnD.startDrag(SwingDnD.java:284) at javafx.embed.swing.SwingDnD.access$1000(SwingDnD.java:73) at javafx.embed.swing.SwingDnD$4$1.run(SwingDnD.java:249) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:714) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) -- Sven Reimers * Senior Expert Software Architect * NetBeans Dream Team Member: http://dreamteam.netbeans.org * Community Leader
Re: SceneBuilder Integration in NetBeans
The problem seems to be in AbstractDragSource in SceneBuilder. It defines a javafx.scene.input.DataFormat. This seems to cause problems if running embedded in Swing. I do not define my own DataFlavors.. Any further help appreciated.. -Sven Am 17.03.2014 09:54 schrieb Petr Pchelko petr.pche...@oracle.com: Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) On Sun, Mar 16, 2014 at 8:30 PM, Sven Reimers sven.reim...@gmail.com wrote: Hi guys, hope someone can help me with the exception pasted below. Any idea how to go on from here? The code is available at https://bitbucket.org/sreimers/nbscenebuilder/ Thanks -Sven java.lang.IllegalArgumentException: failed to parse:scene.builder.internal at java.awt.datatransfer.DataFlavor.init(DataFlavor.java:488) at javafx.embed.swing.SwingDnD$DnDTransferable.getTransferDataFlavors(SwingDnD.java:398) at sun.awt.datatransfer.DataTransferer.getFormatsForTransferable(DataTransferer.java:655) at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:131) at sun.lwawt.macosx.CDragSourceContextPeer.startDrag(CDragSourceContextPeer.java:88) at java.awt.dnd.DragSource.startDrag(DragSource.java:321) at java.awt.dnd.DragSource.startDrag(DragSource.java:426) at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:237) at javafx.embed.swing.SwingDnD.startDrag(SwingDnD.java:284) at javafx.embed.swing.SwingDnD.access$1000(SwingDnD.java:73) at javafx.embed.swing.SwingDnD$4$1.run(SwingDnD.java:249) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:714) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at
Re: SceneBuilder Integration in NetBeans
Ok, I see. This is the problem in FX interop. In javafx.embed.swing.SwingDnD.DnDTransferable class. It's wrapper that wraps the FX dragboard into the Swing Trasferable. It is a simple class and many features are simply not implemented. The implementation is very basic - it just creates the DataFlavor with the mime-type corresponding to the DataFormat mime-type. However it does not take into account the representation class. This works fine for basic types like text or may be image, but it completely does not work for custom types with custom representation classes. You could file a bug for this. With best regards. Petr. On 17.03.2014, at 13:39, Sven Reimers sven.reim...@gmail.com wrote: The problem seems to be in AbstractDragSource in SceneBuilder. It defines a javafx.scene.input.DataFormat. This seems to cause problems if running embedded in Swing. I do not define my own DataFlavors.. Any further help appreciated.. -Sven Am 17.03.2014 09:54 schrieb Petr Pchelko petr.pche...@oracle.com: Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) On Sun, Mar 16, 2014 at 8:30 PM, Sven Reimers sven.reim...@gmail.comwrote: Hi guys, hope someone can help me with the exception pasted below. Any idea how to go on from here? The code is available at https://bitbucket.org/sreimers/nbscenebuilder/ Thanks -Sven java.lang.IllegalArgumentException: failed to parse:scene.builder.internal at java.awt.datatransfer.DataFlavor.init(DataFlavor.java:488) at javafx.embed.swing.SwingDnD$DnDTransferable.getTransferDataFlavors(SwingDnD.java:398) at sun.awt.datatransfer.DataTransferer.getFormatsForTransferable(DataTransferer.java:655) at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:131) at sun.lwawt.macosx.CDragSourceContextPeer.startDrag(CDragSourceContextPeer.java:88) at java.awt.dnd.DragSource.startDrag(DragSource.java:321) at java.awt.dnd.DragSource.startDrag(DragSource.java:426) at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:237) at javafx.embed.swing.SwingDnD.startDrag(SwingDnD.java:284) at javafx.embed.swing.SwingDnD.access$1000(SwingDnD.java:73) at javafx.embed.swing.SwingDnD$4$1.run(SwingDnD.java:249) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at
hg: openjfx/8u-dev/rt: RT-35681: Rendering difference between platforms when specular map is used
Changeset: a595dd55588f Author:vadim Date: 2014-03-17 14:14 +0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/a595dd55588f RT-35681: Rendering difference between platforms when specular map is used Reviewed-by: ckyang ! modules/graphics/src/main/resources/com/sun/prism/es2/glsl/specular_mix.frag
Re: SceneBuilder Integration in NetBeans
Ok. Will file an issue and if possible create a patch. Any this could end up in 8u20 (or earlier)? Thanks -Sven Am 17.03.2014 11:05 schrieb Petr Pchelko petr.pche...@oracle.com: Ok, I see. This is the problem in FX interop. In javafx.embed.swing.SwingDnD.DnDTransferable class. It's wrapper that wraps the FX dragboard into the Swing Trasferable. It is a simple class and many features are simply not implemented. The implementation is very basic - it just creates the DataFlavor with the mime-type corresponding to the DataFormat mime-type. However it does not take into account the representation class. This works fine for basic types like text or may be image, but it completely does not work for custom types with custom representation classes. You could file a bug for this. With best regards. Petr. On 17.03.2014, at 13:39, Sven Reimers sven.reim...@gmail.com wrote: The problem seems to be in AbstractDragSource in SceneBuilder. It defines a javafx.scene.input.DataFormat. This seems to cause problems if running embedded in Swing. I do not define my own DataFlavors.. Any further help appreciated.. -Sven Am 17.03.2014 09:54 schrieb Petr Pchelko petr.pche...@oracle.com: Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) On Sun, Mar 16, 2014 at 8:30 PM, Sven Reimers sven.reim...@gmail.com wrote: Hi guys, hope someone can help me with the exception pasted below. Any idea how to go on from here? The code is available at https://bitbucket.org/sreimers/nbscenebuilder/ Thanks -Sven java.lang.IllegalArgumentException: failed to parse:scene.builder.internal at java.awt.datatransfer.DataFlavor.init(DataFlavor.java:488) at javafx.embed.swing.SwingDnD$DnDTransferable.getTransferDataFlavors(SwingDnD.java:398) at sun.awt.datatransfer.DataTransferer.getFormatsForTransferable(DataTransferer.java:655) at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:131) at sun.lwawt.macosx.CDragSourceContextPeer.startDrag(CDragSourceContextPeer.java:88) at java.awt.dnd.DragSource.startDrag(DragSource.java:321) at java.awt.dnd.DragSource.startDrag(DragSource.java:426) at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:237) at javafx.embed.swing.SwingDnD.startDrag(SwingDnD.java:284) at
[8u20] Review request for RT-36235: Zero specular power can lead to rendering artifacts.
Hi Chien, Kevin, Please review this fix: https://javafx-jira.kenai.com/browse/RT-36235 Thanks, Vadim
Re: SceneBuilder Integration in NetBeans
Hi Sven, If you file the bug then yes, we can look at it for 8u20 (there is no earlier). And thanks to Petr for providing the evaluation for this. -- Kevin Sven Reimers wrote: Ok. Will file an issue and if possible create a patch. Any this could end up in 8u20 (or earlier)? Thanks -Sven Am 17.03.2014 11:05 schrieb Petr Pchelko petr.pche...@oracle.com: Ok, I see. This is the problem in FX interop. In javafx.embed.swing.SwingDnD.DnDTransferable class. It's wrapper that wraps the FX dragboard into the Swing Trasferable. It is a simple class and many features are simply not implemented. The implementation is very basic - it just creates the DataFlavor with the mime-type corresponding to the DataFormat mime-type. However it does not take into account the representation class. This works fine for basic types like text or may be image, but it completely does not work for custom types with custom representation classes. You could file a bug for this. With best regards. Petr. On 17.03.2014, at 13:39, Sven Reimers sven.reim...@gmail.com wrote: The problem seems to be in AbstractDragSource in SceneBuilder. It defines a javafx.scene.input.DataFormat. This seems to cause problems if running embedded in Swing. I do not define my own DataFlavors.. Any further help appreciated.. -Sven Am 17.03.2014 09:54 schrieb Petr Pchelko petr.pche...@oracle.com: Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) On Sun, Mar 16, 2014 at 8:30 PM, Sven Reimers sven.reim...@gmail.com wrote: Hi guys, hope someone can help me with the exception pasted below. Any idea how to go on from here? The code is available at https://bitbucket.org/sreimers/nbscenebuilder/ Thanks -Sven java.lang.IllegalArgumentException: failed to parse:scene.builder.internal at java.awt.datatransfer.DataFlavor.init(DataFlavor.java:488) at javafx.embed.swing.SwingDnD$DnDTransferable.getTransferDataFlavors(SwingDnD.java:398) at sun.awt.datatransfer.DataTransferer.getFormatsForTransferable(DataTransferer.java:655) at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:131) at
hg: openjfx/8u-dev/rt: 3 new changesets
Changeset: 6820d900774a Author:Martin Sladecek martin.slade...@oracle.com Date: 2014-03-17 13:22 +0100 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/6820d900774a RT-36185 Custom TraversalEngine introduced in RT-36065 cannot delegate subtree traversal to the default traversal algorithm Reviewed by: dgrieve ! modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToolBarSkin.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Algorithm.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/ContainerTabOrder.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Direction.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Hueristic2D.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TabOrderHelper.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TopMostTraversalEngine.java + modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TraversalContext.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TraversalEngine.java ! modules/graphics/src/main/java/com/sun/javafx/scene/traversal/WeightedClosestCorner.java ! modules/web/src/main/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java Changeset: c0d5845f82d5 Author:kcr Date: 2014-03-17 05:28 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/c0d5845f82d5 RT-36141: Gtk: SecurityException using WebView when running app with security manager Reviewed-by: anthony ! modules/graphics/src/main/java/com/sun/glass/ui/Application.java Changeset: 73f0beec1171 Author:kcr Date: 2014-03-17 05:28 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/73f0beec1171 RT-36232: [Quantum] SecurityException on exit when running any FX program with security manager Reviewed-by: felipe, anthony ! modules/graphics/src/main/java/com/sun/javafx/tk/quantum/QuantumToolkit.java
hg: openjfx/8u-dev/rt: RT-34283: [Swing] DragDrop with interop on Mac OS X between two processes does not transfer data
Changeset: c7f043d40430 Author:Anthony Petrov anthony.pet...@oracle.com Date: 2014-03-17 16:56 +0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/c7f043d40430 RT-34283: [Swing] DragDrop with interop on Mac OS X between two processes does not transfer data Summary: Cache the drop result in dragOver() handler, and use it in drop() to fetch data Reviewed-by: pchelko ! modules/swing/src/main/java/javafx/embed/swing/DataFlavorUtils.java ! modules/swing/src/main/java/javafx/embed/swing/SwingDnD.java ! modules/swing/src/main/java/javafx/embed/swing/SwingDragSource.java
Re: SceneBuilder Integration in NetBeans
Created RT-36240 -Sven Am 17.03.2014 13:10 schrieb Kevin Rushforth kevin.rushfo...@oracle.com: Hi Sven, If you file the bug then yes, we can look at it for 8u20 (there is no earlier). And thanks to Petr for providing the evaluation for this. -- Kevin Sven Reimers wrote: Ok. Will file an issue and if possible create a patch. Any this could end up in 8u20 (or earlier)? Thanks -Sven Am 17.03.2014 11:05 schrieb Petr Pchelko petr.pche...@oracle.com: Ok, I see. This is the problem in FX interop. In javafx.embed.swing.SwingDnD.DnDTransferable class. It's wrapper that wraps the FX dragboard into the Swing Trasferable. It is a simple class and many features are simply not implemented. The implementation is very basic - it just creates the DataFlavor with the mime-type corresponding to the DataFormat mime-type. However it does not take into account the representation class. This works fine for basic types like text or may be image, but it completely does not work for custom types with custom representation classes. You could file a bug for this. With best regards. Petr. On 17.03.2014, at 13:39, Sven Reimers sven.reim...@gmail.com wrote: The problem seems to be in AbstractDragSource in SceneBuilder. It defines a javafx.scene.input.DataFormat. This seems to cause problems if running embedded in Swing. I do not define my own DataFlavors.. Any further help appreciated.. -Sven Am 17.03.2014 09:54 schrieb Petr Pchelko petr.pche...@oracle.com: Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable( DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable( CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent( TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters( EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter( EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy( EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) On Sun, Mar 16, 2014 at 8:30 PM, Sven Reimers sven.reim...@gmail.com wrote: Hi guys, hope someone can help me with the exception pasted below. Any idea how to go on from here? The code is available at https://bitbucket.org/sreimers/nbscenebuilder/ Thanks -Sven java.lang.IllegalArgumentException: failed to parse:scene.builder.internal at java.awt.datatransfer.DataFlavor.init(DataFlavor.java:488) at javafx.embed.swing.SwingDnD$DnDTransferable.getTransferDataFlavors( SwingDnD.java:398) at sun.awt.datatransfer.DataTransferer.getFormatsForTransferable( DataTransferer.java:655) at sun.awt.dnd.SunDragSourceContextPeer.startDrag( SunDragSourceContextPeer.java:131) at
Re: SceneBuilder Integration in NetBeans
Hi Sven, As you mentioned, some fixes are also required at SB level (the strings passed to DataFormat). I'm going to file a JIRA against Scene Builder for that. I did a sample Swing test with Scene Builder Kit and reproduced the exception reported in RT-36240. However it seems that this exception does not prevent SB to complete its drag and drop gestures. Does it match what you've observed ? Cheers. Eric Le 17 mars 2014 à 14:49, Sven Reimers sven.reim...@gmail.com a écrit : Created RT-36240 -Sven Am 17.03.2014 13:10 schrieb Kevin Rushforth kevin.rushfo...@oracle.com: Hi Sven, If you file the bug then yes, we can look at it for 8u20 (there is no earlier). And thanks to Petr for providing the evaluation for this. -- Kevin Sven Reimers wrote: Ok. Will file an issue and if possible create a patch. Any this could end up in 8u20 (or earlier)? Thanks -Sven Am 17.03.2014 11:05 schrieb Petr Pchelko petr.pche...@oracle.com: Ok, I see. This is the problem in FX interop. In javafx.embed.swing.SwingDnD.DnDTransferable class. It's wrapper that wraps the FX dragboard into the Swing Trasferable. It is a simple class and many features are simply not implemented. The implementation is very basic - it just creates the DataFlavor with the mime-type corresponding to the DataFormat mime-type. However it does not take into account the representation class. This works fine for basic types like text or may be image, but it completely does not work for custom types with custom representation classes. You could file a bug for this. With best regards. Petr. On 17.03.2014, at 13:39, Sven Reimers sven.reim...@gmail.com wrote: The problem seems to be in AbstractDragSource in SceneBuilder. It defines a javafx.scene.input.DataFormat. This seems to cause problems if running embedded in Swing. I do not define my own DataFlavors.. Any further help appreciated.. -Sven Am 17.03.2014 09:54 schrieb Petr Pchelko petr.pche...@oracle.com: Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable( DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable( CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent( TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters( EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter( EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy( EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents( EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) On Sun, Mar 16, 2014 at 8:30 PM, Sven Reimers sven.reim...@gmail.com wrote: Hi guys, hope someone can help me with the exception pasted below. Any idea how to go on from here?
Re: SceneBuilder Integration in NetBeans
Yes, I can confirm everything looks ok.. but exceptions all over the place don't make feel comfortable... This is with fixed DataFormat String.. Thanks -Sven Am 17.03.2014 15:32 schrieb Eric Le Ponner eric.le.pon...@oracle.com: Hi Sven, As you mentioned, some fixes are also required at SB level (the strings passed to DataFormat). I'm going to file a JIRA against Scene Builder for that. I did a sample Swing test with Scene Builder Kit and reproduced the exception reported in RT-36240. However it seems that this exception does not prevent SB to complete its drag and drop gestures. Does it match what you've observed ? Cheers. Eric Le 17 mars 2014 à 14:49, Sven Reimers sven.reim...@gmail.com a écrit : Created RT-36240 -Sven Am 17.03.2014 13:10 schrieb Kevin Rushforth kevin.rushfo...@oracle.com: Hi Sven, If you file the bug then yes, we can look at it for 8u20 (there is no earlier). And thanks to Petr for providing the evaluation for this. -- Kevin Sven Reimers wrote: Ok. Will file an issue and if possible create a patch. Any this could end up in 8u20 (or earlier)? Thanks -Sven Am 17.03.2014 11:05 schrieb Petr Pchelko petr.pche...@oracle.com: Ok, I see. This is the problem in FX interop. In javafx.embed.swing.SwingDnD.DnDTransferable class. It's wrapper that wraps the FX dragboard into the Swing Trasferable. It is a simple class and many features are simply not implemented. The implementation is very basic - it just creates the DataFlavor with the mime-type corresponding to the DataFormat mime-type. However it does not take into account the representation class. This works fine for basic types like text or may be image, but it completely does not work for custom types with custom representation classes. You could file a bug for this. With best regards. Petr. On 17.03.2014, at 13:39, Sven Reimers sven.reim...@gmail.com wrote: The problem seems to be in AbstractDragSource in SceneBuilder. It defines a javafx.scene.input.DataFormat. This seems to cause problems if running embedded in Swing. I do not define my own DataFlavors.. Any further help appreciated.. -Sven Am 17.03.2014 09:54 schrieb Petr Pchelko petr.pche...@oracle.com: Hello, Sven. Looks like you are not specifying the representation class for the DataFlavor and it defaults to the InputStream. So, scene builder puts a ByteBuffer while the DataTransferer is trying to treat it as an InputStream. Could you please try to explicitly specify the representation class in the DataFlavor you are trying to put? Like this: new DataFlavor(scene.builder/internal; class=java.nio.HeapByteBuffer, SceneBuilder internal DF) With best regards. Petr. On 17.03.2014, at 0:13, Sven Reimers sven.reim...@gmail.com wrote: Ok... figured it out. It seems scene.builder.internal crashes the Swing parsing mechanism for mime types in the data transfer. Changing it to scene.builder/internal fixes this problem. Shall I open an issue in Jira for it? Having fixed this I get another problem :-( (see stacktrace below) Not sure how to fix this... investigating now. -Sven java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream at sun.awt.datatransfer.DataTransferer.translateTransferable( DataTransferer.java:1372) at sun.lwawt.macosx.CDataTransferer.translateTransferable( CDataTransferer.java:131) at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege( ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) at org.netbeans.core.TimableEventQueue.dispatchEvent( TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters( EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter( EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy( EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(
review RT-36230: [Accessibility] New accessibility implementation
Hi Kevin and David Please review Jira: https://javafx-jira.kenai.com/browse/RT-36230 Wiki: https://wiki.openjdk.java.net/display/OpenJFX/Accessibility (it has information about the design, test plan, etc) WebRev: http://cr.openjdk.java.net/~fheidric/RT-36230/webrev/ More information about new accessibility work on JavaFX will be send to the list shortly. Thank you Felipe
hg: openjfx/8u-dev/rt: RT-36216 - Open-source the WebTerminal app
Changeset: 03b02a7bcfb9 Author:Per Bothner per.both...@oracle.com Date: 2014-03-17 09:33 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/03b02a7bcfb9 RT-36216 - Open-source the WebTerminal app See README.txt for more information. + apps/experiments/WebTerminal/.ant-targets-build.xml + apps/experiments/WebTerminal/README.txt + apps/experiments/WebTerminal/build.xml + apps/experiments/WebTerminal/manifest.mf + apps/experiments/WebTerminal/nbproject/build-impl.xml + apps/experiments/WebTerminal/nbproject/genfiles.properties + apps/experiments/WebTerminal/nbproject/project.properties + apps/experiments/WebTerminal/nbproject/project.xml + apps/experiments/WebTerminal/src/webterminal/NodeWriter.java + apps/experiments/WebTerminal/src/webterminal/RunInConsole.java + apps/experiments/WebTerminal/src/webterminal/ShellConsole.java + apps/experiments/WebTerminal/src/webterminal/WTDebug.java + apps/experiments/WebTerminal/src/webterminal/WebOutputStream.java + apps/experiments/WebTerminal/src/webterminal/WebTerminal.java + apps/experiments/WebTerminal/src/webterminal/WebWriter.java + apps/experiments/WebTerminal/src/webterminal/repl.html + apps/experiments/WebTerminal/src/webterminal/repl.xml + apps/experiments/WebTerminal/terminfo/j/jfxterm + apps/experiments/WebTerminal/terminfo/j/jfxterm.ti + apps/experiments/WebTerminal/terminfo/j/xjfxterm.ti + apps/experiments/WebTerminal/util/hcat + apps/experiments/WebTerminal/util/myemacs
review: RT-36246: NPE on Node#localToScreen
Hi Martin, Can I get a quick review for https://javafx-jira.kenai.com/browse/RT-36246 The patch is attached to Jira. The accessibility code is affected by this bug. Thank you Felipe
Re: Opacity in Image.getPixelReader.getColor()
My understanding is alpha and opacity are same just different range. Opacity is 0.0 to 1.0 Alpha is 0 to 255 Jim or Kevin will be authority on this. Jasper On Mar 16, 2014, at 5:55 AM, Tom Schindl tom.schi...@bestsolution.at wrote: Hi, Maybe I'm completely wrong but to me it looks like the opacity I get from Image.getPixelReader.getColor() is wrong. If not mistaken the relation between alpha and opacity is expressed with: opacity = (255 - alpha) / 255.0 which means: opacity 0 = alpha 255 opacity 1 = alpha 0 Running the following programm on a gif public class OpacityBug extends Application { @Override public void start(Stage primaryStage) throws Exception { Image image = new Image(getClass().getResourceAsStream(methpri_obj.gif)); int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader reader = image.getPixelReader(); for (int x = width - 1; x = 0; x--) { for (int y = height - 1; y = 0; y--) { int argb = reader.getArgb(x, y); int alphaArgb = (argb 24) 0xFF; Color color = reader.getColor(x, y); double opacity = color.getOpacity(); System.err.println(x+,+y + = alpha: + alphaArgb + op: + opacity + op-alpha: + opacityToAlpha(opacity) + color: + color); } } } private static int opacityToAlpha(double opacity) { return (int)Math.roundopacity * 255.0) - 255) * -1)); } public static void main(String[] args) { Application.launch(args); } } produces and output like: 15,15 = alpha: 0 op: 0.0 op-alpha: 255 color: 0x which to my understanding is wrong. The argb value is correct (if compared to the image because the pixel at 15,15 is fully transparent) but then the the opacity should be 1.0 but is the opposite. Looking at the code in Image I see: @Override public Color getColor(int x, int y) { int argb = getArgb(x, y); int a = argb 24; int r = (argb 16) 0xff; int g = (argb 8) 0xff; int b = (argb ) 0xff; return Color.rgb(r, g, b, a / 255.0); } which means that: a) my formula from the above is wrong b) or there's the bug because it should be return Color.rgb(r, g, b, (255 - a) / 255.0); May I also suggest to add get a - Color.argb(int r,int g,int b,int alpha) maybe it is just me but I'm so much more used to alpha than opacity that I always have to look it up when i need it. Tom
Re: Opacity in Image.getPixelReader.getColor()
+1 Am 17.03.2014 um 17:51 schrieb Jasper Potts jasper.po...@oracle.com: My understanding is alpha and opacity are same just different range. Opacity is 0.0 to 1.0 Alpha is 0 to 255 Jim or Kevin will be authority on this. Jasper On Mar 16, 2014, at 5:55 AM, Tom Schindl tom.schi...@bestsolution.at wrote: Hi, Maybe I'm completely wrong but to me it looks like the opacity I get from Image.getPixelReader.getColor() is wrong. If not mistaken the relation between alpha and opacity is expressed with: opacity = (255 - alpha) / 255.0 which means: opacity 0 = alpha 255 opacity 1 = alpha 0 Running the following programm on a gif public class OpacityBug extends Application { @Override public void start(Stage primaryStage) throws Exception { Image image = new Image(getClass().getResourceAsStream(methpri_obj.gif)); int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader reader = image.getPixelReader(); for (int x = width - 1; x = 0; x--) { for (int y = height - 1; y = 0; y--) { int argb = reader.getArgb(x, y); int alphaArgb = (argb 24) 0xFF; Color color = reader.getColor(x, y); double opacity = color.getOpacity(); System.err.println(x+,+y + = alpha: + alphaArgb + op: + opacity + op-alpha: + opacityToAlpha(opacity) + color: + color); } } } private static int opacityToAlpha(double opacity) { return (int)Math.roundopacity * 255.0) - 255) * -1)); } public static void main(String[] args) { Application.launch(args); } } produces and output like: 15,15 = alpha: 0 op: 0.0 op-alpha: 255 color: 0x which to my understanding is wrong. The argb value is correct (if compared to the image because the pixel at 15,15 is fully transparent) but then the the opacity should be 1.0 but is the opposite. Looking at the code in Image I see: @Override public Color getColor(int x, int y) { int argb = getArgb(x, y); int a = argb 24; int r = (argb 16) 0xff; int g = (argb 8) 0xff; int b = (argb ) 0xff; return Color.rgb(r, g, b, a / 255.0); } which means that: a) my formula from the above is wrong b) or there's the bug because it should be return Color.rgb(r, g, b, (255 - a) / 255.0); May I also suggest to add get a - Color.argb(int r,int g,int b,int alpha) maybe it is just me but I'm so much more used to alpha than opacity that I always have to look it up when i need it. Tom
Re: Opacity in Image.getPixelReader.getColor()
I'm sure Jim could word this better, but here goes... Opacity and alpha are mostly used interchangeably. Whether the range is expressed as a normalized value [0.0,1.0] or an 8-bit pixel value [0,255], the meaning is the same. A value of 0 means that the color is completely transparent. When using the default SRC_OVER blend equation, a pixel with this color will have no effect. A value of 1.0 (if using a normalized value) or 255 (if using an 8-bit integer value) means that the color is fully opaque. When using the default SRC_OVER blend equation, a pixel with this color will overwrite whatever is underneath it. Perhaps Tom is thinking of transparency which, if we were to have such an attribute, would be defined as (1.0-opacity). -- Kevin Jasper Potts wrote: My understanding is alpha and opacity are same just different range. Opacity is 0.0 to 1.0 Alpha is 0 to 255 Jim or Kevin will be authority on this. Jasper On Mar 16, 2014, at 5:55 AM, Tom Schindl tom.schi...@bestsolution.at wrote: Hi, Maybe I'm completely wrong but to me it looks like the opacity I get from Image.getPixelReader.getColor() is wrong. If not mistaken the relation between alpha and opacity is expressed with: opacity = (255 - alpha) / 255.0 which means: opacity 0 = alpha 255 opacity 1 = alpha 0 Running the following programm on a gif public class OpacityBug extends Application { @Override public void start(Stage primaryStage) throws Exception { Image image = new Image(getClass().getResourceAsStream(methpri_obj.gif)); int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader reader = image.getPixelReader(); for (int x = width - 1; x = 0; x--) { for (int y = height - 1; y = 0; y--) { int argb = reader.getArgb(x, y); int alphaArgb = (argb 24) 0xFF; Color color = reader.getColor(x, y); double opacity = color.getOpacity(); System.err.println(x+,+y + = alpha: + alphaArgb + op: + opacity + op-alpha: + opacityToAlpha(opacity) + color: + color); } } } private static int opacityToAlpha(double opacity) { return (int)Math.roundopacity * 255.0) - 255) * -1)); } public static void main(String[] args) { Application.launch(args); } } produces and output like: 15,15 = alpha: 0 op: 0.0 op-alpha: 255 color: 0x which to my understanding is wrong. The argb value is correct (if compared to the image because the pixel at 15,15 is fully transparent) but then the the opacity should be 1.0 but is the opposite. Looking at the code in Image I see: @Override public Color getColor(int x, int y) { int argb = getArgb(x, y); int a = argb 24; int r = (argb 16) 0xff; int g = (argb 8) 0xff; int b = (argb ) 0xff; return Color.rgb(r, g, b, a / 255.0); } which means that: a) my formula from the above is wrong b) or there's the bug because it should be return Color.rgb(r, g, b, (255 - a) / 255.0); May I also suggest to add get a - Color.argb(int r,int g,int b,int alpha) maybe it is just me but I'm so much more used to alpha than opacity that I always have to look it up when i need it. Tom
[8u] review request: RT-36197: Create regression tests that run JavaFX apps with a security manager
Chien Felipe, Please review the following unit tests: https://javafx-jira.kenai.com/browse/RT-36197 Thanks. -- Kevin
hg: openjfx/8u-dev/rt: RT-35635: new bundlers for fxpackager - missed two files
Changeset: c66b3066b41e Author:shemnon Date: 2014-03-17 12:21 -0600 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/c66b3066b41e RT-35635: new bundlers for fxpackager - missed two files ! modules/fxpackager/src/test/java/com/oracle/bundlers/linux/LinuxDebBundlerTest.java ! modules/fxpackager/src/test/java/com/sun/javafx/tools/packager/PackagerLibTest.java
[8u26] Review request: RT-35245 [Monocle] EGL setup for Freescale i.MX6
Daniel, Please review the fix for jira: https://javafx-jira.kenai.com/browse/RT-35245 webrev posted: http://cr.openjdk.java.net/~kselle/webrev-20140317-1433-RT-35245/webrev/ Thanks, Lisa
Re: Opacity in Image.getPixelReader.getColor()
Hi, Yes it looks like i mixed this up with transparency! Tom On 17.03.14 10:03, Kevin Rushforth wrote: I'm sure Jim could word this better, but here goes... Opacity and alpha are mostly used interchangeably. Whether the range is expressed as a normalized value [0.0,1.0] or an 8-bit pixel value [0,255], the meaning is the same. A value of 0 means that the color is completely transparent. When using the default SRC_OVER blend equation, a pixel with this color will have no effect. A value of 1.0 (if using a normalized value) or 255 (if using an 8-bit integer value) means that the color is fully opaque. When using the default SRC_OVER blend equation, a pixel with this color will overwrite whatever is underneath it. Perhaps Tom is thinking of transparency which, if we were to have such an attribute, would be defined as (1.0-opacity). -- Kevin Jasper Potts wrote: My understanding is alpha and opacity are same just different range. Opacity is 0.0 to 1.0 Alpha is 0 to 255 Jim or Kevin will be authority on this. Jasper On Mar 16, 2014, at 5:55 AM, Tom Schindl tom.schi...@bestsolution.at wrote: Hi, Maybe I'm completely wrong but to me it looks like the opacity I get from Image.getPixelReader.getColor() is wrong. If not mistaken the relation between alpha and opacity is expressed with: opacity = (255 - alpha) / 255.0 which means: opacity 0 = alpha 255 opacity 1 = alpha 0 Running the following programm on a gif public class OpacityBug extends Application { @Override public void start(Stage primaryStage) throws Exception { Image image = new Image(getClass().getResourceAsStream(methpri_obj.gif)); int width = (int) image.getWidth(); int height = (int) image.getHeight(); PixelReader reader = image.getPixelReader(); for (int x = width - 1; x = 0; x--) { for (int y = height - 1; y = 0; y--) { int argb = reader.getArgb(x, y); int alphaArgb = (argb 24) 0xFF; Color color = reader.getColor(x, y); double opacity = color.getOpacity(); System.err.println(x+,+y + = alpha: + alphaArgb + op: + opacity + op-alpha: + opacityToAlpha(opacity) + color: + color); } } } private static int opacityToAlpha(double opacity) { return (int)Math.roundopacity * 255.0) - 255) * -1)); } public static void main(String[] args) { Application.launch(args); } } produces and output like: 15,15 = alpha: 0 op: 0.0 op-alpha: 255 color: 0x which to my understanding is wrong. The argb value is correct (if compared to the image because the pixel at 15,15 is fully transparent) but then the the opacity should be 1.0 but is the opposite. Looking at the code in Image I see: @Override public Color getColor(int x, int y) { int argb = getArgb(x, y); int a = argb 24; int r = (argb 16) 0xff; int g = (argb 8) 0xff; int b = (argb ) 0xff; return Color.rgb(r, g, b, a / 255.0); } which means that: a) my formula from the above is wrong b) or there's the bug because it should be return Color.rgb(r, g, b, (255 - a) / 255.0); May I also suggest to add get a - Color.argb(int r,int g,int b,int alpha) maybe it is just me but I'm so much more used to alpha than opacity that I always have to look it up when i need it. Tom
hg: openjfx/8u-dev/rt: RT-36246: NPE on Node#localToScreen
Changeset: 10d656e22fbd Author:Felipe Heidrich felipe.heidr...@oracle.com Date: 2014-03-17 15:29 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/10d656e22fbd RT-36246: NPE on Node#localToScreen ! modules/graphics/src/main/java/javafx/scene/Node.java