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


Java PaintEventDispatcher类代码示例

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


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

示例1: replaceSurfaceDataLater

import sun.awt.PaintEventDispatcher; //导入依赖的package包/类
public void replaceSurfaceDataLater() {
    Runnable r = new Runnable() {
        @Override
        public void run() {
            // Shouldn't do anything if object is disposed in meanwhile
            // No need for sync as disposeAction in Window is performed
            // on EDT
            if (!isDisposed()) {
                try {
                    replaceSurfaceData();
                } catch (InvalidPipeException e) {
                    // REMIND : what do we do if our surface creation failed?
                }
            }
        }
    };
    Component c = (Component)target;
    // Fix 6255371.
    if (!PaintEventDispatcher.getPaintEventDispatcher().queueSurfaceDataReplacing(c, r)) {
        postEvent(new InvocationEvent(c, r));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:WComponentPeer.java

示例2: initialize

import sun.awt.PaintEventDispatcher; //导入依赖的package包/类
@Override
void initialize() {
    eraseBackground = !SunToolkit.getSunAwtNoerasebackground();
    boolean eraseBackgroundOnResize = SunToolkit.getSunAwtErasebackgroundonresize();
    // Optimization: the default value in the native code is true, so we
    // call setNativeBackgroundErase only when the value changes to false
    if (!PaintEventDispatcher.getPaintEventDispatcher().
            shouldDoNativeBackgroundErase((Component)target)) {
        eraseBackground = false;
    }
    setNativeBackgroundErase(eraseBackground, eraseBackgroundOnResize);
    super.initialize();
    Color bg = ((Component)target).getBackground();
    if (bg != null) {
        setBackground(bg);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:WCanvasPeer.java

示例3: replaceSurfaceDataLater

import sun.awt.PaintEventDispatcher; //导入依赖的package包/类
public void replaceSurfaceDataLater() {
    Runnable r = new Runnable() {
        public void run() {
            // Shouldn't do anything if object is disposed in meanwhile
            // No need for sync as disposeAction in Window is performed
            // on EDT
            if (!isDisposed()) {
                try {
                    replaceSurfaceData();
                } catch (InvalidPipeException e) {
                // REMIND : what do we do if our surface creation failed?
                }
            }
        }
    };
    // Fix 6255371.
    if (!PaintEventDispatcher.getPaintEventDispatcher().queueSurfaceDataReplacing((Component)target, r)) {
        postEvent(new InvocationEvent(Toolkit.getDefaultToolkit(), r));
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:21,代码来源:WComponentPeer.java

示例4: initialize

import sun.awt.PaintEventDispatcher; //导入依赖的package包/类
void initialize() {
    eraseBackground = !SunToolkit.getSunAwtNoerasebackground();
    boolean eraseBackgroundOnResize = SunToolkit.getSunAwtErasebackgroundonresize();
    // Optimization: the default value in the native code is true, so we
    // call setNativeBackgroundErase only when the value changes to false
    if (!PaintEventDispatcher.getPaintEventDispatcher().
            shouldDoNativeBackgroundErase((Component)target)) {
        eraseBackground = false;
    }
    setNativeBackgroundErase(eraseBackground, eraseBackgroundOnResize);
    super.initialize();
    Color bg = ((Component)target).getBackground();
    if (bg != null) {
        setBackground(bg);
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:17,代码来源:WCanvasPeer.java

示例5: replaceSurfaceDataLater

import sun.awt.PaintEventDispatcher; //导入依赖的package包/类
public void replaceSurfaceDataLater() {
    Runnable r = new Runnable() {
        public void run() {
            // Shouldn't do anything if object is disposed in meanwhile
            // No need for sync as disposeAction in Window is performed
            // on EDT
            if (!isDisposed()) {
                try {
                    replaceSurfaceData();
                } catch (InvalidPipeException e) {
                    // REMIND : what do we do if our surface creation failed?
                }
            }
        }
    };
    Component c = (Component)target;
    // Fix 6255371.
    if (!PaintEventDispatcher.getPaintEventDispatcher().queueSurfaceDataReplacing(c, r)) {
        postEvent(new InvocationEvent(c, r));
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:22,代码来源:WComponentPeer.java

示例6: postPaintIfNecessary

import sun.awt.PaintEventDispatcher; //导入依赖的package包/类
private void postPaintIfNecessary(int x, int y, int w, int h) {
    if ( !AWTAccessor.getComponentAccessor().getIgnoreRepaint( (Component) target) ) {
        PaintEvent event = PaintEventDispatcher.getPaintEventDispatcher().
            createPaintEvent((Component)target, x, y, w, h);
        if (event != null) {
            postEvent(event);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:WComponentPeer.java


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