Přeskočit na hlavní obsah

Příspěvky

Zobrazují se příspěvky z květen, 2013

Getting confused with JavaFX Canvas

As I am working on a new MapViewer  component for AgroSense  (it is fork, but very modified, of abandoned project swingx-ws) I am facing some strange behavior of JavaFX components, which I have never met in Swing. It is a combination of StackPane , Canvas and painting images in the Canvas .   And what was the problem? Having Canvas in StackPane and some components, for example BorderPane with Buttons and Slider , on top of it, components in upper layer of StackPane tend to disappear, especially when moving mouse over other components. The component with focus or with mouse over it looks good, but other disapear. As I was searching for the root cause of trouble, I tested some combinations of painting in Canvas ( GraphicsContext.fillRect() , GraphicsContext.drawImage() etc.) and only drawing of image was troubled. And when the Pane with components wasn’t over the painted image, the problem was gone. Searching for the problem But how to find out what is g...