List of usage examples for java.awt GraphicsConfiguration getBufferCapabilities
public BufferCapabilities getBufferCapabilities()
From source file:Main.java
public static void main(String[] argv) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gs.getDefaultConfiguration(); System.out.println(gc.getBufferCapabilities()); }
From source file:Main.java
public static void main(String[] args) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice defaultScreen = ge.getDefaultScreenDevice(); GraphicsConfiguration[] configurations = defaultScreen.getConfigurations(); System.out.println("Default screen device: " + defaultScreen.getIDstring()); for (int i = 0; i < configurations.length; i++) { System.out.println(" Configuration " + (i + 1)); GraphicsConfiguration c = configurations[i]; System.out.println(" " + c.getColorModel()); System.out.println(" " + c.getBounds()); System.out.println(" " + c.getBufferCapabilities()); System.out.println(" " + c.getDefaultTransform()); System.out.println(" " + c.getDevice()); }/*from ww w . j a v a 2s . co m*/ }
From source file:GCWrapper.java
private void gcChanged() { GCWrapper wrap = (GCWrapper) gcSelection.getSelectedItem(); // assert wrap != null; GraphicsConfiguration gc = wrap.getGC(); // assert gc != null; // Image Caps ImageCapabilities imageCaps = gc.getImageCapabilities(); imageAccelerated.setSelected(imageCaps.isAccelerated()); imageTrueVolatile.setSelected(imageCaps.isTrueVolatile()); // Buffer Caps BufferCapabilities bufferCaps = gc.getBufferCapabilities(); flipping.setSelected(bufferCaps.isPageFlipping()); flippingMethod.setText(getFlipText(bufferCaps.getFlipContents())); fullScreen.setSelected(bufferCaps.isFullScreenRequired()); multiBuffer.setSelected(bufferCaps.isMultiBufferAvailable()); // Front buffer caps imageCaps = bufferCaps.getFrontBufferCapabilities(); fbAccelerated.setSelected(imageCaps.isAccelerated()); fbTrueVolatile.setSelected(imageCaps.isTrueVolatile()); imageCaps = bufferCaps.getFrontBufferCapabilities(); // Back buffer caps imageCaps = bufferCaps.getBackBufferCapabilities(); bbAccelerated.setSelected(imageCaps.isAccelerated()); bbTrueVolatile.setSelected(imageCaps.isTrueVolatile()); }
From source file:GCWrapper.java
private void gcChanged() { GCWrapper wrap = (GCWrapper) gcSelection.getSelectedItem(); //assert wrap != null; GraphicsConfiguration gc = wrap.getGC(); //assert gc != null; //Image Caps/* w w w . j ava 2 s . co m*/ ImageCapabilities imageCaps = gc.getImageCapabilities(); imageAccelerated.setSelected(imageCaps.isAccelerated()); imageTrueVolatile.setSelected(imageCaps.isTrueVolatile()); // Buffer Caps BufferCapabilities bufferCaps = gc.getBufferCapabilities(); flipping.setSelected(bufferCaps.isPageFlipping()); flippingMethod.setText(getFlipText(bufferCaps.getFlipContents())); fullScreen.setSelected(bufferCaps.isFullScreenRequired()); multiBuffer.setSelected(bufferCaps.isMultiBufferAvailable()); // Front buffer caps imageCaps = bufferCaps.getFrontBufferCapabilities(); fbAccelerated.setSelected(imageCaps.isAccelerated()); fbTrueVolatile.setSelected(imageCaps.isTrueVolatile()); imageCaps = bufferCaps.getFrontBufferCapabilities(); // Back buffer caps imageCaps = bufferCaps.getBackBufferCapabilities(); bbAccelerated.setSelected(imageCaps.isAccelerated()); bbTrueVolatile.setSelected(imageCaps.isTrueVolatile()); }