1.1 --- a/boot-fx/src/main/java/net/java/html/boot/fx/FXBrowsers.java Mon May 19 13:45:42 2014 +0200
1.2 +++ b/boot-fx/src/main/java/net/java/html/boot/fx/FXBrowsers.java Mon May 19 13:56:11 2014 +0200
1.3 @@ -53,9 +53,14 @@
1.4 import net.java.html.js.JavaScriptBody;
1.5 import org.netbeans.html.boot.fx.AbstractFXPresenter;
1.6
1.7 -/** Utility methods for working with <em>JavaFX</em> <code>WebView</code>s.
1.8 - * This class is for those who want to instantiate their own <code>WebView</code>
1.9 - * and configure it manually. In case such detailed control is not necessary,
1.10 +/** Utility methods to use {@link WebView} and {@link JavaScriptBody} code
1.11 + * in existing <em>JavaFX</em> applications.
1.12 + * This class is for those who want to instantiate their own {@link WebView},
1.13 + * configure it manually, embed it into own <em>JavaFX</em>
1.14 + * application and based on other events in the application
1.15 + * {@link #runInBrowser(javafx.scene.web.WebView, java.lang.Runnable) re-execute code}
1.16 + * inside of such {@link WebView}s.
1.17 + * In case such detailed control is not necessary,
1.18 * consider using {@link BrowserBuilder}.
1.19 *
1.20 * @author Jaroslav Tulach
1.21 @@ -74,6 +79,9 @@
1.22 * versions). The method <code>methodName</code> needs to be <code>public</code>
1.23 * (in a public class), <code>static</code> and take either no parameters
1.24 * or an array of {@link String}s.
1.25 + * <p>
1.26 + * This method sets {@link WebView#getUserData()} and {@link #runInBrowser(javafx.scene.web.WebView, java.lang.Runnable)}
1.27 + * relies on the value. Please don't alter it.
1.28 *
1.29 * @param webView the instance of Web View to tweak
1.30 * @param url the URL of the HTML page to load into the view
1.31 @@ -101,6 +109,9 @@
1.32 * but it requires one to make sure
1.33 * all {@link JavaScriptBody} methods has been post-processed during
1.34 * compilation and there will be no need to instantiate new classloader.
1.35 + * <p>
1.36 + * This method sets {@link WebView#getUserData()} and {@link #runInBrowser(javafx.scene.web.WebView, java.lang.Runnable)}
1.37 + * relies on the value. Please don't alter it.
1.38 *
1.39 * @param webView the instance of Web View to tweak
1.40 * @param url the URL of the HTML page to load into the view
1.41 @@ -117,12 +128,16 @@
1.42 }
1.43
1.44 /** Executes a code inside of provided {@link WebView}. This method
1.45 - * is necessary to associte the execution context with a browser,
1.46 - * so the {@link JavaScriptBody} annotations know in what context
1.47 - * they should execute. The code is going to be executed synchronously
1.48 + * is associates the execution context with provided browser,
1.49 + * so the {@link JavaScriptBody} annotations know where to execute
1.50 + * their JavaScript bodies.
1.51 + * The code is going to be executed synchronously
1.52 * in case {@link Platform#isFxApplicationThread()} returns <code>true</code>.
1.53 * Otherwise this method returns immediately and the code is executed
1.54 * later via {@link Platform#runLater(java.lang.Runnable)}.
1.55 + * <p>
1.56 + * This method relies on {@link WebView#getUserData()} being properly
1.57 + * provided by the <code>load</code> methods in this class.
1.58 *
1.59 * @param webView the web view previously prepared by one of the <code>load</code>
1.60 * in this class