1.1 --- a/.hgtags Tue Apr 30 17:28:02 2013 +0200
1.2 +++ b/.hgtags Wed May 01 07:20:06 2013 +0200
1.3 @@ -1,1 +1,1 @@
1.4 -eb7c713d99eded7c1d1e9fed8b95dfef68bd10e4 release-0.1
1.5 +c404760d7dd4105b9ab7bcf591530ef136b9af60 release-0.1
2.1 --- a/ko-bck2brwsr/pom.xml Tue Apr 30 17:28:02 2013 +0200
2.2 +++ b/ko-bck2brwsr/pom.xml Wed May 01 07:20:06 2013 +0200
2.3 @@ -22,6 +22,13 @@
2.4 <target>1.7</target>
2.5 </configuration>
2.6 </plugin>
2.7 + <plugin>
2.8 + <groupId>org.apache.maven.plugins</groupId>
2.9 + <artifactId>maven-javadoc-plugin</artifactId>
2.10 + <configuration>
2.11 + <skip>false</skip>
2.12 + </configuration>
2.13 + </plugin>
2.14 </plugins>
2.15 </build>
2.16 <dependencies>
3.1 --- a/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/BrwsrCntxt.java Tue Apr 30 17:28:02 2013 +0200
3.2 +++ b/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/BrwsrCntxt.java Wed May 01 07:20:06 2013 +0200
3.3 @@ -32,7 +32,7 @@
3.4 *
3.5 * @author Jaroslav Tulach <jtulach@netbeans.org>
3.6 */
3.7 -public final class BrwsrCntxt implements Technology<Object>, Transfer {
3.8 +final class BrwsrCntxt implements Technology<Object>, Transfer {
3.9 private BrwsrCntxt() {}
3.10
3.11 public static final Context DEFAULT;
4.1 --- a/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/BrwsrCntxtPrvdr.java Tue Apr 30 17:28:02 2013 +0200
4.2 +++ b/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/BrwsrCntxtPrvdr.java Wed May 01 07:20:06 2013 +0200
4.3 @@ -25,9 +25,15 @@
4.4 import org.apidesign.html.json.spi.ContextProvider;
4.5 import org.openide.util.lookup.ServiceProvider;
4.6
4.7 -/**
4.8 +/** This is an implementation package - just
4.9 + * include its JAR on classpath and use official {@link Context} API
4.10 + * to access the functionality.
4.11 + * <p>
4.12 + * Provides binding between models and <a href="http://bck2brwsr.apidesign.org">
4.13 + * Bck2Brwsr</a> VM.
4.14 + * Registers {@link ContextProvider}, so {@link ServiceLoader} can find it.
4.15 *
4.16 - * @author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
4.17 + * @author Jaroslav Tulach <jtulach@netbeans.org>
4.18 */
4.19 @ServiceProvider(service = ContextProvider.class)
4.20 public final class BrwsrCntxtPrvdr implements ContextProvider {
5.1 --- a/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/ConvertTypes.java Tue Apr 30 17:28:02 2013 +0200
5.2 +++ b/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/ConvertTypes.java Wed May 01 07:20:06 2013 +0200
5.3 @@ -26,7 +26,7 @@
5.4 *
5.5 * @author Jaroslav Tulach <jtulach@netbeans.org>
5.6 */
5.7 -public final class ConvertTypes {
5.8 +final class ConvertTypes {
5.9 ConvertTypes() {
5.10 }
5.11
6.1 --- a/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/KOList.java Tue Apr 30 17:28:02 2013 +0200
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,170 +0,0 @@
6.4 -/**
6.5 - * HTML via Java(tm) Language Bindings
6.6 - * Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
6.7 - *
6.8 - * This program is free software: you can redistribute it and/or modify
6.9 - * it under the terms of the GNU General Public License as published by
6.10 - * the Free Software Foundation, version 2 of the License.
6.11 - *
6.12 - * This program is distributed in the hope that it will be useful,
6.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
6.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6.15 - * GNU General Public License for more details. apidesign.org
6.16 - * designates this particular file as subject to the
6.17 - * "Classpath" exception as provided by apidesign.org
6.18 - * in the License file that accompanied this code.
6.19 - *
6.20 - * You should have received a copy of the GNU General Public License
6.21 - * along with this program. Look for COPYING file in the top folder.
6.22 - * If not, see http://wiki.apidesign.org/wiki/GPLwithClassPathException
6.23 - */
6.24 -package org.apidesign.html.ko2brwsr;
6.25 -
6.26 -import java.util.ArrayList;
6.27 -import java.util.Collection;
6.28 -import java.util.Iterator;
6.29 -import org.apidesign.bck2brwsr.core.JavaScriptOnly;
6.30 -
6.31 -/**
6.32 - *
6.33 - * @author Jaroslav Tulach <jtulach@netbeans.org>
6.34 - */
6.35 -public final class KOList<T> extends ArrayList<T> {
6.36 - private final String name;
6.37 - private final String[] deps;
6.38 - private Knockout model;
6.39 - private Runnable onchange;
6.40 -
6.41 - public KOList(String name, String... deps) {
6.42 - this.name = name;
6.43 - this.deps = deps;
6.44 - }
6.45 -
6.46 - public void assign(Knockout model) {
6.47 - if (this.model != model) {
6.48 - this.model = model;
6.49 - notifyChange();
6.50 - }
6.51 - }
6.52 -
6.53 - public KOList<T> onChange(Runnable r) {
6.54 - if (this.onchange != null) {
6.55 - throw new IllegalStateException();
6.56 - }
6.57 - this.onchange = r;
6.58 - return this;
6.59 - }
6.60 -
6.61 - @Override
6.62 - public boolean add(T e) {
6.63 - boolean ret = super.add(e);
6.64 - notifyChange();
6.65 - return ret;
6.66 - }
6.67 -
6.68 - @Override
6.69 - public boolean addAll(Collection<? extends T> c) {
6.70 - boolean ret = super.addAll(c);
6.71 - notifyChange();
6.72 - return ret;
6.73 - }
6.74 -
6.75 - @Override
6.76 - public boolean addAll(int index, Collection<? extends T> c) {
6.77 - boolean ret = super.addAll(index, c);
6.78 - notifyChange();
6.79 - return ret;
6.80 - }
6.81 -
6.82 - @Override
6.83 - public boolean remove(Object o) {
6.84 - boolean ret = super.remove(o);
6.85 - notifyChange();
6.86 - return ret;
6.87 - }
6.88 -
6.89 - @Override
6.90 - public void clear() {
6.91 - super.clear();
6.92 - notifyChange();
6.93 - }
6.94 -
6.95 - @Override
6.96 - public boolean removeAll(Collection<?> c) {
6.97 - boolean ret = super.removeAll(c);
6.98 - notifyChange();
6.99 - return ret;
6.100 - }
6.101 -
6.102 - @Override
6.103 - public boolean retainAll(Collection<?> c) {
6.104 - boolean ret = super.retainAll(c);
6.105 - notifyChange();
6.106 - return ret;
6.107 - }
6.108 -
6.109 - @Override
6.110 - public T set(int index, T element) {
6.111 - T ret = super.set(index, element);
6.112 - notifyChange();
6.113 - return ret;
6.114 - }
6.115 -
6.116 - @Override
6.117 - public void add(int index, T element) {
6.118 - super.add(index, element);
6.119 - notifyChange();
6.120 - }
6.121 -
6.122 - @Override
6.123 - public T remove(int index) {
6.124 - T ret = super.remove(index);
6.125 - notifyChange();
6.126 - return ret;
6.127 - }
6.128 -
6.129 - @Override
6.130 - public String toString() {
6.131 - Iterator<T> it = iterator();
6.132 - if (!it.hasNext()) {
6.133 - return "[]";
6.134 - }
6.135 - String sep = "";
6.136 - StringBuilder sb = new StringBuilder();
6.137 - sb.append('[');
6.138 - while (it.hasNext()) {
6.139 - T t = it.next();
6.140 - sb.append(sep);
6.141 - sb.append(ConvertTypes.toJSON(t));
6.142 - sep = ",";
6.143 - }
6.144 - sb.append(']');
6.145 - return sb.toString();
6.146 - }
6.147 -
6.148 -
6.149 - @JavaScriptOnly(name = "koArray", value = "function() { return this.toArray___3Ljava_lang_Object_2(); }")
6.150 - private static native int koArray();
6.151 -
6.152 - private void notifyChange() {
6.153 - Knockout m = model;
6.154 - if (m != null) {
6.155 - m.valueHasMutated(name);
6.156 - for (String dependant : deps) {
6.157 - m.valueHasMutated(dependant);
6.158 - }
6.159 - }
6.160 - Runnable r = onchange;
6.161 - if (r != null) {
6.162 - r.run();
6.163 - }
6.164 - }
6.165 -
6.166 - @Override
6.167 - public KOList clone() {
6.168 - KOList ko = (KOList)super.clone();
6.169 - ko.model = null;
6.170 - return ko;
6.171 - }
6.172 -
6.173 -}
7.1 --- a/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/Knockout.java Tue Apr 30 17:28:02 2013 +0200
7.2 +++ b/ko-bck2brwsr/src/main/java/org/apidesign/html/ko2brwsr/Knockout.java Wed May 01 07:20:06 2013 +0200
7.3 @@ -25,12 +25,12 @@
7.4 import org.apidesign.bck2brwsr.core.ExtraJavaScript;
7.5 import org.apidesign.bck2brwsr.core.JavaScriptBody;
7.6
7.7 -/** Provides binding between models and
7.8 +/** Provides binding between models and bck2brwsr VM.
7.9 *
7.10 * @author Jaroslav Tulach <jtulach@netbeans.org>
7.11 */
7.12 @ExtraJavaScript(resource = "/org/apidesign/bck2brwsr/htmlpage/knockout-2.2.1.js")
7.13 -public class Knockout {
7.14 +final class Knockout {
7.15 /** used by tests */
7.16 static Knockout next;
7.17 private final Object model;
8.1 --- a/ko-fx/pom.xml Tue Apr 30 17:28:02 2013 +0200
8.2 +++ b/ko-fx/pom.xml Wed May 01 07:20:06 2013 +0200
8.3 @@ -14,6 +14,17 @@
8.4 <properties>
8.5 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8.6 </properties>
8.7 + <build>
8.8 + <plugins>
8.9 + <plugin>
8.10 + <groupId>org.apache.maven.plugins</groupId>
8.11 + <artifactId>maven-javadoc-plugin</artifactId>
8.12 + <configuration>
8.13 + <skip>false</skip>
8.14 + </configuration>
8.15 + </plugin>
8.16 + </plugins>
8.17 + </build>
8.18 <dependencies>
8.19 <dependency>
8.20 <groupId>com.oracle</groupId>
9.1 --- a/ko-fx/src/main/java/org/apidesign/html/kofx/Console.java Tue Apr 30 17:28:02 2013 +0200
9.2 +++ b/ko-fx/src/main/java/org/apidesign/html/kofx/Console.java Wed May 01 07:20:06 2013 +0200
9.3 @@ -24,11 +24,15 @@
9.4 import javafx.scene.web.WebEngine;
9.5 import netscape.javascript.JSObject;
9.6
9.7 -/**
9.8 +/** This is an implementation package - just
9.9 + * include its JAR on classpath and use official {@link Context} API
9.10 + * to access the functionality.
9.11 + * <p>
9.12 + * Redirects JavaScript's messages to Java's {@link Logger}.
9.13 *
9.14 * @author Jaroslav Tulach <jtulach@netbeans.org>
9.15 */
9.16 -public class Console {
9.17 +public final class Console {
9.18 private static final Logger LOG = Logger.getLogger(Console.class.getName());
9.19
9.20 private Console() {
10.1 --- a/ko-fx/src/main/java/org/apidesign/html/kofx/FXContext.java Tue Apr 30 17:28:02 2013 +0200
10.2 +++ b/ko-fx/src/main/java/org/apidesign/html/kofx/FXContext.java Wed May 01 07:20:06 2013 +0200
10.3 @@ -20,7 +20,7 @@
10.4 */
10.5 package org.apidesign.html.kofx;
10.6
10.7 -import java.util.concurrent.Callable;
10.8 +import java.util.ServiceLoader;
10.9 import java.util.logging.Logger;
10.10 import net.java.html.json.Context;
10.11 import netscape.javascript.JSObject;
10.12 @@ -33,7 +33,11 @@
10.13 import org.apidesign.html.json.spi.Transfer;
10.14 import org.openide.util.lookup.ServiceProvider;
10.15
10.16 -/**
10.17 +/** This is an implementation package - just
10.18 + * include its JAR on classpath and use official {@link Context} API
10.19 + * to access the functionality.
10.20 + * <p>
10.21 + * Registers {@link ContextProvider}, so {@link ServiceLoader} can find it.
10.22 *
10.23 * @author Jaroslav Tulach <jtulach@netbeans.org>
10.24 */
11.1 --- a/ko-fx/src/main/java/org/apidesign/html/kofx/Knockout.java Tue Apr 30 17:28:02 2013 +0200
11.2 +++ b/ko-fx/src/main/java/org/apidesign/html/kofx/Knockout.java Wed May 01 07:20:06 2013 +0200
11.3 @@ -27,13 +27,18 @@
11.4 import java.util.logging.Level;
11.5 import java.util.logging.Logger;
11.6 import javafx.scene.web.WebEngine;
11.7 +import net.java.html.json.Context;
11.8 import net.java.html.json.Model;
11.9 import netscape.javascript.JSObject;
11.10 import org.apidesign.html.json.spi.FunctionBinding;
11.11 import org.apidesign.html.json.spi.PropertyBinding;
11.12
11.13 -/** Provides binding between {@link Model models} and knockout.js running
11.14 - * inside a JavaFX WebView.
11.15 +/** This is an implementation package - just
11.16 + * include its JAR on classpath and use official {@link Context} API
11.17 + * to access the functionality.
11.18 + * <p>
11.19 + * Provides binding between {@link Model models} and knockout.js running
11.20 + * inside a JavaFX WebView.
11.21 *
11.22 * @author Jaroslav Tulach <jtulach@netbeans.org>
11.23 */
12.1 --- a/ko-fx/src/main/java/org/apidesign/html/kofx/LoadJSON.java Tue Apr 30 17:28:02 2013 +0200
12.2 +++ b/ko-fx/src/main/java/org/apidesign/html/kofx/LoadJSON.java Wed May 01 07:20:06 2013 +0200
12.3 @@ -40,7 +40,9 @@
12.4 import org.json.JSONObject;
12.5 import org.json.JSONTokener;
12.6
12.7 -/**
12.8 +/** This is an implementation package - just
12.9 + * include its JAR on classpath and use official {@link Context} API
12.10 + * to access the functionality.
12.11 *
12.12 * @author Jaroslav Tulach <jtulach@netbeans.org>
12.13 */