1.1 --- a/minesweeper/src/main/java/org/apidesign/demo/minesweeper/Main.java Tue Mar 04 09:24:17 2014 +0100
1.2 +++ b/minesweeper/src/main/java/org/apidesign/demo/minesweeper/Main.java Fri Mar 21 15:03:56 2014 +0100
1.3 @@ -24,6 +24,10 @@
1.4 package org.apidesign.demo.minesweeper;
1.5
1.6 import net.java.html.boot.BrowserBuilder;
1.7 +import org.netbeans.api.nbrwsr.OpenHTMLRegistration;
1.8 +import org.openide.awt.ActionID;
1.9 +import org.openide.awt.ActionReference;
1.10 +import org.openide.awt.ActionReferences;
1.11
1.12
1.13 /** Bootstrap and initialization. */
1.14 @@ -40,4 +44,32 @@
1.15 showAndWait();
1.16 System.exit(0);
1.17 }
1.18 +
1.19 + //
1.20 + // the following annotations generate registration for NetBeans,
1.21 + // they are harmless in other packaging schemes
1.22 + //
1.23 +
1.24 + @ActionID(
1.25 + category = "Games",
1.26 + id = "org.apidesign.demo.minesweeper"
1.27 + )
1.28 + @OpenHTMLRegistration(
1.29 + url="index.html",
1.30 + displayName = "Play Minesweeper!",
1.31 + iconBase = "org/apidesign/demo/minesweeper/ko4j.png"
1.32 + )
1.33 + @ActionReferences({
1.34 + @ActionReference(path = "Menu/Window"),
1.35 + @ActionReference(path = "Toolbars/Games")
1.36 + })
1.37 + //
1.38 + // end of NetBeans actions registration
1.39 + //
1.40 +
1.41 + /** Called when page is ready */
1.42 + public static void onPageLoad() throws Exception {
1.43 + Mines m = new Mines();
1.44 + m.applyBindings();
1.45 + }
1.46 }