Re: Netbeans X & Java 11?

2018-11-18 Thread Selim Dincer
Hi,

IntelliJ works quite OK with 11. Make sure to rightclick the fxml files ->
open in scenebuilder instead of the integrated one because that's an older
version. Also if you want to run your app without maven / gradle then you
need to download the javafx sdk and set JAVA_HOME otherwise you will get
some weird error. Also make sure to configure your run configuration
exactly like the recommended maven / gradle run configurations.
Apart from that the guide on the openjfx site (the gradle variant) kind of
worked for me.

This is why I suggested something like spring initializr or vert.x starter
before.

On Sun, 18 Nov 2018, 22:02 Michael Dever  Oracle seems to have Destroyed the combination of:
> Netbeans, JavaFX, and SceneBuilder, building JavaFX from an IDE.
>
> Is there any other IDE that supports and builds: JavaFX FXML Applications,
> out of the box that just works, and that you can design the GUI
> application from SceneBuilder?
>
>
> Thanks,
> Mike Dever
>
>
>


Cryptic exception when drawing in huge canvas

2018-11-08 Thread Selim Dincer
Hey,

this morning I was doing something with the canvas control and got its size
wrong. It was way taller than I expected and I had an NPE somewhere in
NGCanvas but I didn't really understand what was wrong because nothing was
pointing to my code. I don't know how it behaves on linux, I was running
Windows 10.

A minimal example looks like following:

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.image.Image;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class CanvasTest extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Canvas canvas = new Canvas(128, 1);
Image img = new
Image("https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png;);
canvas.getGraphicsContext2D().drawImage(img, 0, 0, 128, 128);

primaryStage.setScene(new Scene(new BorderPane(canvas)));
primaryStage.show();
}
}

The StackTrace of the NPE looks like following:
java.lang.NullPointerException
at com.sun.javafx.sg.prism.NGCanvas$RenderBuf.validate(NGCanvas.java:213)
at com.sun.javafx.sg.prism.NGCanvas.initCanvas(NGCanvas.java:640)
at com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:603)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:576)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477)
at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330)
at
com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.lang.Thread.run(Thread.java:748)

I guess you might have to make the canvas a little larger than that to
reproduce it on your system. I was creating the canvas as graphic of a
listcell and didn't realize that it was so large until I started debugging
(in this example the stage height indicates that something's wrong).
Maybe there should be a check with a more meaningful error message?

Thanks,
Selim


Spring Initializr / vert.x starter like tool for javafx

2018-10-17 Thread Selim Dincer
Hey,

I was wondering if there are plans to have a small tool on the new
openjfx.io page similar to spring initializr
 or vert.x
starter . I noticed that there have been multiple
mails here regarding difficulties with project setups and this might be a
nice way to tackle these problems.
I think a tool like this would be quite helpful and more user friendly.
Additionally users might choose from frameworks they would like to add like
afterburner.fx, jfoenix, controlsfx etc.

Best regards,
Selim


RFR: 8207328: API docs for javafx.css.Stylesheet are inaccurate / wrong

2018-08-24 Thread Selim Dincer
Hey,

Please review the fix for https://bugs.openjdk.java.net/browse/JDK-8207328

Pull request:
https://github.com/javafxports/openjdk-jfx/pull/147

Thanks,
Selim


Determining which GraphicsPipeline is being used

2018-07-12 Thread Selim Dincer
Hi,

I was wondering if there is a way to find out which graphics pipeline is
being used by javafx. Some of our users access our application via
virtualized environments or use old GPUs that in some way don't support
hardware rendering.
The way we do it at the moment:

com.sun.prism.GraphicsPipeline.getPipeline()

​Are there any plans to provide public API for this (maybe in form of an
MXBean along with FPS stats and other metrics)?


​Selim


measuring time to render in javafx

2017-06-02 Thread Selim Dincer
Hey,

I am looking for a way to measure how long it takes for JavaFX to render
something graphically. Say I change the text of a label, then this will
schedule a new pulse. How can I now actually get feedback when the
rendering is done?
In swing I guess I could override the paint or paintComponent methods. In
JavaFX I found a hacky way in which I supply a Canvas with my own
implementation of NGCanvas and then override the impl_createPeer() method
to return my implementation.
However this is surely not the way to go and it will break in 9 :-)

What would be the preferred way of doing this in JavaFX?

-- 
Viele Grüße
*Selim Dincer*