author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Tue, 26 Apr 2016 08:04:12 +0200 | |
changeset 1941 | 621825e167d7 |
permissions | -rw-r--r-- |
jaroslav@1941 | 1 |
/** |
jaroslav@1941 | 2 |
* Back 2 Browser Bytecode Translator |
jaroslav@1941 | 3 |
* Copyright (C) 2012-2015 Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
jaroslav@1941 | 4 |
* |
jaroslav@1941 | 5 |
* This program is free software: you can redistribute it and/or modify |
jaroslav@1941 | 6 |
* it under the terms of the GNU General Public License as published by |
jaroslav@1941 | 7 |
* the Free Software Foundation, version 2 of the License. |
jaroslav@1941 | 8 |
* |
jaroslav@1941 | 9 |
* This program is distributed in the hope that it will be useful, |
jaroslav@1941 | 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
jaroslav@1941 | 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
jaroslav@1941 | 12 |
* GNU General Public License for more details. |
jaroslav@1941 | 13 |
* |
jaroslav@1941 | 14 |
* You should have received a copy of the GNU General Public License |
jaroslav@1941 | 15 |
* along with this program. Look for COPYING file in the top folder. |
jaroslav@1941 | 16 |
* If not, see http://opensource.org/licenses/GPL-2.0. |
jaroslav@1941 | 17 |
*/ |
jaroslav@1941 | 18 |
package org.apidesign.bck2brwsr.kosample; |
jaroslav@1941 | 19 |
|
jaroslav@1941 | 20 |
import net.java.html.boot.BrowserBuilder; |
jaroslav@1941 | 21 |
|
jaroslav@1941 | 22 |
public final class Main { |
jaroslav@1941 | 23 |
private Main() { |
jaroslav@1941 | 24 |
} |
jaroslav@1941 | 25 |
|
jaroslav@1941 | 26 |
public static void main(String... args) throws Exception { |
jaroslav@1941 | 27 |
BrowserBuilder.newBrowser(). |
jaroslav@1941 | 28 |
loadPage("pages/index.html"). |
jaroslav@1941 | 29 |
loadClass(Main.class). |
jaroslav@1941 | 30 |
invoke("onPageLoad", args). |
jaroslav@1941 | 31 |
showAndWait(); |
jaroslav@1941 | 32 |
System.exit(0); |
jaroslav@1941 | 33 |
} |
jaroslav@1941 | 34 |
|
jaroslav@1941 | 35 |
/** |
jaroslav@1941 | 36 |
* Called when the page is ready. |
jaroslav@1941 | 37 |
*/ |
jaroslav@1941 | 38 |
public static void onPageLoad() throws Exception { |
jaroslav@1941 | 39 |
DataModel.onPageLoad(); |
jaroslav@1941 | 40 |
} |
jaroslav@1941 | 41 |
|
jaroslav@1941 | 42 |
} |