Details
Description
I have a stage which contains a SwingSlider & a rectangle. When the stage is visible, the following exception is thrown. I am not setting any opacity , but still the exception show the "Error setting window opacity using AWTUtilities ". A similar kind of bug is filed where the stage is applied with transparency .
http://javafx-jira.kenai.com/browse/RT-3494
It works fine in franca,but fails in marina. Hence its a regression.
Exception
--------------------------------------------------------------
Error setting window opacity using AWTUtilities
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javafx.tk.swing.WindowImpl.setWindowOpacity(WindowImpl.java:229)
at com.sun.javafx.tk.swing.WindowStage.setOpacity(WindowStage.java:314)
at javafx.stage.Stage$12.onChange(Stage.fx:313)
at com.sun.javafx.runtime.location.FloatVariable$3.onAction(FloatVariable.java:158)
at com.sun.javafx.runtime.location.FloatVariable$3.onAction(FloatVariable.java:155)
at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:539)
at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:527)
at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:82)
at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:282)
at com.sun.javafx.runtime.location.FloatVariable.notifyListeners(FloatVariable.java:155)
at com.sun.javafx.runtime.location.FloatVariable.replaceValue(FloatVariable.java:94)
at com.sun.javafx.runtime.location.FloatVariable.setAsFloat(FloatVariable.java:113)
at javafx.stage.Stage.applyDefaults$opacity(Stage.fx:312)
at javafx.stage.Stage.initialize$(Stage.fx:312)
at gug.javafx$run$(gug.fx:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(GUIRuntimeProvider.java:66)
at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run$impl(SwingToolkit.fx:754)
at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(SwingToolkit.fx:707)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.UnsupportedOperationException: The TRANSLUCENT translucency kind is not supported.
at com.sun.awt.AWTUtilities.setWindowOpacity(AWTUtilities.java:165)
... 34 more
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------TestCase------------
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
import javafx.ext.swing.SwingSlider;
/**
* @author Lawrence
*/
var rectangle : Rectangle = Rectangle {
x: 30,
y: 50
width: 140,
height: 90
fill: Color.BLACK
rotate : bind rotateSlider.value
}
var rotateSlider :SwingSlider = SwingSlider {
minimum: 0
maximum: 360
value: 0
vertical: false
}
Stage {
title: "Application title"
width: 250
height: 80
scene: Scene {
content: [rectangle ,rotateSlider ]
}
}
------------------------------------------------------------------
Step to reproduce:-
----------------------------
1) Run the above testcase .
2) When the stage is visible, observe the exception on the console.
http://javafx-jira.kenai.com/browse/RT-3494
It works fine in franca,but fails in marina. Hence its a regression.
Exception
--------------------------------------------------------------
Error setting window opacity using AWTUtilities
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javafx.tk.swing.WindowImpl.setWindowOpacity(WindowImpl.java:229)
at com.sun.javafx.tk.swing.WindowStage.setOpacity(WindowStage.java:314)
at javafx.stage.Stage$12.onChange(Stage.fx:313)
at com.sun.javafx.runtime.location.FloatVariable$3.onAction(FloatVariable.java:158)
at com.sun.javafx.runtime.location.FloatVariable$3.onAction(FloatVariable.java:155)
at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:539)
at com.sun.javafx.runtime.location.DependencyIterator.action(AbstractLocation.java:527)
at com.sun.javafx.runtime.util.Linkables.iterate(Linkables.java:82)
at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:282)
at com.sun.javafx.runtime.location.FloatVariable.notifyListeners(FloatVariable.java:155)
at com.sun.javafx.runtime.location.FloatVariable.replaceValue(FloatVariable.java:94)
at com.sun.javafx.runtime.location.FloatVariable.setAsFloat(FloatVariable.java:113)
at javafx.stage.Stage.applyDefaults$opacity(Stage.fx:312)
at javafx.stage.Stage.initialize$(Stage.fx:312)
at gug.javafx$run$(gug.fx:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javafx.runtime.provider.GUIRuntimeProvider$1.run(GUIRuntimeProvider.java:66)
at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run$impl(SwingToolkit.fx:754)
at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(SwingToolkit.fx:707)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.UnsupportedOperationException: The TRANSLUCENT translucency kind is not supported.
at com.sun.awt.AWTUtilities.setWindowOpacity(AWTUtilities.java:165)
... 34 more
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------TestCase------------
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
import javafx.ext.swing.SwingSlider;
/**
* @author Lawrence
*/
var rectangle : Rectangle = Rectangle {
x: 30,
y: 50
width: 140,
height: 90
fill: Color.BLACK
rotate : bind rotateSlider.value
}
var rotateSlider :SwingSlider = SwingSlider {
minimum: 0
maximum: 360
value: 0
vertical: false
}
Stage {
title: "Application title"
width: 250
height: 80
scene: Scene {
content: [rectangle ,rotateSlider ]
}
}
------------------------------------------------------------------
Step to reproduce:-
----------------------------
1) Run the above testcase .
2) When the stage is visible, observe the exception on the console.