jaroslav@1941: /** jaroslav@1941: * Back 2 Browser Bytecode Translator jaroslav@1941: * Copyright (C) 2012-2015 Jaroslav Tulach jaroslav@1941: * jaroslav@1941: * This program is free software: you can redistribute it and/or modify jaroslav@1941: * it under the terms of the GNU General Public License as published by jaroslav@1941: * the Free Software Foundation, version 2 of the License. jaroslav@1941: * jaroslav@1941: * This program is distributed in the hope that it will be useful, jaroslav@1941: * but WITHOUT ANY WARRANTY; without even the implied warranty of jaroslav@1941: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jaroslav@1941: * GNU General Public License for more details. jaroslav@1941: * jaroslav@1941: * You should have received a copy of the GNU General Public License jaroslav@1941: * along with this program. Look for COPYING file in the top folder. jaroslav@1941: * If not, see http://opensource.org/licenses/GPL-2.0. jaroslav@1941: */ jaroslav@1941: package org.apidesign.bck2brwsr.kosample; jaroslav@1941: jaroslav@1941: import net.java.html.boot.BrowserBuilder; jaroslav@1941: jaroslav@1941: public final class Main { jaroslav@1941: private Main() { jaroslav@1941: } jaroslav@1941: jaroslav@1941: public static void main(String... args) throws Exception { jaroslav@1941: BrowserBuilder.newBrowser(). jaroslav@1941: loadPage("pages/index.html"). jaroslav@1941: loadClass(Main.class). jaroslav@1941: invoke("onPageLoad", args). jaroslav@1941: showAndWait(); jaroslav@1941: System.exit(0); jaroslav@1941: } jaroslav@1941: jaroslav@1941: /** jaroslav@1941: * Called when the page is ready. jaroslav@1941: */ jaroslav@1941: public static void onPageLoad() throws Exception { jaroslav@1941: DataModel.onPageLoad(); jaroslav@1941: } jaroslav@1941: jaroslav@1941: }