-
Bug
-
Resolution: Fixed
-
P4
-
fx2.1
-
2.1.0b08
Linux Ubuntu 10.04 2.6.32-33-generic
In linux DPI cannot be detected:
import java.util.Iterator;
import javafx.application.Application;
import javafx.stage.Screen;
import javafx.stage.Stage;
public class JavaFX extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
for (Iterator<Screen> it = Screen.getScreens().iterator(); it.hasNext();) {
Screen s = it.next();
System.out.println("Screen : " + s);
System.out.println("DPI : " + s.getDpi());
}
}
}
Output:
run:
Screen : javafx.stage.Screen@7150461bbounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1440.0, maxY=900.0, width=1440.0, height=900.0] visualBounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1440.0, maxY=900.0, width=1440.0, height=900.0] dpi:0.0
DPI : 0.0
import java.util.Iterator;
import javafx.application.Application;
import javafx.stage.Screen;
import javafx.stage.Stage;
public class JavaFX extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
for (Iterator<Screen> it = Screen.getScreens().iterator(); it.hasNext();) {
Screen s = it.next();
System.out.println("Screen : " + s);
System.out.println("DPI : " + s.getDpi());
}
}
}
Output:
run:
Screen : javafx.stage.Screen@7150461bbounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1440.0, maxY=900.0, width=1440.0, height=900.0] visualBounds:Rectangle2D [minX = 0.0, minY=0.0, maxX=1440.0, maxY=900.0, width=1440.0, height=900.0] dpi:0.0
DPI : 0.0