本文整理汇总了Java中sun.awt.X11ComponentPeer.getContentWindow方法的典型用法代码示例。如果您正苦于以下问题:Java X11ComponentPeer.getContentWindow方法的具体用法?Java X11ComponentPeer.getContentWindow怎么用?Java X11ComponentPeer.getContentWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.awt.X11ComponentPeer
的用法示例。
在下文中一共展示了X11ComponentPeer.getContentWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBackBuffer
import sun.awt.X11ComponentPeer; //导入方法依赖的package包/类
/**
* Attempts to create an XDBE-based backbuffer for the given peer. If
* the requested configuration is not natively supported, an AWTException
* is thrown. Otherwise, if the backbuffer creation is successful, a
* handle to the native backbuffer is returned.
*/
public long createBackBuffer(X11ComponentPeer peer,
int numBuffers, BufferCapabilities caps)
throws AWTException
{
if (!X11GraphicsDevice.isDBESupported()) {
throw new AWTException("Page flipping is not supported");
}
if (numBuffers > 2) {
throw new AWTException(
"Only double or single buffering is supported");
}
BufferCapabilities configCaps = getBufferCapabilities();
if (!configCaps.isPageFlipping()) {
throw new AWTException("Page flipping is not supported");
}
long window = peer.getContentWindow();
int swapAction = getSwapAction(caps.getFlipContents());
return createBackBuffer(window, swapAction);
}
示例2: flip
import sun.awt.X11ComponentPeer; //导入方法依赖的package包/类
/**
* Performs the native XDBE flip operation for the given target Component.
*/
public void flip(X11ComponentPeer peer,
Component target, VolatileImage xBackBuffer,
int x1, int y1, int x2, int y2,
BufferCapabilities.FlipContents flipAction)
{
long window = peer.getContentWindow();
int swapAction = getSwapAction(flipAction);
swapBuffers(window, swapAction);
}