The API docs are generated by javafxdoc as part of running the "ant sdk" target.
When running the following @example program, which is in javafx.scene.Scene, an exception occurs, and no example image is produced. The javafxdoc tool renders @example programs using the "renderToScene" method via reflection.
The following program:
@example
import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
Scene {
width: 250
height: 150
fill: LinearGradient {
endX: 0.0
stops: [ Stop { offset: 0.0 color: Color.LIGHTGRAY }
Stop { offset: 1.0 color: Color.GRAY } ]
}
content: [
Circle { centerX: 40 centerY: 50 radius: 25 fill: Color.GREEN }
Rectangle { x: 100 y: 25 width: 75 height: 50 fill: Color.BLUE }
]
}
@endexample
generates the following exception:
java.lang.UnsupportedOperationException: ProportionalPaint is not designed to be used directly by rendering operations
at com.sun.javafx.tk.swing.Gradients$ProportionalGradientDelegate.createContext(Gradients.java:118)
Here is the full stack trace (or at least as much of it as is printed):
[java] java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at com.sun.tools.xslhtml.XHTMLProcessingUtils.renderScriptToImage(XHTMLProcessingUtils.java:706)
[java] at com.sun.tools.xslhtml.XHTMLProcessingUtils.access$200(XHTMLProcessingUtils.java:92)
[java] at com.sun.tools.xslhtml.XHTMLProcessingUtils$4.run(XHTMLProcessingUtils.java:637)
[java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[java] Caused by: java.lang.UnsupportedOperationException: ProportionalPaint is not designed to be used directly by rendering operations
[java] at com.sun.javafx.tk.swing.Gradients$ProportionalGradientDelegate.createContext(Gradients.java:118)
[java] at sun.java2d.pipe.AlphaPaintPipe.startSequence(AlphaPaintPipe.java:65)
[java] at sun.java2d.pipe.SpanShapeRenderer$Composite.startSequence(SpanShapeRenderer.java:38)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderRect(SpanShapeRenderer.java:143)
[java] at sun.java2d.pipe.SpanShapeRenderer.fill(SpanShapeRenderer.java:87)
[java] at sun.java2d.pipe.PixelToShapeConverter.fillRect(PixelToShapeConverter.java:44)
[java] at sun.java2d.pipe.ValidatePipe.fillRect(ValidatePipe.java:58)
[java] at sun.java2d.SunGraphics2D.fillRect(SunGraphics2D.java:2265)
[java] at com.sun.javafx.tk.swing.SwingScene.renderToImage(SwingScene.java:184)
[java] at javafx.scene.Scene.renderToImage(Scene.fx:228)
[java] at javafx.scene.Scene.renderToImage(Scene.fx:210)
[java] ... 15 more
Note that due to JFXC-3421 the error message is lost. If you apply the patch from the webrev in that bug report, then you will see the error message when doing a full foreset build of the SDK.
When running the following @example program, which is in javafx.scene.Scene, an exception occurs, and no example image is produced. The javafxdoc tool renders @example programs using the "renderToScene" method via reflection.
The following program:
@example
import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
Scene {
width: 250
height: 150
fill: LinearGradient {
endX: 0.0
stops: [ Stop { offset: 0.0 color: Color.LIGHTGRAY }
Stop { offset: 1.0 color: Color.GRAY } ]
}
content: [
Circle { centerX: 40 centerY: 50 radius: 25 fill: Color.GREEN }
Rectangle { x: 100 y: 25 width: 75 height: 50 fill: Color.BLUE }
]
}
@endexample
generates the following exception:
java.lang.UnsupportedOperationException: ProportionalPaint is not designed to be used directly by rendering operations
at com.sun.javafx.tk.swing.Gradients$ProportionalGradientDelegate.createContext(Gradients.java:118)
Here is the full stack trace (or at least as much of it as is printed):
[java] java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at com.sun.tools.xslhtml.XHTMLProcessingUtils.renderScriptToImage(XHTMLProcessingUtils.java:706)
[java] at com.sun.tools.xslhtml.XHTMLProcessingUtils.access$200(XHTMLProcessingUtils.java:92)
[java] at com.sun.tools.xslhtml.XHTMLProcessingUtils$4.run(XHTMLProcessingUtils.java:637)
[java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[java] Caused by: java.lang.UnsupportedOperationException: ProportionalPaint is not designed to be used directly by rendering operations
[java] at com.sun.javafx.tk.swing.Gradients$ProportionalGradientDelegate.createContext(Gradients.java:118)
[java] at sun.java2d.pipe.AlphaPaintPipe.startSequence(AlphaPaintPipe.java:65)
[java] at sun.java2d.pipe.SpanShapeRenderer$Composite.startSequence(SpanShapeRenderer.java:38)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderRect(SpanShapeRenderer.java:143)
[java] at sun.java2d.pipe.SpanShapeRenderer.fill(SpanShapeRenderer.java:87)
[java] at sun.java2d.pipe.PixelToShapeConverter.fillRect(PixelToShapeConverter.java:44)
[java] at sun.java2d.pipe.ValidatePipe.fillRect(ValidatePipe.java:58)
[java] at sun.java2d.SunGraphics2D.fillRect(SunGraphics2D.java:2265)
[java] at com.sun.javafx.tk.swing.SwingScene.renderToImage(SwingScene.java:184)
[java] at javafx.scene.Scene.renderToImage(Scene.fx:228)
[java] at javafx.scene.Scene.renderToImage(Scene.fx:210)
[java] ... 15 more
Note that due to JFXC-3421 the error message is lost. If you apply the patch from the webrev in that bug report, then you will see the error message when doing a full foreset build of the SDK.