1.1 --- a/minesweeper/src/main/java/org/apidesign/demo/minesweeper/Main.java Sun Jun 28 07:14:21 2015 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,77 +0,0 @@
1.4 -/**
1.5 - * The MIT License (MIT)
1.6 - *
1.7 - * Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
1.8 - *
1.9 - * Permission is hereby granted, free of charge, to any person obtaining a copy
1.10 - * of this software and associated documentation files (the "Software"), to deal
1.11 - * in the Software without restriction, including without limitation the rights
1.12 - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1.13 - * copies of the Software, and to permit persons to whom the Software is
1.14 - * furnished to do so, subject to the following conditions:
1.15 - *
1.16 - * The above copyright notice and this permission notice shall be included in
1.17 - * all copies or substantial portions of the Software.
1.18 - *
1.19 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1.20 - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1.21 - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1.22 - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1.23 - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1.24 - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1.25 - * THE SOFTWARE.
1.26 - */
1.27 -package org.apidesign.demo.minesweeper;
1.28 -
1.29 -import java.util.Locale;
1.30 -import net.java.html.boot.BrowserBuilder;
1.31 -import org.netbeans.api.nbrwsr.OpenHTMLRegistration;
1.32 -import org.openide.awt.ActionID;
1.33 -import org.openide.awt.ActionReference;
1.34 -import org.openide.awt.ActionReferences;
1.35 -
1.36 -
1.37 -/** Bootstrap and initialization. */
1.38 -public final class Main {
1.39 - private Main() {
1.40 - }
1.41 -
1.42 - /** Launches the browser */
1.43 - public static void main(String... args) throws Exception {
1.44 - BrowserBuilder.newBrowser().
1.45 - loadPage("pages/index.html").
1.46 - locale(Locale.getDefault()).
1.47 - loadClass(MinesModel.class).
1.48 - invoke("main", args).
1.49 - showAndWait();
1.50 - System.exit(0);
1.51 - }
1.52 -
1.53 - //
1.54 - // the following annotations generate registration for NetBeans,
1.55 - // they are harmless in other packaging schemes
1.56 - //
1.57 -
1.58 - @ActionID(
1.59 - category = "Games",
1.60 - id = "org.apidesign.demo.minesweeper"
1.61 - )
1.62 - @OpenHTMLRegistration(
1.63 - url="index.html",
1.64 - displayName = "Play Minesweeper!",
1.65 - iconBase = "org/apidesign/demo/minesweeper/ko4j.png"
1.66 - )
1.67 - @ActionReferences({
1.68 - @ActionReference(path = "Menu/Window"),
1.69 - @ActionReference(path = "Toolbars/Games")
1.70 - })
1.71 - //
1.72 - // end of NetBeans actions registration
1.73 - //
1.74 -
1.75 - /** Called when page is ready */
1.76 - public static void onPageLoad() throws Exception {
1.77 - Mines m = new Mines();
1.78 - m.applyBindings();
1.79 - }
1.80 -}