本文整理汇总了Java中sun.java2d.pipe.hw.AccelDeviceEventListener类的典型用法代码示例。如果您正苦于以下问题:Java AccelDeviceEventListener类的具体用法?Java AccelDeviceEventListener怎么用?Java AccelDeviceEventListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AccelDeviceEventListener类属于sun.java2d.pipe.hw包,在下文中一共展示了AccelDeviceEventListener类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testContext
import sun.java2d.pipe.hw.AccelDeviceEventListener; //导入依赖的package包/类
private static void testContext(final AccelGraphicsConfig agc) {
BufferedContext c = agc.getContext();
final AccelDeviceEventListener l = new AccelDeviceEventListener() {
public void onDeviceDispose() {
System.out.println("onDeviceDispose invoked");
agc.removeDeviceEventListener(this);
}
public void onDeviceReset() {
System.out.println("onDeviceReset invoked");
}
};
agc.addDeviceEventListener(l);
RenderQueue rq = c.getRenderQueue();
rq.lock();
try {
c.saveState();
rq.flushNow();
c.restoreState();
rq.flushNow();
System.out.println("Passed: Save/Restore");
} finally {
rq.unlock();
}
}
示例2: addDeviceEventListener
import sun.java2d.pipe.hw.AccelDeviceEventListener; //导入依赖的package包/类
@Override
public void addDeviceEventListener(AccelDeviceEventListener l) {
int displayID = getDevice().getCGDisplayID();
AccelDeviceEventNotifier.addListener(l, displayID);
}
示例3: removeDeviceEventListener
import sun.java2d.pipe.hw.AccelDeviceEventListener; //导入依赖的package包/类
@Override
public void removeDeviceEventListener(AccelDeviceEventListener l) {
AccelDeviceEventNotifier.removeListener(l);
}
示例4: addDeviceEventListener
import sun.java2d.pipe.hw.AccelDeviceEventListener; //导入依赖的package包/类
@Override
public void addDeviceEventListener(AccelDeviceEventListener l) {
AccelDeviceEventNotifier.addListener(l, device.getScreen());
}
示例5: addDeviceEventListener
import sun.java2d.pipe.hw.AccelDeviceEventListener; //导入依赖的package包/类
@Override
public void addDeviceEventListener(AccelDeviceEventListener l) {
AccelDeviceEventNotifier.addListener(l, screen.getScreen());
}