@Override protected JavaGraphics createGraphics (Config config) { Display.setAppName(config.appName); display = new Display(); shell = new Shell(display); shell.setLayout(new FillLayout()); shell.addShellListener(new ShellAdapter() { public void shellActivated (ShellEvent e) { onResume(); } public void shellDeactivated (ShellEvent e) { onPause(); } }); comp = new Composite(shell, SWT.NONE); comp.setLayout(null); return new SWTGraphics(this, config, comp); }
@Override protected JavaGraphics createGraphics (Config config) { Display.setAppName(config.appName); display = new Display(); shell = new Shell(display); shell.setLayout(new FillLayout()); shell.addShellListener(new ShellAdapter() { public void shellActivated (ShellEvent e) { onResume(); } public void shellDeactivated (ShellEvent e) { onPause(); } }); comp = new Composite(shell, SWT.NONE); comp.setLayout(null); return new SWTGraphics(this, config, comp); }
/** Creates a new SWT platform and prepares it for operation. */ public SWTPlatform (Config config) { super(config); Display.setAppName(config.appName); display = new Display(); shell = new Shell(display); shell.setLayout(new FillLayout()); shell.addShellListener(new ShellAdapter() { public void shellActivated (ShellEvent e) { dispatchEvent(lifecycle, Lifecycle.RESUME); } public void shellDeactivated (ShellEvent e) { dispatchEvent(lifecycle, Lifecycle.PAUSE); } }); comp = new Composite(shell, SWT.NONE); comp.setLayout(null); graphics = new SWTGraphics(this, comp); input = new SWTInput(this); }
/** Creates a new SWT platform and prepares it for operation. */ public SWTPlatform (Config config) { super(config); Display.setAppName(config.appName); display = new Display(); shell = new Shell(display); shell.setLayout(new FillLayout()); shell.addShellListener(new ShellAdapter() { public void shellActivated (ShellEvent e) { dispatchEvent(lifecycle, Lifecycle.RESUME); } public void shellDeactivated (ShellEvent e) { dispatchEvent(lifecycle, Lifecycle.PAUSE); } }); comp = new Composite(shell, SWT.NONE); comp.setLayout(null); graphics = new SWTGraphics(this, comp); input = new SWTInput(this); }