当前位置: 首页>>代码示例>>Java>>正文


Java X11GraphicsConfig类代码示例

本文整理汇总了Java中sun.awt.X11GraphicsConfig的典型用法代码示例。如果您正苦于以下问题:Java X11GraphicsConfig类的具体用法?Java X11GraphicsConfig怎么用?Java X11GraphicsConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


X11GraphicsConfig类属于sun.awt包,在下文中一共展示了X11GraphicsConfig类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initAcceleratedSurface

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
/**
 * Create a pixmap-based SurfaceData object
 */
protected SurfaceData initAcceleratedSurface() {
    SurfaceData sData;

    try {
        X11GraphicsConfig gc = (X11GraphicsConfig)vImg.getGraphicsConfig();
        ColorModel cm = gc.getColorModel();
        long drawable = 0;
        if (context instanceof Long) {
            drawable = ((Long)context).longValue();
        }
        sData = X11SurfaceData.createData(gc,
                                          vImg.getWidth(),
                                          vImg.getHeight(),
                                          cm, vImg, drawable,
                                          Transparency.OPAQUE);
    } catch (NullPointerException ex) {
        sData = null;
    } catch (OutOfMemoryError er) {
        sData = null;
    }

    return sData;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:X11VolatileSurfaceManager.java

示例2: handleReparentNotify

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
public void handleReparentNotify(XEvent xev) {
    XReparentEvent re = xev.get_xreparent();
    long newParent = re.get_parent();
    if (active) {
        // unregister accelerators, etc. for old parent
        embedded.notifyStopped();
        // check if newParent is a root window
        X11GraphicsConfig gc = (X11GraphicsConfig)embedded.getGraphicsConfiguration();
        X11GraphicsDevice gd = (X11GraphicsDevice)gc.getDevice();
        if ((newParent == XlibUtil.getRootWindow(gd.getScreen())) ||
            (newParent == XToolkit.getDefaultRootWindow()))
        {
            // reparenting to root means XEmbed termination
            active = false;
        } else {
            // continue XEmbed with a new parent
            server = newParent;
            embedded.notifyStarted();
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:XEmbedClientHelper.java

示例3: handleReparentNotify

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
public void handleReparentNotify(XEvent xev) {
    XReparentEvent re = xev.get_xreparent();
    long newParent = re.get_parent();
    if (active) {
        // unregister accelerators, etc. for old parent
        embedded.notifyStopped();
        // check if newParent is a root window
        X11GraphicsConfig gc = (X11GraphicsConfig)embedded.getGraphicsConfiguration();
        X11GraphicsDevice gd = gc.getDevice();
        if ((newParent == XlibUtil.getRootWindow(gd.getScreen())) ||
            (newParent == XToolkit.getDefaultRootWindow()))
        {
            // reparenting to root means XEmbed termination
            active = false;
        } else {
            // continue XEmbed with a new parent
            server = newParent;
            embedded.notifyStarted();
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:XEmbedClientHelper.java

示例4: createData

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
/**
 * Method for instantiating a Pixmap SurfaceData (offscreen)
 */
public static X11PixmapSurfaceData createData(X11GraphicsConfig gc,
                                              int width, int height,
                                              ColorModel cm, Image image,
                                              long drawable,
                                              int transparency)
{
    return new X11PixmapSurfaceData(gc, width, height, image,
                                    getSurfaceType(gc, transparency, true),
                                    cm, drawable, transparency);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:X11SurfaceData.java

示例5: X11SurfaceData

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
protected X11SurfaceData(X11ComponentPeer peer,
                         X11GraphicsConfig gc,
                         SurfaceType sType,
                         ColorModel cm) {
    super(sType, cm);
    this.peer = peer;
    this.graphicsConfig = gc;
    this.solidloops = graphicsConfig.getSolidLoops(sType);
    this.depth = cm.getPixelSize();
    initOps(peer, graphicsConfig, depth);
    if (isAccelerationEnabled()) {
        setBlitProxyKey(gc.getProxyKey());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:X11SurfaceData.java

示例6: getGC

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
public static X11GraphicsConfig getGC(X11ComponentPeer peer) {
    if (peer != null) {
        return (X11GraphicsConfig) peer.getGraphicsConfiguration();
    } else {
        GraphicsEnvironment env =
            GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice gd = env.getDefaultScreenDevice();
        return (X11GraphicsConfig)gd.getDefaultConfiguration();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:X11SurfaceData.java

示例7: X11WindowSurfaceData

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
public X11WindowSurfaceData(X11ComponentPeer peer,
                            X11GraphicsConfig gc,
                            SurfaceType sType) {
    super(peer, gc, sType, peer.getColorModel());
    if (isDrawableValid()) {
        makePipes();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:X11SurfaceData.java

示例8: X11PixmapSurfaceData

import sun.awt.X11GraphicsConfig; //导入依赖的package包/类
public X11PixmapSurfaceData(X11GraphicsConfig gc,
                            int width, int height,
                            Image image,
                            SurfaceType sType, ColorModel cm,
                            long drawable, int transparency)
{
    super(null, gc, sType, cm);
    this.width = width;
    this.height = height;
    offscreenImage = image;
    this.transparency = transparency;
    initSurface(depth, width, height, drawable);
    makePipes();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:X11SurfaceData.java


注:本文中的sun.awt.X11GraphicsConfig类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。