本文整理匯總了Java中processing.core.PSurface類的典型用法代碼示例。如果您正苦於以下問題:Java PSurface類的具體用法?Java PSurface怎麽用?Java PSurface使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PSurface類屬於processing.core包,在下文中一共展示了PSurface類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initSurface
import processing.core.PSurface; //導入依賴的package包/類
/**
*
* @see processing.core.PApplet#initSurface()
*/
@Override
protected PSurface initSurface() {
final PSurface s = super.initSurface();
this.frame = null; // eliminate a memory leak from 2.x compat hack
// s.setTitle(pySketchPath.getFileName().toString().replaceAll("\\..*$", ""));
if (s instanceof PSurfaceAWT) {
final PSurfaceAWT surf = (PSurfaceAWT) s;
final Component c = (Component) surf.getNative();
c.addComponentListener(new ComponentAdapter() {
@Override
public void componentHidden(final ComponentEvent e) {
log("initSurface");
finishedLatch.countDown();
}
});
} else if (s instanceof PSurfaceJOGL) {
final PSurfaceJOGL surf = (PSurfaceJOGL) s;
final GLWindow win = (GLWindow) surf.getNative();
win.addWindowListener(new com.jogamp.newt.event.WindowAdapter() {
示例2: createSurface
import processing.core.PSurface; //導入依賴的package包/類
public PSurface createSurface() {
return currentGraphics.createSurface();
}