final public void xSetBackground(Color c) { XToolkit.awtLock(); try { winBackground(c); // fix for 6558510: handle sun.awt.noerasebackground flag, // see doEraseBackground() and preInit() methods in XCanvasPeer if (!doEraseBackground()) { return; } // 6304250: XAWT: Items in choice show a blue border on OpenGL + Solaris10 when background color is set // Note: When OGL is enabled, surfaceData.pixelFor() will not // return a pixel value appropriate for passing to // XSetWindowBackground(). Therefore, we will use the ColorModel // for this component in order to calculate a pixel value from // the given RGB value. ColorModel cm = getColorModel(); int pixel = PixelConverter.instance.rgbToPixel(c.getRGB(), cm); XlibWrapper.XSetWindowBackground(XToolkit.getDisplay(), getContentWindow(), pixel); XlibWrapper.XClearWindow(XToolkit.getDisplay(), getContentWindow()); } finally { XToolkit.awtUnlock(); } }
public final void xSetBackground(Color c) { XToolkit.awtLock(); try { winBackground(c); // fix for 6558510: handle sun.awt.noerasebackground flag, // see doEraseBackground() and preInit() methods in XCanvasPeer if (!doEraseBackground()) { return; } // 6304250: XAWT: Items in choice show a blue border on OpenGL + Solaris10 when background color is set // Note: When OGL is enabled, surfaceData.pixelFor() will not // return a pixel value appropriate for passing to // XSetWindowBackground(). Therefore, we will use the ColorModel // for this component in order to calculate a pixel value from // the given RGB value. ColorModel cm = getColorModel(); int pixel = PixelConverter.instance.rgbToPixel(c.getRGB(), cm); XlibWrapper.XSetWindowBackground(XToolkit.getDisplay(), getContentWindow(), pixel); XlibWrapper.XClearWindow(XToolkit.getDisplay(), getContentWindow()); } finally { XToolkit.awtUnlock(); } }
final public void xSetBackground(Color c) { XToolkit.awtLock(); try { winBackground(c); // fix for 6558510: handle sun.awt.noerasebackground flag, // see doEraseBackground() and preInit() methods in XCanvasPeer if (!doEraseBackground()) { return; } // 6304250: XAWT: Items in choice show a blue border on OpenGL + Solaris10 when background color is set // Note: When OGL is enabled, surfaceData.pixelFor() will not // return a pixel value appropriate for passing to // XSetWindowBackground(). Therefore, we will use the ColorModel // for this component in order to calculate a pixel value from // the given RGB value. ColorModel cm = getColorModel(); int pixel = PixelConverter.instance.rgbToPixel(c.getRGB(), cm); XlibWrapper.XSetWindowBackground(XToolkit.getDisplay(), getContentWindow(), pixel); } finally { XToolkit.awtUnlock(); } }
private SurfaceType(SurfaceType parent, String desc, PixelConverter pixelConverter) { next = parent; this.desc = desc; this.uniqueID = makeUniqueID(desc); this.pixelConverter = pixelConverter; }
public SurfaceType deriveSubType(String desc, PixelConverter pixelConverter) { return new SurfaceType(this, desc, pixelConverter); }
public PixelConverter getPixelConverter() { return pixelConverter; }