PSurface surface = game.getSurface(); SmoothCanvas smoothCanvas = (SmoothCanvas)surface.getNative(); JFrame frame = (JFrame) smoothCanvas.getFrame();
@Override public Object getNative() { return sketch.getSurface().getNative(); }
SmoothCanvas smoothCanvas = (SmoothCanvas)ps.getNative();
/** * Force a fullscreen size (for projectors). This call removes the window * decoration: menu bars, and makets it fullscreen. * * @param w width in pixels. * @param h hegiht in pixels. * @param px location in pixels (from left). * @param py location in pixels (from top). */ public void forceProjectorSize(int w, int h, int px, int py) { frameSize.set(w, h); // this.shouldSetWindowSize = true; // registerPost(); GLWindow window = (GLWindow) applet.getSurface().getNative(); window.setUndecorated(true); window.setSize(w, h); window.setPosition(px, py); }
/** * Set the frame to default location given by the screenConfiguration. */ public void defaultFrameLocation() { ScreenConfiguration screenConfiguration = getDefaultScreenConfiguration(this.applet); this.applet.frame.setLocation(screenConfiguration.getProjectionScreenOffsetX(), screenConfiguration.getProjectionScreenOffsetY()); GLWindow window = (GLWindow) applet.getSurface().getNative(); window.setPosition(screenConfiguration.getProjectionScreenOffsetX(), screenConfiguration.getProjectionScreenOffsetY()); }