private Component3DManager() {
if (!GraphicsEnvironment.isHeadless()) {
// Retrieve graphics configuration once
GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
// Try to get antialiasing
template.setSceneAntialiasing(GraphicsConfigTemplate3D.PREFERRED);
// From http://www.java.net/node/683852
// Check if the user has set the Java 3D stereo option.
String stereo = System.getProperty("j3d.stereo");
if (stereo != null) {
if ("REQUIRED".equals(stereo))
template.setStereo(GraphicsConfigTemplate.REQUIRED);
else if ("PREFERRED".equals(stereo))
template.setStereo(GraphicsConfigTemplate.PREFERRED);
}
this.configuration = GraphicsEnvironment.getLocalGraphicsEnvironment().
getDefaultScreenDevice().getBestConfiguration(template);
if (this.configuration == null) {
this.configuration = GraphicsEnvironment.getLocalGraphicsEnvironment().
getDefaultScreenDevice().getBestConfiguration(new GraphicsConfigTemplate3D());
}
} else {
this.offScreenImageSupported = Boolean.FALSE;
}
}