changeset 2704:06afa65a1aa3 8.0-b79

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8.0/MASTER/jfx//rt
author jgodinez
date Tue, 26 Feb 2013 10:04:35 -0800
parents e567d11b36fa ae0012175b16
children 16e4c07f8562 08e1479a4c90 3955b0ebae71
files javafx-ui-common/src/javafx/scene/Node.java
diffstat 1407 files changed, 192207 insertions(+), 170 deletions(-) [+]
line wrap: on
line diff
--- a/.classpath	Tue Feb 26 11:00:31 2013 -0500
+++ b/.classpath	Tue Feb 26 10:04:35 2013 -0800
@@ -1,11 +1,36 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<!--
+	<classpathentry kind="src" path="apps/experiments/ConferenceScheduleApp/src"/>
+	<classpathentry kind="src" path="apps/experiments/ModenaTest/test"/>
+	-->
+	<classpathentry kind="src" path="apps/experiments/Modena/src"/>
+	
 	<classpathentry kind="src" path="decora-compiler/build/gensrc"/>
 	<classpathentry kind="src" path="decora-compiler/src"/>
+	<classpathentry kind="src" path="decora-d3d/src"/>
+	<classpathentry kind="src" path="decora-d3d/build/gensrc"/>
+	<classpathentry kind="src" path="decora-es2/src"/>
+	<classpathentry kind="src" path="decora-es2/build/gensrc"/>
+	<classpathentry kind="src" path="decora-jsw/build/gensrc"/>
+	<classpathentry kind="src" path="decora-jsw/src"/>
+	<classpathentry kind="src" path="decora-prism-ps/build/gensrc"/>
+	<classpathentry kind="src" path="decora-prism-ps/src"/>
+	<classpathentry kind="src" path="decora-prism-sw/src"/>
+	<classpathentry kind="src" path="decora-prism/src"/>
+	<classpathentry kind="src" path="decora-runtime/src"/>
+	<classpathentry kind="src" path="decora-runtime/generator"/>
+	<classpathentry kind="src" path="decora-runtime/test"/>
+	<classpathentry kind="src" path="decora-sse/src"/>
+	<classpathentry kind="src" path="decora-sse/build/gensrc"/>
+	
 	<classpathentry kind="src" path="deploy/javafx-deploy/src"/>
 	<classpathentry kind="src" path="deploy/javafx-launcher/src"/>
 	<classpathentry kind="src" path="deploy/packager/src"/>
-	<classpathentry kind="src" path="deploy/packager/test"/>	
+	<classpathentry kind="src" path="deploy/packager/test"/>
+	
+	<classpathentry kind="src" path="glass/glass/src"/>
+	
 	<classpathentry kind="src" path="javafx-anim/src"/>
 	<classpathentry kind="src" path="javafx-anim/build/builders"/>
 	<classpathentry kind="src" path="javafx-anim/test/unit"/>
@@ -25,6 +50,8 @@
 	<!--
 	<classpathentry kind="src" path="javafx-designtime/test"/>
 	-->
+	<classpathentry kind="src" path="javafx-embed-swing/src"/>
+	<classpathentry kind="src" path="javafx-embed-swt/src"/>
 	<classpathentry kind="src" path="javafx-fxml/src"/>
 	<classpathentry kind="src" path="javafx-fxml/test"/>
 	<classpathentry kind="src" path="javafx-geom/src"/>
@@ -43,32 +70,34 @@
 	<classpathentry kind="src" path="javafx-ui-controls/src"/>
 	<classpathentry kind="src" path="javafx-ui-controls/test"/>
 	<classpathentry kind="src" path="javafx-ui-controls/build/builders"/>
+	<classpathentry kind="src" path="javafx-ui-quantum/src"/>
 	<classpathentry kind="src" path="javafx-util-converter/src"/>
 	<classpathentry kind="src" path="javafx-util-converter/test"/>
-	<classpathentry kind="src" path="javafx-embed-swing/src"/>
-	<classpathentry kind="src" path="javafx-embed-swt/src"/>
-	<classpathentry kind="src" path="decora-d3d/src"/>
-	<classpathentry kind="src" path="decora-d3d/build/gensrc"/>
-	<classpathentry kind="src" path="decora-es2/src"/>
-	<classpathentry kind="src" path="decora-es2/build/gensrc"/>
-	<classpathentry kind="src" path="decora-jsw/build/gensrc"/>
-	<classpathentry kind="src" path="decora-jsw/src"/>
-	<classpathentry kind="src" path="decora-prism-ps/build/gensrc"/>
-	<classpathentry kind="src" path="decora-prism-ps/src"/>
-	<classpathentry kind="src" path="decora-prism-sw/src"/>
-	<classpathentry kind="src" path="decora-prism/src"/>
-	<classpathentry kind="src" path="decora-runtime/src"/>
-	<classpathentry kind="src" path="decora-runtime/generator"/>
-	<classpathentry kind="src" path="decora-runtime/test"/>
-	<classpathentry kind="src" path="decora-sse/src"/>
-	<classpathentry kind="src" path="decora-sse/build/gensrc"/>
+	
 	<classpathentry kind="src" path="pisces/src"/>
+	
+	<classpathentry kind="src" path="prism-common/src"/>
+	<classpathentry kind="src" path="prism-common/test"/>
+	<classpathentry kind="src" path="prism-j2d/src"/>
+	<classpathentry kind="src" path="prism-sw/src"/>
+	<classpathentry kind="src" path="prism-null/src"/>
+	<classpathentry kind="src" path="prism-ps/src"/>
+	<classpathentry kind="src" path="prism-ps/build/gensrc"/>
+	<classpathentry kind="src" path="prism-util/src"/>
+	
 	<classpathentry kind="src" path="test-stub-toolkit/src"/>
+	
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="lib" path="../import/antlr-3.1.3/antlr-3.1.3/lib/antlr-3.1.3.jar"/>
 	<classpathentry kind="lib" path="../import/findbugs-2.0.1/findbugs-2.0.1/lib/ant.jar"/>
+	
+	<classpathentry kind="src" path="/rt-closed"/>
+	<classpathentry kind="src" path="/org.eclipse.swt">
+		<attributes>
+			<attribute name="optional" value="true"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="lib" path="../import/swt-3.7.1/swt-debug.jar"/>
-	<classpathentry kind="src" path="/rt-closed"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/build.xml	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="Ensemble8" default="default" basedir=".">
+    <description>Builds, tests, and runs the project Ensemble8.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <!--
+
+    There exist several targets which are by default empty and which can be 
+    used for execution of your tasks. These targets are usually executed 
+    before and after some main targets. They are: 
+
+      -pre-init:                 called before initialization of project properties
+      -post-init:                called after initialization of project properties
+      -pre-compile:              called before javac compilation
+      -post-compile:             called after javac compilation
+      -pre-compile-single:       called before javac compilation of single file
+      -post-compile-single:      called after javac compilation of single file
+      -pre-compile-test:         called before javac compilation of JUnit tests
+      -post-compile-test:        called after javac compilation of JUnit tests
+      -pre-compile-test-single:  called before javac compilation of single JUnit test
+      -post-compile-test-single: called after javac compilation of single JUunit test
+      -pre-jar:                  called before JAR building
+      -post-jar:                 called after JAR building
+      -post-clean:               called after cleaning build products
+
+    (Targets beginning with '-' are not intended to be called on their own.)
+
+    Example of inserting an obfuscator after compilation could look like this:
+
+        <target name="-post-compile">
+            <obfuscate>
+                <fileset dir="${build.classes.dir}"/>
+            </obfuscate>
+        </target>
+
+    For list of available properties check the imported 
+    nbproject/build-impl.xml file. 
+
+
+    Another way to customize the build is by overriding existing main targets.
+    The targets of interest are: 
+
+      -init-macrodef-javac:     defines macro for javac compilation
+      -init-macrodef-junit:     defines macro for junit execution
+      -init-macrodef-debug:     defines macro for class debugging
+      -init-macrodef-java:      defines macro for class execution
+      -do-jar-with-manifest:    JAR building (if you are using a manifest)
+      -do-jar-without-manifest: JAR building (if you are not using a manifest)
+      run:                      execution of project 
+      -javadoc-build:           Javadoc generation
+      test-report:              JUnit report generation
+
+    An example of overriding the target for project execution could look like this:
+
+        <target name="run" depends="Ensemble8-impl.jar">
+            <exec dir="bin" executable="launcher.exe">
+                <arg file="${dist.jar}"/>
+            </exec>
+        </target>
+
+    Notice that the overridden target depends on the jar target and not only on 
+    the compile target as the regular run target does. Again, for a list of available 
+    properties which you can use, check the target you are overriding in the
+    nbproject/build-impl.xml file. 
+
+    -->
+    
+    <!-- COPY SAMPLE SRC TO BUILD DIR -->
+    <target name="-pre-compile">
+        <echo>Copying all sample source files to build dir</echo>
+         <copy todir="${build.classes.dir}">
+            <fileset dir="${basedir}/src/samples">
+                <include name="**/samples/**/*.java"/>
+                <include name="**/*.js"/> <!-- include javascript files -->
+                <include name="**/*.wav"/> <!-- include wav files -->
+                <include name="**/*.css"/> <!-- include css files -->
+            </fileset>
+        </copy>
+    </target>
+    
+    <!-- DON'T INCLUDE COMPILE TIME CODE IN APP JAR -->
+    <target name="-pre-jar">
+        <delete dir="${build.classes.dir}/ensemble/compiletime"/>
+    </target>
+    
+    <!-- COPY LIBS INTO JAR FILE: so that we have a simple single jar application -->
+    <target name="-post-jar">
+        <zip destfile="${dist.jar}" update="true">
+            <zipfileset src="${file.reference.lucene-core-3.2.0.jar}"/>
+            <zipfileset src="${file.reference.lucene-grouping-3.2.0.jar}"/>
+        </zip>
+    </target>
+    
+    <target name="ensemble-generate-src" depends="init,compile" description="Ensemble: Generate source.">
+       <java classname="ensemble.compiletime.EnsembleCompiletimeMain" dir="${basedir}">
+         <arg value="false"/>
+         <classpath>
+           <pathelement location="${build.classes.dir}"/>
+           <pathelement path="${javac.classpath}"/>
+         </classpath>
+       </java>
+    </target>
+    
+    <target name="ensemble-generate-src-and-index" depends="init,compile" description="Ensemble: Generate source and index.">
+       <java classname="ensemble.compiletime.EnsembleCompiletimeMain" dir="${basedir}">
+         <arg value="true"/>
+         <classpath>
+           <pathelement location="${build.classes.dir}"/>
+           <pathelement path="${javac.classpath}"/>
+         </classpath>
+       </java>
+    </target>
+</project>
Binary file apps/samples/Ensemble8/lib/lucene-core-3.2.0.jar has changed
Binary file apps/samples/Ensemble8/lib/lucene-grouping-3.2.0.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/manifest.mf	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/nbproject/build-impl.xml	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,1421 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
+***         EDIT ../build.xml INSTEAD         ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+  - initialization
+  - compilation
+  - jar
+  - execution
+  - debugging
+  - javadoc
+  - test compilation
+  - test execution
+  - test debugging
+  - applet
+  - cleanup
+
+        -->
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Ensemble8-impl">
+    <fail message="Please build using Ant 1.8.0 or higher.">
+        <condition>
+            <not>
+                <antversion atleast="1.8.0"/>
+            </not>
+        </condition>
+    </fail>
+    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
+    <!-- 
+                ======================
+                INITIALIZATION SECTION 
+                ======================
+            -->
+    <target name="-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="-pre-init" name="-init-private">
+        <property file="nbproject/private/config.properties"/>
+        <property file="nbproject/private/configs/${config}.properties"/>
+        <property file="nbproject/private/private.properties"/>
+    </target>
+    <target depends="-pre-init,-init-private" name="-init-user">
+        <property file="${user.properties.file}"/>
+        <!-- The two properties below are usually overridden -->
+        <!-- by the active platform. Just a fallback. -->
+        <property name="default.javac.source" value="1.4"/>
+        <property name="default.javac.target" value="1.4"/>
+    </target>
+    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
+        <property file="nbproject/configs/${config}.properties"/>
+        <property file="nbproject/project.properties"/>
+    </target>
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+        <available file="${manifest.file}" property="manifest.available"/>
+        <condition property="splashscreen.available">
+            <and>
+                <not>
+                    <equals arg1="${application.splash}" arg2="" trim="true"/>
+                </not>
+                <available file="${application.splash}"/>
+            </and>
+        </condition>
+        <condition property="main.class.available">
+            <and>
+                <isset property="main.class"/>
+                <not>
+                    <equals arg1="${main.class}" arg2="" trim="true"/>
+                </not>
+            </and>
+        </condition>
+        <condition property="manifest.available+main.class">
+            <and>
+                <isset property="manifest.available"/>
+                <isset property="main.class.available"/>
+            </and>
+        </condition>
+        <condition property="do.archive">
+            <not>
+                <istrue value="${jar.archive.disabled}"/>
+            </not>
+        </condition>
+        <condition property="do.mkdist">
+            <and>
+                <isset property="do.archive"/>
+                <isset property="libs.CopyLibs.classpath"/>
+                <not>
+                    <istrue value="${mkdist.disabled}"/>
+                </not>
+            </and>
+        </condition>
+        <condition property="manifest.available+main.class+mkdist.available">
+            <and>
+                <istrue value="${manifest.available+main.class}"/>
+                <isset property="do.mkdist"/>
+            </and>
+        </condition>
+        <condition property="do.archive+manifest.available">
+            <and>
+                <isset property="manifest.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="do.archive+main.class.available">
+            <and>
+                <isset property="main.class.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="do.archive+splashscreen.available">
+            <and>
+                <isset property="splashscreen.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="do.archive+manifest.available+main.class">
+            <and>
+                <istrue value="${manifest.available+main.class}"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="manifest.available-mkdist.available">
+            <or>
+                <istrue value="${manifest.available}"/>
+                <isset property="do.mkdist"/>
+            </or>
+        </condition>
+        <condition property="manifest.available+main.class-mkdist.available">
+            <or>
+                <istrue value="${manifest.available+main.class}"/>
+                <isset property="do.mkdist"/>
+            </or>
+        </condition>
+        <condition property="have.tests">
+            <or/>
+        </condition>
+        <condition property="have.sources">
+            <or>
+                <available file="${src.compiletime.dir}"/>
+                <available file="${src.generated.dir}"/>
+                <available file="${src.app.dir}"/>
+                <available file="${src.samples.dir}"/>
+            </or>
+        </condition>
+        <condition property="netbeans.home+have.tests">
+            <and>
+                <isset property="netbeans.home"/>
+                <isset property="have.tests"/>
+            </and>
+        </condition>
+        <condition property="no.javadoc.preview">
+            <and>
+                <isset property="javadoc.preview"/>
+                <isfalse value="${javadoc.preview}"/>
+            </and>
+        </condition>
+        <property name="run.jvmargs" value=""/>
+        <property name="run.jvmargs.ide" value=""/>
+        <property name="javac.compilerargs" value=""/>
+        <property name="work.dir" value="${basedir}"/>
+        <condition property="no.deps">
+            <and>
+                <istrue value="${no.dependencies}"/>
+            </and>
+        </condition>
+        <property name="javac.debug" value="true"/>
+        <property name="javadoc.preview" value="true"/>
+        <property name="application.args" value=""/>
+        <property name="source.encoding" value="${file.encoding}"/>
+        <property name="runtime.encoding" value="${source.encoding}"/>
+        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
+            <and>
+                <isset property="javadoc.encoding"/>
+                <not>
+                    <equals arg1="${javadoc.encoding}" arg2=""/>
+                </not>
+            </and>
+        </condition>
+        <property name="javadoc.encoding.used" value="${source.encoding}"/>
+        <property name="includes" value="**"/>
+        <property name="excludes" value=""/>
+        <property name="do.depend" value="false"/>
+        <condition property="do.depend.true">
+            <istrue value="${do.depend}"/>
+        </condition>
+        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+            <length length="0" string="${endorsed.classpath}" when="greater"/>
+        </condition>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <property name="javac.fork" value="${jdkBug6558476}"/>
+        <property name="jar.index" value="false"/>
+        <property name="jar.index.metainf" value="${jar.index}"/>
+        <property name="copylibs.rebase" value="true"/>
+        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
+        <condition property="junit.available">
+            <or>
+                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
+                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
+            </or>
+        </condition>
+        <condition property="testng.available">
+            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
+        </condition>
+        <condition property="junit+testng.available">
+            <and>
+                <istrue value="${junit.available}"/>
+                <istrue value="${testng.available}"/>
+            </and>
+        </condition>
+        <condition else="testng" property="testng.mode" value="mixed">
+            <istrue value="${junit+testng.available}"/>
+        </condition>
+        <condition else="" property="testng.debug.mode" value="-mixed">
+            <istrue value="${junit+testng.available}"/>
+        </condition>
+    </target>
+    <target name="-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
+        <fail unless="src.compiletime.dir">Must set src.compiletime.dir</fail>
+        <fail unless="src.generated.dir">Must set src.generated.dir</fail>
+        <fail unless="src.app.dir">Must set src.app.dir</fail>
+        <fail unless="src.samples.dir">Must set src.samples.dir</fail>
+        <fail unless="build.dir">Must set build.dir</fail>
+        <fail unless="dist.dir">Must set dist.dir</fail>
+        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+        <fail unless="dist.jar">Must set dist.jar</fail>
+    </target>
+    <target name="-init-macrodef-property">
+        <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <attribute name="name"/>
+            <attribute name="value"/>
+            <sequential>
+                <property name="@{name}" value="${@{value}}"/>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${src.compiletime.dir}:${src.generated.dir}:${src.app.dir}:${src.samples.dir}" name="srcdir"/>
+            <attribute default="${build.classes.dir}" name="destdir"/>
+            <attribute default="${javac.classpath}" name="classpath"/>
+            <attribute default="${javac.processorpath}" name="processorpath"/>
+            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="${javac.debug}" name="debug"/>
+            <attribute default="${empty.dir}" name="sourcepath"/>
+            <attribute default="${empty.dir}" name="gensrcdir"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property location="${build.dir}/empty" name="empty.dir"/>
+                <mkdir dir="${empty.dir}"/>
+                <mkdir dir="@{apgeneratedsrcdir}"/>
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+                    <src>
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+                            <include name="*"/>
+                        </dirset>
+                    </src>
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <compilerarg line="${javac.compilerargs}"/>
+                    <compilerarg value="-processorpath"/>
+                    <compilerarg path="@{processorpath}:${empty.dir}"/>
+                    <compilerarg line="${ap.processors.internal}"/>
+                    <compilerarg line="${annotation.processing.processor.options}"/>
+                    <compilerarg value="-s"/>
+                    <compilerarg path="@{apgeneratedsrcdir}"/>
+                    <compilerarg line="${ap.proc.none.internal}"/>
+                    <customize/>
+                </javac>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${src.compiletime.dir}:${src.generated.dir}:${src.app.dir}:${src.samples.dir}" name="srcdir"/>
+            <attribute default="${build.classes.dir}" name="destdir"/>
+            <attribute default="${javac.classpath}" name="classpath"/>
+            <attribute default="${javac.processorpath}" name="processorpath"/>
+            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="${javac.debug}" name="debug"/>
+            <attribute default="${empty.dir}" name="sourcepath"/>
+            <attribute default="${empty.dir}" name="gensrcdir"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property location="${build.dir}/empty" name="empty.dir"/>
+                <mkdir dir="${empty.dir}"/>
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+                    <src>
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+                            <include name="*"/>
+                        </dirset>
+                    </src>
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <compilerarg line="${javac.compilerargs}"/>
+                    <customize/>
+                </javac>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
+        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${src.compiletime.dir}:${src.generated.dir}:${src.app.dir}:${src.samples.dir}" name="srcdir"/>
+            <attribute default="${build.classes.dir}" name="destdir"/>
+            <attribute default="${javac.classpath}" name="classpath"/>
+            <sequential>
+                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                </depend>
+            </sequential>
+        </macrodef>
+        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${build.classes.dir}" name="destdir"/>
+            <sequential>
+                <fail unless="javac.includes">Must set javac.includes</fail>
+                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
+                    <path>
+                        <filelist dir="@{destdir}" files="${javac.includes}"/>
+                    </path>
+                    <globmapper from="*.java" to="*.class"/>
+                </pathconvert>
+                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
+                <delete>
+                    <files includesfile="${javac.includesfile.binary}"/>
+                </delete>
+                <delete>
+                    <fileset file="${javac.includesfile.binary}"/>
+                </delete>
+            </sequential>
+        </macrodef>
+    </target>
+    <target if="${junit.available}" name="-init-macrodef-junit-init">
+        <condition else="false" property="nb.junit.batch" value="true">
+            <and>
+                <istrue value="${junit.available}"/>
+                <not>
+                    <isset property="test.method"/>
+                </not>
+            </and>
+        </condition>
+        <condition else="false" property="nb.junit.single" value="true">
+            <and>
+                <istrue value="${junit.available}"/>
+                <isset property="test.method"/>
+            </and>
+        </condition>
+    </target>
+    <target name="-init-test-properties">
+        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
+        <property name="test.binarytestincludes" value=""/>
+        <property name="test.binaryexcludes" value=""/>
+    </target>
+    <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
+        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property name="junit.forkmode" value="perTest"/>
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
+                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
+                    <syspropertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <formatter type="brief" usefile="false"/>
+                    <formatter type="xml"/>
+                    <jvmarg value="-ea"/>
+                    <customize/>
+                </junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
+        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property name="junit.forkmode" value="perTest"/>
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
+                    <batchtest todir="${build.test.results.dir}">
+                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
+                            <filename name="${test.binarytestincludes}"/>
+                        </fileset>
+                    </batchtest>
+                    <syspropertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <formatter type="brief" usefile="false"/>
+                    <formatter type="xml"/>
+                    <jvmarg value="-ea"/>
+                    <customize/>
+                </junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
+    <target if="${testng.available}" name="-init-macrodef-testng">
+        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
+                    <isset property="test.method"/>
+                </condition>
+                <union id="test.set"/>
+                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
+                <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Ensemble8" testname="TestNG tests" workingDir="${work.dir}">
+                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
+                    <propertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                    </propertyset>
+                    <customize/>
+                </testng>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-test-impl">
+        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element implicit="true" name="customize" optional="true"/>
+            <sequential>
+                <echo>No tests executed.</echo>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
+        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element implicit="true" name="customize" optional="true"/>
+            <sequential>
+                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize/>
+                </j2seproject3:junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
+        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element implicit="true" name="customize" optional="true"/>
+            <sequential>
+                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize/>
+                </j2seproject3:testng>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
+        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <sequential>
+                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize>
+                        <classpath>
+                            <path path="${run.test.classpath}"/>
+                        </classpath>
+                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                        <jvmarg line="${run.jvmargs}"/>
+                        <jvmarg line="${run.jvmargs.ide}"/>
+                    </customize>
+                </j2seproject3:test-impl>
+            </sequential>
+        </macrodef>
+    </target>
+    <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
+        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property name="junit.forkmode" value="perTest"/>
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
+                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
+                    <syspropertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <formatter type="brief" usefile="false"/>
+                    <formatter type="xml"/>
+                    <jvmarg value="-ea"/>
+                    <jvmarg line="${debug-args-line}"/>
+                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+                    <customize/>
+                </junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
+        <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property name="junit.forkmode" value="perTest"/>
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
+                    <batchtest todir="${build.test.results.dir}">
+                        <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
+                            <filename name="${test.binarytestincludes}"/>
+                        </fileset>
+                    </batchtest>
+                    <syspropertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <formatter type="brief" usefile="false"/>
+                    <formatter type="xml"/>
+                    <jvmarg value="-ea"/>
+                    <jvmarg line="${debug-args-line}"/>
+                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+                    <customize/>
+                </junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
+        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element implicit="true" name="customize" optional="true"/>
+            <sequential>
+                <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize/>
+                </j2seproject3:junit-debug>
+            </sequential>
+        </macrodef>
+    </target>
+    <target if="${testng.available}" name="-init-macrodef-testng-debug">
+        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <element name="customize2" optional="true"/>
+            <sequential>
+                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
+                    <isset property="test.method"/>
+                </condition>
+                <condition else="-suitename Ensemble8 -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
+                    <matches pattern=".*\.xml" string="@{testClass}"/>
+                </condition>
+                <delete dir="${build.test.results.dir}" quiet="true"/>
+                <mkdir dir="${build.test.results.dir}"/>
+                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
+                    <customize>
+                        <customize2/>
+                        <jvmarg value="-ea"/>
+                        <arg line="${testng.debug.mode}"/>
+                        <arg line="-d ${build.test.results.dir}"/>
+                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
+                        <arg line="${testng.cmd.args}"/>
+                    </customize>
+                </j2seproject3:debug>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
+        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <element implicit="true" name="customize2" optional="true"/>
+            <sequential>
+                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
+                    <customize2/>
+                </j2seproject3:testng-debug>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
+        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <sequential>
+                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize>
+                        <classpath>
+                            <path path="${run.test.classpath}"/>
+                        </classpath>
+                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                        <jvmarg line="${run.jvmargs}"/>
+                        <jvmarg line="${run.jvmargs.ide}"/>
+                    </customize>
+                </j2seproject3:test-debug-impl>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
+        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <sequential>
+                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
+                    <customize2>
+                        <syspropertyset>
+                            <propertyref prefix="test-sys-prop."/>
+                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                        </syspropertyset>
+                    </customize2>
+                </j2seproject3:testng-debug-impl>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
+    <!--
+                pre NB7.2 profiling section; consider it deprecated
+            -->
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
+    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
+        <macrodef name="resolve">
+            <attribute name="name"/>
+            <attribute name="value"/>
+            <sequential>
+                <property name="@{name}" value="${env.@{value}}"/>
+            </sequential>
+        </macrodef>
+        <macrodef name="profile">
+            <attribute default="${main.class}" name="classname"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property environment="env"/>
+                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
+                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
+                    <jvmarg line="${profiler.info.jvmargs}"/>
+                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+                    <arg line="${application.args}"/>
+                    <classpath>
+                        <path path="${run.classpath}"/>
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+    </target>
+    <!--
+                end of pre NB7.2 profiling section
+            -->
+    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
+        <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <attribute default="${main.class}" name="name"/>
+            <attribute default="${debug.classpath}" name="classpath"/>
+            <attribute default="" name="stopclassname"/>
+            <sequential>
+                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                </nbjpdastart>
+            </sequential>
+        </macrodef>
+        <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <attribute default="${build.classes.dir}" name="dir"/>
+            <sequential>
+                <nbjpdareload>
+                    <fileset dir="@{dir}" includes="${fix.classes}">
+                        <include name="${fix.includes}*.class"/>
+                    </fileset>
+                </nbjpdareload>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-debug-args">
+        <property name="version-output" value="java version &quot;${ant.java.version}"/>
+        <condition property="have-jdk-older-than-1.4">
+            <or>
+                <contains string="${version-output}" substring="java version &quot;1.0"/>
+                <contains string="${version-output}" substring="java version &quot;1.1"/>
+                <contains string="${version-output}" substring="java version &quot;1.2"/>
+                <contains string="${version-output}" substring="java version &quot;1.3"/>
+            </or>
+        </condition>
+        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+            <istrue value="${have-jdk-older-than-1.4}"/>
+        </condition>
+        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+            <os family="windows"/>
+        </condition>
+        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
+            <isset property="debug.transport"/>
+        </condition>
+    </target>
+    <target depends="-init-debug-args" name="-init-macrodef-debug">
+        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${main.class}" name="classname"/>
+            <attribute default="${debug.classpath}" name="classpath"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg line="${debug-args-line}"/>
+                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
+                    <jvmarg line="${run.jvmargs}"/>
+                    <jvmarg line="${run.jvmargs.ide}"/>
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-java">
+        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <attribute default="${main.class}" name="classname"/>
+            <attribute default="${run.classpath}" name="classpath"/>
+            <attribute default="jvm" name="jvm"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
+                    <jvmarg line="${run.jvmargs}"/>
+                    <jvmarg line="${run.jvmargs.ide}"/>
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-copylibs">
+        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${manifest.file}" name="manifest"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+                <pathconvert property="run.classpath.without.build.classes.dir">
+                    <path path="${run.classpath}"/>
+                    <map from="${build.classes.dir.resolved}" to=""/>
+                </pathconvert>
+                <pathconvert pathsep=" " property="jar.classpath">
+                    <path path="${run.classpath.without.build.classes.dir}"/>
+                    <chainedmapper>
+                        <flattenmapper/>
+                        <filtermapper>
+                            <replacestring from=" " to="%20"/>
+                        </filtermapper>
+                        <globmapper from="*" to="lib/*"/>
+                    </chainedmapper>
+                </pathconvert>
+                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+                <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+                    <fileset dir="${build.classes.dir}"/>
+                    <manifest>
+                        <attribute name="Class-Path" value="${jar.classpath}"/>
+                        <customize/>
+                    </manifest>
+                </copylibs>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-presetdef-jar">
+        <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
+                <j2seproject1:fileset dir="${build.classes.dir}"/>
+            </jar>
+        </presetdef>
+    </target>
+    <target name="-init-ap-cmdline-properties">
+        <property name="annotation.processing.enabled" value="true"/>
+        <property name="annotation.processing.processors.list" value=""/>
+        <property name="annotation.processing.processor.options" value=""/>
+        <property name="annotation.processing.run.all.processors" value="true"/>
+        <property name="javac.processorpath" value="${javac.classpath}"/>
+        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
+        <condition property="ap.supported.internal" value="true">
+            <not>
+                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
+            </not>
+        </condition>
+    </target>
+    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
+        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
+            <isfalse value="${annotation.processing.run.all.processors}"/>
+        </condition>
+        <condition else="" property="ap.proc.none.internal" value="-proc:none">
+            <isfalse value="${annotation.processing.enabled}"/>
+        </condition>
+    </target>
+    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
+        <property name="ap.cmd.line.internal" value=""/>
+    </target>
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
+    <!--
+                ===================
+                COMPILATION SECTION
+                ===================
+            -->
+    <target name="-deps-jar-init" unless="built-jar.properties">
+        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
+        <delete file="${built-jar.properties}" quiet="true"/>
+    </target>
+    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
+        <echo level="warn" message="Cycle detected: Ensemble8 was already built"/>
+    </target>
+    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
+        <mkdir dir="${build.dir}"/>
+        <touch file="${built-jar.properties}" verbose="false"/>
+        <property file="${built-jar.properties}" prefix="already.built.jar."/>
+        <antcall target="-warn-already-built-jar"/>
+        <propertyfile file="${built-jar.properties}">
+            <entry key="${basedir}" value=""/>
+        </propertyfile>
+    </target>
+    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
+    <target depends="init" name="-check-automatic-build">
+        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
+    </target>
+    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
+        <antcall target="clean"/>
+    </target>
+    <target depends="init,deps-jar" name="-pre-pre-compile">
+        <mkdir dir="${build.classes.dir}"/>
+    </target>
+    <target name="-pre-compile">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target if="do.depend.true" name="-compile-depend">
+        <pathconvert property="build.generated.subdirs">
+            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+                <include name="*"/>
+            </dirset>
+        </pathconvert>
+        <j2seproject3:depend srcdir="${src.compiletime.dir}:${src.generated.dir}:${src.app.dir}:${src.samples.dir}:${build.generated.subdirs}"/>
+    </target>
+    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
+        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
+        <copy todir="${build.classes.dir}">
+            <fileset dir="${src.compiletime.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.generated.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.app.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.samples.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+        </copy>
+    </target>
+    <target if="has.persistence.xml" name="-copy-persistence-xml">
+        <mkdir dir="${build.classes.dir}/META-INF"/>
+        <copy todir="${build.classes.dir}/META-INF">
+            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
+        </copy>
+    </target>
+    <target name="-post-compile">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+    <target name="-pre-compile-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
+        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+        <j2seproject3:force-recompile/>
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.compiletime.dir}:${src.generated.dir}:${src.app.dir}:${src.samples.dir}"/>
+    </target>
+    <target name="-post-compile-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+    <!--
+                ====================
+                JAR BUILDING SECTION
+                ====================
+            -->
+    <target depends="init" name="-pre-pre-jar">
+        <dirname file="${dist.jar}" property="dist.jar.dir"/>
+        <mkdir dir="${dist.jar.dir}"/>
+    </target>
+    <target name="-pre-jar">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
+        <j2seproject1:jar/>
+    </target>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
+        <j2seproject1:jar manifest="${manifest.file}"/>
+    </target>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
+        <j2seproject1:jar manifest="${manifest.file}">
+            <j2seproject1:manifest>
+                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+            </j2seproject1:manifest>
+        </j2seproject1:jar>
+        <echo level="info">To run this application from the command line without Ant, try:</echo>
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+        <property location="${dist.jar}" name="dist.jar.resolved"/>
+        <pathconvert property="run.classpath.with.dist.jar">
+            <path path="${run.classpath}"/>
+            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+        </pathconvert>
+        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+    </target>
+    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+        <touch file="${tmp.manifest.file}" verbose="false"/>
+    </target>
+    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
+    </target>
+    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
+        <manifest file="${tmp.manifest.file}" mode="update">
+            <attribute name="Main-Class" value="${main.class}"/>
+        </manifest>
+    </target>
+    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
+        <basename file="${application.splash}" property="splashscreen.basename"/>
+        <mkdir dir="${build.classes.dir}/META-INF"/>
+        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
+        <manifest file="${tmp.manifest.file}" mode="update">
+            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
+        </manifest>
+    </target>
+    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
+        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
+        <echo level="info">To run this application from the command line without Ant, try:</echo>
+        <property location="${dist.jar}" name="dist.jar.resolved"/>
+        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
+    </target>
+    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
+        <delete>
+            <fileset file="${tmp.manifest.file}"/>
+        </delete>
+    </target>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
+    <target name="-post-jar">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
+    <!--
+                =================
+                EXECUTION SECTION
+                =================
+            -->
+    <target depends="init,compile" description="Run a main class." name="run">
+        <j2seproject1:java>
+            <customize>
+                <arg line="${application.args}"/>
+            </customize>
+        </j2seproject1:java>
+    </target>
+    <target name="-do-not-recompile">
+        <property name="javac.includes.binary" value=""/>
+    </target>
+    <target depends="init,compile-single" name="run-single">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <j2seproject1:java classname="${run.class}"/>
+    </target>
+    <target depends="init,compile-test-single" name="run-test-with-main">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
+    </target>
+    <!--
+                =================
+                DEBUGGING SECTION
+                =================
+            -->
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
+        <j2seproject1:nbjpdastart name="${debug.class}"/>
+    </target>
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
+    </target>
+    <target depends="init,compile" name="-debug-start-debuggee">
+        <j2seproject3:debug>
+            <customize>
+                <arg line="${application.args}"/>
+            </customize>
+        </j2seproject3:debug>
+    </target>
+    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
+        <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+    </target>
+    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
+    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+        <j2seproject3:debug classname="${debug.class}"/>
+    </target>
+    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
+    </target>
+    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
+    <target depends="init" name="-pre-debug-fix">
+        <fail unless="fix.includes">Must set fix.includes</fail>
+        <property name="javac.includes" value="${fix.includes}.java"/>
+    </target>
+    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
+        <j2seproject1:nbjpdareload/>
+    </target>
+    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
+    <!--
+                =================
+                PROFILING SECTION
+                =================
+            -->
+    <!--
+                pre NB7.2 profiler integration
+            -->
+    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile/>
+    </target>
+    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
+        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile classname="${profile.class}"/>
+    </target>
+    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile classname="sun.applet.AppletViewer">
+            <customize>
+                <arg value="${applet.url}"/>
+            </customize>
+        </profile>
+    </target>
+    <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+            <jvmarg line="${profiler.info.jvmargs}"/>
+            <test name="${profile.class}"/>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+            </classpath>
+            <syspropertyset>
+                <propertyref prefix="test-sys-prop."/>
+                <mapper from="test-sys-prop.*" to="*" type="glob"/>
+            </syspropertyset>
+            <formatter type="brief" usefile="false"/>
+            <formatter type="xml"/>
+        </junit>
+    </target>
+    <!--
+                end of pre NB72 profiling section
+            -->
+    <target if="netbeans.home" name="-profile-check">
+        <condition property="profiler.configured">
+            <or>
+                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
+                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
+            </or>
+        </condition>
+    </target>
+    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
+        <startprofiler/>
+        <antcall target="run"/>
+    </target>
+    <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <startprofiler/>
+        <antcall target="run-single"/>
+    </target>
+    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
+    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
+        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+        <startprofiler/>
+        <antcall target="test-single"/>
+    </target>
+    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <startprofiler/>
+        <antcal target="run-test-with-main"/>
+    </target>
+    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
+        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+        <startprofiler/>
+        <antcall target="run-applet"/>
+    </target>
+    <!--
+                ===============
+                JAVADOC SECTION
+                ===============
+            -->
+    <target depends="init" if="have.sources" name="-javadoc-build">
+        <mkdir dir="${dist.javadoc.dir}"/>
+        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
+            <and>
+                <isset property="endorsed.classpath.cmd.line.arg"/>
+                <not>
+                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
+                </not>
+            </and>
+        </condition>
+        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+            <classpath>
+                <path path="${javac.classpath}"/>
+            </classpath>
+            <fileset dir="${src.compiletime.dir}" excludes="*.java,${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
+            <fileset dir="${src.generated.dir}" excludes="*.java,${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
+            <fileset dir="${src.app.dir}" excludes="*.java,${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
+            <fileset dir="${src.samples.dir}" excludes="*.java,${excludes}" includes="${includes}">
+                <filename name="**/*.java"/>
+            </fileset>
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+                <include name="**/*.java"/>
+                <exclude name="*.java"/>
+            </fileset>
+            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
+        </javadoc>
+        <copy todir="${dist.javadoc.dir}">
+            <fileset dir="${src.compiletime.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
+            <fileset dir="${src.generated.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
+            <fileset dir="${src.app.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
+            <fileset dir="${src.samples.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+                <include name="**/doc-files/**"/>
+            </fileset>
+        </copy>
+    </target>
+    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
+        <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+    </target>
+    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
+    <!--
+                =========================
+                TEST COMPILATION SECTION
+                =========================
+            -->
+    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
+        <mkdir dir="${build.test.classes.dir}"/>
+    </target>
+    <target name="-pre-compile-test">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target if="do.depend.true" name="-compile-test-depend">
+        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
+    </target>
+    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir=""/>
+        <copy todir="${build.test.classes.dir}"/>
+    </target>
+    <target name="-post-compile-test">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
+    <target name="-pre-compile-test-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="" srcdir=""/>
+        <copy todir="${build.test.classes.dir}"/>
+    </target>
+    <target name="-post-compile-test-single">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
+    <!--
+                =======================
+                TEST EXECUTION SECTION
+                =======================
+            -->
+    <target depends="init" if="have.tests" name="-pre-test-run">
+        <mkdir dir="${build.test.results.dir}"/>
+    </target>
+    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
+        <j2seproject3:test testincludes="**/*Test.java"/>
+    </target>
+    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+    </target>
+    <target depends="init" if="have.tests" name="test-report"/>
+    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
+    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
+    <target depends="init" if="have.tests" name="-pre-test-run-single">
+        <mkdir dir="${build.test.results.dir}"/>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
+        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
+        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
+        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
+        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
+    <!--
+                =======================
+                TEST DEBUGGING SECTION
+                =======================
+            -->
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
+        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
+        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
+        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
+    </target>
+    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
+    </target>
+    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+    <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
+    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
+        <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+    </target>
+    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
+    <!--
+                =========================
+                APPLET EXECUTION SECTION
+                =========================
+            -->
+    <target depends="init,compile-single" name="run-applet">
+        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+        <j2seproject1:java classname="sun.applet.AppletViewer">
+            <customize>
+                <arg value="${applet.url}"/>
+            </customize>
+        </j2seproject1:java>
+    </target>
+    <!--
+                =========================
+                APPLET DEBUGGING  SECTION
+                =========================
+            -->
+    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
+        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+        <j2seproject3:debug classname="sun.applet.AppletViewer">
+            <customize>
+                <arg value="${applet.url}"/>
+            </customize>
+        </j2seproject3:debug>
+    </target>
+    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
+    <!--
+                ===============
+                CLEANUP SECTION
+                ===============
+            -->
+    <target name="-deps-clean-init" unless="built-clean.properties">
+        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
+        <delete file="${built-clean.properties}" quiet="true"/>
+    </target>
+    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
+        <echo level="warn" message="Cycle detected: Ensemble8 was already built"/>
+    </target>
+    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
+        <mkdir dir="${build.dir}"/>
+        <touch file="${built-clean.properties}" verbose="false"/>
+        <property file="${built-clean.properties}" prefix="already.built.clean."/>
+        <antcall target="-warn-already-built-clean"/>
+        <propertyfile file="${built-clean.properties}">
+            <entry key="${basedir}" value=""/>
+        </propertyfile>
+    </target>
+    <target depends="init" name="-do-clean">
+        <delete dir="${build.dir}"/>
+        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
+    </target>
+    <target name="-post-clean">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
+    <target name="-check-call-dep">
+        <property file="${call.built.properties}" prefix="already.built."/>
+        <condition property="should.call.dep">
+            <and>
+                <not>
+                    <isset property="already.built.${call.subproject}"/>
+                </not>
+                <available file="${call.script}"/>
+            </and>
+        </condition>
+    </target>
+    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
+        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
+            <propertyset>
+                <propertyref prefix="transfer."/>
+                <mapper from="transfer.*" to="*" type="glob"/>
+            </propertyset>
+        </ant>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/nbproject/genfiles.properties	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=79296a86
+build.xml.script.CRC32=655e0e8f
+build.xml.stylesheet.CRC32=28e38971@1.56.1.46
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=134533ca
+nbproject/build-impl.xml.script.CRC32=aa7c6be7
+nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/nbproject/project.properties	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,92 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=Ensemble
+application.vendor=Oracle
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+    ${run.classpath}
+debug.test.classpath=\
+    ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/Ensemble.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.jfxrt.jar=../../../../artifacts/sdk/rt/lib/ext/jfxrt.jar
+file.reference.lucene-core-3.2.0.jar=lib/lucene-core-3.2.0.jar
+file.reference.lucene-grouping-3.2.0.jar=lib/lucene-grouping-3.2.0.jar
+includes=**
+jar.archive.disabled=${jnlp.enabled}
+jar.compress=true
+jar.index=${jnlp.enabled}
+javac.classpath=\
+    ${file.reference.lucene-core-3.2.0.jar}:\
+    ${file.reference.lucene-grouping-3.2.0.jar}:\
+    ${file.reference.jfxrt.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.7
+javac.target=1.7
+javac.test.classpath=\
+    ${javac.classpath}:\
+    ${build.classes.dir}
+javac.test.processorpath=\
+    ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+jnlp.codebase.type=no.codebase
+jnlp.descriptor=application
+jnlp.enabled=false
+jnlp.mixed.code=default
+jnlp.offline-allowed=false
+jnlp.signed=false
+jnlp.signing=
+jnlp.signing.alias=
+jnlp.signing.keystore=
+main.class=ensemble.EnsembleApp
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=true
+platform.active=default_platform
+run.classpath=\
+    ${javac.classpath}:\
+    ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project.
+# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
+# To set system properties for unit tests define test-sys-prop.name=value:
+run.jvmargs=
+run.test.classpath=\
+    ${javac.test.classpath}:\
+    ${build.test.classes.dir}
+source.encoding=UTF-8
+src.app.dir=src/app
+src.compiletime.dir=src/compiletime
+src.generated.dir=src/generated
+src.samples.dir=src/samples
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/nbproject/project.xml	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.java.j2seproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+            <name>Ensemble8</name>
+            <source-roots>
+                <root id="src.compiletime.dir"/>
+                <root id="src.generated.dir"/>
+                <root id="src.app.dir"/>
+                <root id="src.samples.dir"/>
+            </source-roots>
+            <test-roots/>
+        </data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/DocsPage.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package ensemble;
+
+import ensemble.generated.Samples;
+import javafx.beans.property.ReadOnlyStringProperty;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.geometry.Insets;
+import javafx.geometry.Pos;
+import javafx.scene.Node;
+import javafx.scene.control.Button;
+import javafx.scene.control.ContentDisplay;
+import javafx.scene.control.Label;
+import javafx.scene.control.ScrollPane;
+import javafx.scene.layout.Region;
+import javafx.scene.layout.VBox;
+import javafx.scene.web.WebView;
+
+/**
+ * Ensmeble page for showing a page of documentation from the web
+ */
+public class DocsPage extends Region implements ChangeListener<String>, Page{
+    private final WebView webView = new WebView();
+    private final ScrollPane scrollPane = new ScrollPane();
+    private final VBox sideBar = new VBox(10);
+    private final Label sideBarTitle = new Label("Related Samples:");
+    private final PageBrowser pageBrowser;
+    private boolean isLocalChange = false;
+    private boolean showSideBar = false;
+    
+    public DocsPage(PageBrowser pageBrowser) {
+        this.pageBrowser = pageBrowser;
+        getChildren().add(webView);
+        scrollPane.setContent(sideBar);
+        sideBar.setAlignment(Pos.TOP_CENTER);
+        sideBar.getChildren().add(sideBarTitle);
+        sideBarTitle.getStyleClass().add("sidebar-title");
+        scrollPane.setFitToWidth(true);
+        sideBar.setPadding(new Insets(10));
+        webView.getEngine().locationProperty().addListener(this);
+    }
+
+    @Override public ReadOnlyStringProperty titleProperty() {
+        return webView.getEngine().titleProperty();
+    }
+
+    @Override public String getTitle() {
+        return webView.getEngine().getTitle();
+    }
+
+    @Override public String getUrl() {
+        return webView.getEngine().getLocation();
+    }
+
+    @Override public Node getNode() {
+        return this;
+    }
+    
+    @Override public void changed(ObservableValue<? extends String> ov, String oldLocation, String newLocation) {
+        if (!isLocalChange) pageBrowser.externalPageChange(newLocation);
+        updateSidebar(newLocation);
+    }
+    
+    public void goToUrl(String url) {
+        isLocalChange = true;
+        webView.getEngine().load(url);
+        isLocalChange = false;
+    }
+    
+    @Override protected void layoutChildren() {
+        final double w = getWidth();
+        final double h = getHeight();
+        if (showSideBar) {
+            final double sideBarWidth = sideBar.prefWidth(-1)+14;
+            webView.resize(w - sideBarWidth, h);
+            scrollPane.setLayoutX(w - sideBarWidth);
+            scrollPane.resize(sideBarWidth, h);
+        } else {
+            webView.resize(w,h);
+        }
+    }
+    
+    private void updateSidebar(String url) {
+        String key = url;
+        if (key.startsWith("http://docs.oracle.com/javafx/2/api/")) {
+            key = key.substring("http://docs.oracle.com/javafx/2/api/".length(), key.lastIndexOf('.'));
+            key = key.replaceAll("/", ".");
+        } else if (key.startsWith("http://docs.oracle.com/javase/7/docs/api/")) {
+            key = key.substring("http://docs.oracle.com/javase/7/docs/api/".length(), key.lastIndexOf('.'));
+            key = key.replaceAll("/", ".");
+        } 
+        SampleInfo[] samples = Samples.getSamplesForDoc(key);
+        if (samples == null || samples.length == 0) {
+            sideBar.getChildren().clear();
+            getChildren().remove(scrollPane);
+            showSideBar = false;
+        } else {
+            sideBar.getChildren().setAll(sideBarTitle);
+            for (final SampleInfo sample: samples) {
+                Button sampleButton = new Button(sample.name);
+                sampleButton.setCache(true);
+                sampleButton.getStyleClass().setAll("sample-button");
+                sampleButton.setGraphic(sample.getMediumPreview());
+                sampleButton.setContentDisplay(ContentDisplay.TOP);
+                sampleButton.setOnAction(new EventHandler<ActionEvent>() {
+                    @Override public void handle(ActionEvent actionEvent) {
+                        pageBrowser.goToSample(sample);
+                    }
+                });
+                sideBar.getChildren().add(sampleButton);
+            }
+            if (!showSideBar) getChildren().add(scrollPane);
+            showSideBar = true;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/EmbeddedApplication.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package ensemble;
+
+import ensemble.samples.animation.interpolator.InterpolatorApp;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javafx.application.Application;
+import javafx.scene.Node;
+import javafx.stage.Stage;
+
+/**
+ *
+ * @author Jasper Potts
+ */
+public class EmbeddedApplication {
+    private static Stage TEMP_STAGE = new Stage() {
+        
+    };
+    
+    public static Node createApplication(String className) {
+            System.out.println("EmbeddedApplication.createApplication()");
+        Node node = null;
+        try {
+//            Class appClass = Thread.currentThread().getContextClassLoader().loadClass(className);
+//            Class appClass = EmbeddedApplication.class.getClassLoader().loadClass(className);
+            Class appClass = InterpolatorApp.class;
+            System.out.println("appClass = " + appClass);
+            Application app = (Application)appClass.newInstance();
+            System.out.println("app = " + app);
+            app.init();
+            app.start(TEMP_STAGE);
+            node = TEMP_STAGE.getScene().getRoot();
+            System.out.println("node = " + node);
+            TEMP_STAGE.setScene(null);
+        } catch (Exception ex) {
+            Logger.getLogger(EmbeddedApplication.class.getName()).log(Level.SEVERE, "Error loading application class", ex);
+        }
+        return node;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/EnsembleApp.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,364 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package ensemble;
+
+import ensemble.control.Popover;
+import ensemble.control.SearchBox;
+import ensemble.control.TitledToolBar;
+import ensemble.generated.Samples;
+import javafx.application.Application;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.geometry.Insets;
+import javafx.geometry.Point2D;
+import javafx.geometry.Rectangle2D;
+import javafx.scene.Group;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.Pane;
+import javafx.scene.layout.Region;
+import javafx.scene.paint.Color;
+import javafx.scene.transform.Scale;
+import javafx.stage.Screen;
+import javafx.stage.Stage;
+
+/**
+ * Ensmeble Application
+ */
+public class EnsembleApp extends Application {
+    private static final String os = System.getProperty("os.name");
+    private static final String arch = System.getProperty("os.arch");
+    public static final boolean IS_BEAGLE = arch.equals("arm");
+    public static final boolean IS_DESKTOP = !IS_BEAGLE;
+    public static final boolean IS_IOS = "Darwin".equals(os);
+    public static final boolean IS_MAC = os.startsWith("Mac");
+    public static final boolean IS_IPHONE = false;
+    private static final int TOOL_BAR_BUTTON_SIZE = 30;
+    private Scene scene;
+    private Pane root;
+    private TitledToolBar toolBar;
+    private Button backButton;
+    private Button forwardButton;
+    private Button homeButton;
+    private ToggleButton listButton;
+    private ToggleButton searchButton;
+    private SearchBox searchBox = new SearchBox();
+    private Label titleLabel;
+    private PageBrowser pageBrowser;
+    private Popover sampleListPopover;
+    private SearchPopover searchPopover;
+    private MenuBar menuBar;
+  
+    static {
+        System.setProperty("http.proxyHost", "www-proxy.us.oracle.com");
+        System.setProperty("http.proxyPort", "80");
+        System.setProperty("https.proxyHost", "www-proxy.us.oracle.com");
+        System.setProperty("https.proxyPort", "80");
+    }
+
+    @Override public void init() throws Exception {
+        // LOAD FONTS
+    //    Font font = Font.loadFont(EnsembleApp.class.getResource("fonts/BreeSerif-Regular.ttf").toString(),10);
+     //   System.out.println("font = " + font);
+        // CREATE ROOT
+        root = new Pane() {
+            @Override protected void layoutChildren() {
+                super.layoutChildren();
+                final double w = getWidth();
+                final double h = getHeight();
+                final double menuHeight = IS_IOS || IS_MAC ? 0 : menuBar.prefHeight(w);
+                final double toolBarHeight = toolBar.prefHeight(w);
+                menuBar.resize(w, menuHeight);
+                toolBar.resizeRelocate(0, menuHeight, w, toolBarHeight);
+                pageBrowser.setLayoutY(toolBarHeight + menuHeight);
+                pageBrowser.resize(w, h-toolBarHeight);
+                pageBrowser.resize(w, h - toolBarHeight - menuHeight);
+                sampleListPopover.autosize();
+                Point2D listBtnBottomCenter = listButton.localToScene(listButton.getWidth()/2, listButton.getHeight());
+                sampleListPopover.setLayoutX((int)listBtnBottomCenter.getX()-50);
+                sampleListPopover.setLayoutY((int)listBtnBottomCenter.getY()+20);
+                Point2D searchBoxBottomCenter = searchBox.localToScene(searchBox.getWidth()/2, searchBox.getHeight());
+                searchPopover.setLayoutX((int)searchBoxBottomCenter.getX()-searchPopover.getLayoutBounds().getWidth()+50);
+                searchPopover.setLayoutY((int)searchBoxBottomCenter.getY()+20);
+            }
+        };
+        // CREATE MENUBAR/STATUSBAR SPACER
+        if (IS_IOS) {
+            Region statusSpacer = new Region();
+            statusSpacer.setPrefHeight(20);
+            root.getChildren().add(statusSpacer);
+        } else {
+            menuBar = new MenuBar();
+            menuBar.setUseSystemMenuBar(true);
+            Menu themeMenu = new Menu("Theme");
+            final RadioMenuItem caspianThemeMenuItem = new RadioMenuItem("Caspian");
+            caspianThemeMenuItem.setSelected(true);
+            final RadioMenuItem iOSThemeMenuItem = new RadioMenuItem("iOS");
+            ToggleGroup tg = new ToggleGroup();
+            caspianThemeMenuItem.setToggleGroup(tg);
+            iOSThemeMenuItem.setToggleGroup(tg);
+            tg.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {
+                @Override public void changed(ObservableValue<? extends Toggle> arg0, Toggle arg1, Toggle arg2) {
+                    scene.getStylesheets().setAll(
+                            "/ensemble/EnsembleStylesCommon.css",
+                            "/ensemble/EnsembleStyles"+(caspianThemeMenuItem.isSelected()?"Caspian":"IOS")+".css");
+                }
+            });
+            themeMenu.getItems().addAll(caspianThemeMenuItem,iOSThemeMenuItem);
+            menuBar.getMenus().add(themeMenu);
+            
+            ToggleGroup screenSizeToggle = new ToggleGroup();
+            menuBar.getMenus().add(
+                    MenuBuilder.create()
+                        .text("Screen size")
+                        .items(
+                            screenSizeMenuItem("iPad Landscape", 1024, 768, false, screenSizeToggle),
+                            screenSizeMenuItem("iPad Portrait", 768, 1024, false, screenSizeToggle),
+                            screenSizeMenuItem("Beagleboard", 1024, 600, false, screenSizeToggle),
+                            screenSizeMenuItem("iPad Retina Landscape", 2048, 1536, true, screenSizeToggle),
+                            screenSizeMenuItem("iPad Retina Portrait", 1536, 2048, true, screenSizeToggle),
+                            screenSizeMenuItem("iPhone Landscape", 480, 320, false, screenSizeToggle),
+                            screenSizeMenuItem("iPhone Portrait", 320, 480, false, screenSizeToggle),
+                            screenSizeMenuItem("iPhone 4 Landscape", 960, 640, true, screenSizeToggle),
+                            screenSizeMenuItem("iPhone 4 Portrait", 640, 960, true, screenSizeToggle),
+                            screenSizeMenuItem("iPhone 5 Landscape", 1136, 640, true, screenSizeToggle),
+                            screenSizeMenuItem("iPhone 5 Portrait", 640, 1136, true, screenSizeToggle)
+                        )
+                        .build());
+            screenSizeToggle.selectToggle(screenSizeToggle.getToggles().get(0));
+            
+            root.getChildren().add(menuBar);
+        }
+        // CREATE TOOLBAR
+        toolBar = new TitledToolBar();
+        root.getChildren().add(toolBar);
+        backButton = new Button();
+        backButton.setId("back");
+        backButton.setPrefSize(TOOL_BAR_BUTTON_SIZE, TOOL_BAR_BUTTON_SIZE);
+        forwardButton = new Button();
+        forwardButton.setId("forward");
+        forwardButton.setPrefSize(TOOL_BAR_BUTTON_SIZE, TOOL_BAR_BUTTON_SIZE);
+        homeButton = new Button();
+        homeButton.setId("home");
+        homeButton.setPrefSize(TOOL_BAR_BUTTON_SIZE, TOOL_BAR_BUTTON_SIZE);
+        listButton = new ToggleButton();
+        listButton.setId("list");
+        listButton.setPrefSize(TOOL_BAR_BUTTON_SIZE, TOOL_BAR_BUTTON_SIZE);
+        HBox.setMargin(listButton, new Insets(0, 0, 0, 7));
+        searchButton = new ToggleButton();
+        searchButton.setId("search");
+        searchButton.setPrefSize(TOOL_BAR_BUTTON_SIZE, TOOL_BAR_BUTTON_SIZE);
+        searchBox.setPrefWidth(200);
+        if (!IS_IOS) {
+            backButton.setGraphic(new Region());
+            forwardButton.setGraphic(new Region());
+            homeButton.setGraphic(new Region());
+            listButton.setGraphic(new Region());
+            searchButton.setGraphic(new Region());
+        }
+        toolBar.addLeftItems(backButton,forwardButton,homeButton,listButton);
+        toolBar.addRightItems(searchBox);
+
+        // create PageBrowser
+        pageBrowser = new PageBrowser();
+        toolBar.titleTextProperty().bind(pageBrowser.currentPageTitleProperty());
+        root.getChildren().add(0, pageBrowser);
+        pageBrowser.goHome();
+        // wire nav buttons
+        backButton.setOnAction(new EventHandler<ActionEvent>() {
+            @Override public void handle(ActionEvent event) {
+                pageBrowser.backward();
+            }
+        });
+        backButton.disableProperty().bind(pageBrowser.backPossibleProperty().not());
+        forwardButton.setOnAction(new EventHandler<ActionEvent>() {
+            @Override public void handle(ActionEvent event) {
+                pageBrowser.forward();
+            }
+        });
+        forwardButton.disableProperty().bind(pageBrowser.forwardPossibleProperty().not());
+        homeButton.setOnAction(new EventHandler<ActionEvent>() {
+            @Override public void handle(ActionEvent event) {
+                pageBrowser.goHome();
+            }
+        });
+        homeButton.disableProperty().bind(pageBrowser.atHomeProperty());
+        
+        // create and setup list popover
+        sampleListPopover = new Popover();
+        sampleListPopover.setPrefWidth(440);
+        root.getChildren().add(sampleListPopover);
+        final SamplePopoverTreeList rootPage = new SamplePopoverTreeList(Samples.ROOT,pageBrowser);
+        listButton.setOnMouseClicked(new EventHandler<MouseEvent>() {
+            @Override public void handle(MouseEvent e) {
+                if (sampleListPopover.isVisible()) {
+                    sampleListPopover.hide();
+                } else {
+                    sampleListPopover.clearPages();
+                    sampleListPopover.pushPage(rootPage);
+                    sampleListPopover.show(new Runnable() {
+                        @Override public void run() {
+                            listButton.setSelected(false);
+                        }
+                    });
+                }
+            }
+        });
+        
+        // create and setup search popover
+        searchPopover = new SearchPopover(searchBox,pageBrowser);
+        root.getChildren().add(searchPopover);
+    }
+
+    private RadioMenuItem screenSizeMenuItem(String text, final int width, final int height, final boolean retina, ToggleGroup tg) {
+        return RadioMenuItemBuilder.create()
+                .toggleGroup(tg)
+                .text(text + " " + width + "x" + height)
+                .onAction(new EventHandler<ActionEvent>() {
+                    @Override public void handle(ActionEvent t) {
+                        double menuHeight = IS_IOS || IS_MAC ? 0 : menuBar.prefHeight(width);
+                        scene.getWindow().setWidth(width + scene.getWindow().getWidth() - scene.getWidth());
+                        scene.getWindow().setHeight(height + menuHeight + scene.getWindow().getHeight() - scene.getHeight());
+                        if (retina) {
+                            Parent root = scene.getRoot();
+                            if (root instanceof Pane) {
+                                Group newRoot = new Group();
+                                newRoot.setAutoSizeChildren(false);
+                                scene.setRoot(newRoot);
+                                newRoot.getChildren().add(root);
+                                root.getTransforms().add(new Scale(2, 2, 0, 0));
+                                root.resize(width/2, height/2);
+                            } else {
+                                root.getChildrenUnmodifiable().get(0).resize(width/2, height/2);
+                            }
+                        } else {
+                            Parent root = scene.getRoot();
+                            if (root instanceof Group) {
+                                Pane oldRoot = (Pane)root.getChildrenUnmodifiable().get(0);
+                                ((Group)root).getChildren().clear();
+                                oldRoot.getTransforms().clear();
+                                scene.setRoot(oldRoot);
+                            }
+                        }
+                    }
+                })
+                .build();
+    }
+
+    @Override public void start(final Stage stage) throws Exception {
+        // CREATE SCENE
+        scene = new Scene(root, 1024, 768,Color.BLACK);
+        if (IS_MAC || IS_IOS) {
+            scene.getStylesheets().addAll(
+                    "/ensemble/EnsembleStylesCommon.css",
+                    "/ensemble/EnsembleStyles"+(IS_IOS?"IOS":"Caspian")+".css",
+                    "/ensemble/EnsembleStylesHelvetica.css");
+        } else {
+            scene.getStylesheets().addAll(
+                    "/ensemble/EnsembleStylesCommon.css",
+                    "/ensemble/EnsembleStyles"+(IS_IOS?"IOS":"Caspian")+".css");
+        }
+        scene.getStylesheets().add("http://fonts.googleapis.com/css?family=Bree+Serif");
+        stage.setScene(scene);
+        // SHOW STAGE
+        if (IS_IOS) {
+            setupIosStage(stage, scene);
+        }
+        // START FULL SCREEN IF WANTED
+        if (PlatformFeatures.START_FULL_SCREEN) {
+            Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
+            stage.setX(primaryScreenBounds.getMinX());
+            stage.setY(primaryScreenBounds.getMinY());
+            stage.setWidth(primaryScreenBounds.getWidth());
+            stage.setHeight(primaryScreenBounds.getHeight());
+        }
+        stage.setTitle("Ensemble3");
+        stage.show();
+    }
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String[] args) {
+        launch(args);
+    }
+
+    private void setupIosStage(Stage stage, Scene scene) {}
+//    private void setupIosStage(final Stage stage,final Scene scene) {
+//        // Synthisize Scroll Events from mouse drag events
+//        IosScrollEventSynthesizer scrollEventSynthesizer = new IosScrollEventSynthesizer(scene);
+//        javafx.ext.ios.IOSApplication.setStatusBarStyleAnimated(javafx.ext.ios.StatusBarStyle.DEFAULT, false);
+//        final double SCREEN_WIDTH = Screen.getPrimary().getBounds().getWidth();
+//        final double SCREEN_HEIGHT = Screen.getPrimary().getBounds().getHeight();
+//        stage.setX(0.0); //to avoid centerOnScreen() calculations
+//        stage.setY(0.0);
+//        stage.setWidth(SCREEN_WIDTH);
+//        stage.setHeight(SCREEN_HEIGHT);
+//        Screen.getScreens().addListener(new ListChangeListener(){
+//            @Override public void onChanged(ListChangeListener.Change change) {
+//                if(Screen.getScreens().size() > 0) {
+//                    switch(Screen.getPrimary().getOrientation()) {
+//                        case Screen.OrientationPortraitUpsideDown:
+//                        case Screen.OrientationPortrait:
+//                            stage.setWidth(SCREEN_WIDTH);
+//                            stage.setHeight(SCREEN_HEIGHT);
+//                            break;
+//                        case Screen.OrientationLandscapeLeft:
+//                        case Screen.OrientationLandscapeRight:
+//                            stage.setWidth(SCREEN_HEIGHT);
+////                                stage.setHeight(SCREEN_WIDTH);
+//                            break;
+//                    }
+//                    switch(Screen.getPrimary().getOrientation()) {
+//                        case Screen.OrientationPortraitUpsideDown:
+//                            javafx.ext.ios.IOSApplication.setStatusBarOrientationAnimated(javafx.ext.ios.StatusBarOrientation.PORTRAIT_UPSIDE_DOWN, false);
+//                            break;
+//                        case Screen.OrientationPortrait:
+//                            javafx.ext.ios.IOSApplication.setStatusBarOrientationAnimated(javafx.ext.ios.StatusBarOrientation.PORTRAIT, false);
+//                            break;
+//                        case Screen.OrientationLandscapeLeft:
+//                            javafx.ext.ios.IOSApplication.setStatusBarOrientationAnimated(javafx.ext.ios.StatusBarOrientation.LANDSCAPE_RIGHT, false);
+//                            break;
+//                        case Screen.OrientationLandscapeRight:
+//                            javafx.ext.ios.IOSApplication.setStatusBarOrientationAnimated(javafx.ext.ios.StatusBarOrientation.LANDSCAPE_LEFT, false);
+//                            break;
+//                    }
+//                }
+//            }
+//        });
+//    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/EnsembleStylesCaspian.css	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+.ensmeble-tool-bar {
+    -fx-padding: 6 5 7 5;
+    -fx-background-color: linear-gradient(
+        to bottom,
+        derive(-fx-color,34%) 0%,
+        derive(-fx-color,-18%) 98%,
+        derive(-fx-color,-60%) 100%
+    );
+    -fx-base: #58636a;
+    -fx-background: #58636a;
+    -fx-shadow-highlight-color: rgba(255,255,255,0.2);
+    -fx-outer-border: linear-gradient(
+        to bottom,
+        derive(-fx-color,-9%) 0%, 
+        derive(-fx-color,-45%) 100%
+    );
+}
+.ensmeble-tool-bar .title {
+    -fx-font-family: "Arial";
+    -fx-font-weight: bold;
+    -fx-font-size: 20;
+    -fx-text-fill: white;
+    -fx-effect: dropshadow( three-pass-box , #3d4346 , 0 , 0 , 0 , -1 );
+}
+.ensmeble-tool-bar #back{
+    -fx-background-radius: 5 0 0 5, 5 0 0 5, 4 0 0 4, 3 0 0 3;
+    -fx-content-display: graphic-only;
+}
+.ensmeble-tool-bar #back:focused {
+    -fx-background-radius: 6.4 0 0 6.4, 5 0 0 5, 4 0 0 4, 3 0 0 3;
+    -fx-background-insets: -1.4 0 -1.4 -1.4, 0 1 0 0, 1, 2;
+}
+.ensmeble-tool-bar #forward {
+    -fx-background-insets: 0 0 -1 0, 0, 1 1 1 0, 2 2 2 1;
+    -fx-background-radius: 0;
+}
+.ensmeble-tool-bar #forward:focused {
+    -fx-background-insets: 0 0 -1 0, 0, 1 1 1 0, 2 2 2 1;
+    -fx-background-radius: 0;
+    -fx-background-insets: -1.4 0 -1.4 0, 0 1 0 1, 1 1 1 1, 2 2 2 2;
+}
+.ensmeble-tool-bar #home {
+    -fx-background-insets: 0 0 -1 0, 0, 1 1 1 0, 2 2 2 1;
+    -fx-background-radius: 0 5 5 0, 0 5 5 0, 0 4 4 0, 0 3 3 0;
+}
+.ensmeble-tool-bar #home:focused {
+    -fx-background-insets: -1.4 -1.4 -1.4 0, 0 1 0 1, 1 1 1 1, 2 2 2 1;
+    -fx-background-radius: 0 6.4 6.4 0, 0 5 5 0, 0 4 4 0, 0 3 3 0;
+}
+.ensmeble-tool-bar .button Region, .ensmeble-tool-bar .toggle-button Region {
+    -fx-background-color: white;
+    -fx-scale-shape: false;
+    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.8) , 0 , 0 , 0 , -1 );
+}
+.ensmeble-tool-bar #back Region{
+    -fx-shape: "M0,7L11,0L11,14Z";
+}
+.ensmeble-tool-bar #forward Region{
+    -fx-shape: "M0,0L11,7L0,14Z";
+}
+.ensmeble-tool-bar #home Region{
+    -fx-shape: "M1,8.239V14h3.5V7.5h4V14H12V8.239L6.5,3L1,8.239z M11,4.5V1H9.1L9.062,2.448L6.5,0L0,6.5v0.7h0.5l6-5.826l6,5.826H13V6.5L11,4.5z";
+}
+.ensmeble-tool-bar #list Region{
+    -fx-shape: "M1,2h14c0.553,0,1-0.448,1-1s-0.447-1-1-1H1C0.448,0,0,0.448,0,1S0.448,2,1,2zM15,5.875H1c-0.552,0-1,0.448-1,1c0,0.553,0.448,1,1,1h14c0.553,0,1-0.447,1-1C16,6.323,15.553,5.875,15,5.875z M15,11.75H1c-0.552,0-1,0.447-1,1s0.448,1,1,1h14c0.553,0,1-0.447,1-1S15.553,11.75,15,11.75z";
+}
+.ensmeble-tool-bar #search{
+    -fx-padding: 3 10 3 15 !important;
+}
+.ensmeble-tool-bar #search Region{
+    -fx-shape: "M13.814,13.386l-3.396-3.398c0.953-1.059,1.533-2.462,1.533-4c0-3.305-2.678-5.982-5.981-5.982c-3.304,0-5.982,2.678-5.982,5.982S2.666,11.97,5.97,11.97c1.052,0,2.042-0.271,2.899-0.748l3.555,3.555L13.814,13.386zM1.975,5.988c0-2.207,1.789-3.995,3.995-3.995c2.206,0,3.995,1.788,3.995,3.995c0,2.205-1.789,3.996-3.995,3.996C3.764,9.984,1.975,8.193,1.975,5.988z";
+}
+/* style Sample Buttons on the home page */
+.sample-button:hover {
+    -fx-effect: dropshadow( three-pass-box , rgba(255,255,255,0.8) , 10, 0.5 , 0 , 0);
+}
+.sample-button:focused {
+    -fx-effect: dropshadow( three-pass-box , -fx-focus-color , 3, 0.5 , 0 , 0);
+}
+.search-box {
+    -fx-background-color: rgba(255,255,255,0.3) , #41494e;
+    -fx-background-insets: 1 0 -1 0,0;
+    -fx-background-radius: 18;
+    -fx-padding: 0 0 0 30;
+}
+.search-box:focused {
+    -fx-background-color: -fx-focus-color;
+    -fx-background-insets: -0.4px;
+}
+.search-box-icon {
+    /* THIN -fx-shape: "M14,13.587l-3.45-3.45c0.968-1.076,1.558-2.5,1.558-4.062C12.107,2.72,9.388,0,6.032,0C2.676,0-0.043,2.72-0.043,6.075s2.72,6.075,6.075,6.075c1.069,0,2.074-0.276,2.946-0.761l3.61,3.609L14,13.587z M1.975,6.075c0-2.24,1.816-4.057,4.057-4.057c2.241,0,4.057,1.817,4.057,4.057c0,2.241-1.816,4.058-4.057,4.058C3.791,10.133,1.975,8.316,1.975,6.075z";*/
+    /* TOO BOLD -fx-shape: "M10.871,9.796c0.826-1.062,1.275-2.368,1.275-3.723C12.146,2.724,9.422,0,6.073,0C2.725,0,0,2.724,0,6.073c0,3.349,2.725,6.072,6.073,6.072c0.913,0,1.816-0.206,2.633-0.599l3.422,3.421l1.957-1.957L10.871,9.796z M6.073,2.788c1.812,0,3.286,1.474,3.286,3.285S7.884,9.358,6.073,9.358S2.788,7.885,2.788,6.073S4.261,2.788,6.073,2.788z";*/
+    -fx-shape: "M10.728,9.893c0.889-1.081,1.375-2.435,1.375-3.842C12.103,2.714,9.388,0,6.051,0C2.715,0,0,2.714,0,6.051c0,3.338,2.715,6.052,6.051,6.052c0.954,0,1.898-0.227,2.744-0.656l3.479,3.478l1.743-1.742L10.728,9.893z M6.051,2.484c1.966,0,3.566,1.602,3.566,3.566c0,1.968-1.6,3.567-3.566,3.567c-1.967,0-3.566-1.6-3.566-3.567C2.485,4.086,4.084,2.484,6.051,2.484z";
+    -fx-scale-shape: false;
+    -fx-background-color: #aaaaaa;
+}
+.search-box-inner {
+    -fx-background-color: white;
+    -fx-background-insets: 1;
+    -fx-background-radius: 17;
+    -fx-effect: innershadow( three-pass-box , rgba(0,0,0,0.7) , 7, 0 , 0 , 1 );
+}
+
+/* *****************************************************************************
+   * POPOVERS
+   ****************************************************************************/
+.popover .button {
+    -fx-base: #58636a;
+    -fx-background: #58636a;
+    -fx-shadow-highlight-color: rgba(255,255,255,0.2);
+    -fx-outer-border: linear-gradient(
+        to bottom,
+        derive(-fx-color,-30%) 0%, 
+        derive(-fx-color,-50%) 100%
+    );
+    -fx-padding: 5 10 5 10;
+    -fx-font-weight: bold;
+    -fx-text-fill: white;
+}
+.popover-tree-list-cell {
+    -fx-background-color: white;
+    -fx-border-color: transparent transparent #dfdfdf transparent;
+    -fx-padding: 0 30 0 12;
+    -fx-font-family: "Arial";
+    -fx-font-size: 15px;
+    -fx-font-weight: bold;
+    -fx-text-fill: #363636;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/EnsembleStylesCommon.css	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,388 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
+/* *****************************************************************************
+   * CUSTOM SCROLLBARS
+   ****************************************************************************/
+/* popover scroll bars */
+.popover .scroll-bar:horizontal {
+    -fx-background-color: white;
+    -fx-padding: 4px 2px 6px 2px;
+}
+.popover .scroll-bar:vertical {
+    -fx-background-color: white;
+    -fx-padding: 2px 6px 2px 4px;
+}
+.popover .scroll-bar > .thumb {
+    -fx-background-color: #777, #f9f9f9;
+    -fx-background-insets: -1, 0;
+    -fx-opacity: 0.8;
+}
+.popover .scroll-bar > .thumb:hover {
+    -fx-opacity: 1;
+}
+.popover .scroll-bar > .track {
+    -fx-background-color: #eee;
+    -fx-effect: innershadow( three-pass-box , rgba(0,0,0,0.2) , 8, 0.5 , 0 , 0 );
+}
+.popover .scroll-bar:horizontal > .increment-button, 
+.popover .scroll-bar:horizontal > .decrement-button {
+    -fx-background-color: null;
+    -fx-padding: 2px 0 2px 0;
+}
+.popover .scroll-bar:vertical > .increment-button, 
+.popover .scroll-bar:vertical > .decrement-button {
+    -fx-background-color: null;
+    -fx-padding: 0 2px 0 2px;
+}
+.popover .scroll-bar > .decrement-button > .decrement-arrow, 
+.popover .scroll-bar > .increment-button > .increment-arrow,
+.popover .scroll-bar > .track-background{
+    -fx-background-color: null;
+    -fx-shape: null;
+}
+/* homepage scroll bars */
+#HomePage .scroll-bar:horizontal {
+    -fx-background-color: null;
+    -fx-padding: 6px 2px 6px 2px;
+    -fx-effect: dropshadow( three-pass-box , rgba(255,255,255,0.15) , 0, 0.5 , 0 , 1 );
+}
+#HomePage .scroll-bar:vertical {
+    -fx-background-color: null;
+    -fx-padding: 2px 6px 2px 6px;
+    -fx-effect: dropshadow( three-pass-box , rgba(255,255,255,0.15) , 0, 0.5 , 1 , 0 );
+}
+#HomePage .scroll-bar > .thumb {
+    -fx-background-color: #333, #f9f9f9;
+    -fx-background-insets: -1, 0;
+    -fx-opacity: 0.8;
+}
+#HomePage .scroll-bar > .thumb:hover {
+    -fx-opacity: 1;
+}
+#HomePage .scroll-bar > .track {
+    -fx-background-color: #38434b;
+    -fx-effect: innershadow( three-pass-box , rgba(0,0,0,0.5) , 8, 0.5 , 0 , 0 );
+}
+#HomePage .scroll-bar:horizontal > .increment-button, 
+#HomePage .scroll-bar:horizontal > .decrement-button {
+    -fx-background-color: null;
+    -fx-padding: 2px 0 2px 0;
+}
+#HomePage .scroll-bar:vertical > .increment-button, 
+#HomePage .scroll-bar:vertical > .decrement-button {
+    -fx-background-color: null;
+    -fx-padding: 0 2px 0 2px;
+}
+#HomePage .scroll-bar > .decrement-button > .decrement-arrow, 
+#HomePage .scroll-bar > .increment-button > .increment-arrow,
+#HomePage .scroll-bar > .track-background{
+    -fx-background-color: null;
+    -fx-shape: null;
+}
+/* source code scroll bars */
+.sample-back-page .scroll-bar:horizontal {
+    -fx-background-color: white;
+    -fx-padding: 4px 2px 6px 2px;
+}
+.sample-back-page .scroll-bar:vertical {
+    -fx-background-color: white;
+    -fx-padding: 2px 6px 2px 4px;
+}
+.sample-back-page .scroll-bar > .thumb {
+    -fx-background-color: #777, #f9f9f9;
+    -fx-background-insets: -1, 0;
+    -fx-opacity: 0.8;
+}
+.sample-back-page .scroll-bar > .thumb:hover {
+    -fx-opacity: 1;
+}
+.sample-back-page .scroll-bar > .track {
+    -fx-background-color: #eee;
+    -fx-effect: innershadow( three-pass-box , rgba(0,0,0,0.2) , 8, 0.5 , 0 , 0 );
+}
+.sample-back-page .scroll-bar:horizontal > .increment-button, 
+.sample-back-page .scroll-bar:horizontal > .decrement-button {
+    -fx-background-color: null;
+    -fx-padding: 2px 0 2px 0;
+}
+.sample-back-page .scroll-bar:vertical > .increment-button, 
+.sample-back-page .scroll-bar:vertical > .decrement-button {
+    -fx-background-color: null;
+    -fx-padding: 0 2px 0 2px;
+}
+.sample-back-page .scroll-bar > .decrement-button > .decrement-arrow, 
+.sample-back-page .scroll-bar > .increment-button > .increment-arrow,
+.sample-back-page .scroll-bar > .track-background{
+    -fx-background-color: null;
+    -fx-shape: null;
+}
+
+/* *****************************************************************************
+   * HOME PAGE
+   ****************************************************************************/
+#HomePage {
+    /*-fx-background-size: cover;*/
+    -fx-background-size: 100% 100%;
+    -fx-background-image: url("images/home-background.png");
+}
+.home-page-cell {
+    -fx-padding: 10 0 10 0;
+}
+#HomePage .pagination {
+    -fx-arrows-visible: false;
+    -fx-page-information-visible: false;
+}
+#HomePage .pagination > .pagination-control > .control-box > .bullet-button {   
+    -fx-background-color: transparent;
+    -fx-background-image: url("images/pagination-dot.png");
+    -fx-background-repeat: no-repeat;
+    -fx-background-position: center;
+}
+
+#HomePage .pagination > .pagination-control > .control-box > .bullet-button:selected {   
+    -fx-background-image: url("images/pagination-dot-selected.png");
+}
+/* style Section Ribbons on the home page */
+.section-ribbon {
+    -fx-border-image-source: url("images/section-ribbon.png");
+    -fx-border-image-slice: 0 38 0 38 fill;
+    -fx-border-image-width: 0 38 0 38;
+    -fx-border-image-repeat: repeat-x;
+}
+/* style Sample Buttons on the home page */
+.sample-button {
+    -fx-font-family: "Arial";
+    -fx-font-weight: bold;
+    -fx-font-size: 15;
+    -fx-text-fill: white;
+    -fx-graphic-text-gap: 8px;
+}
+.sample-button > .text{
+    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.8) , 3, 0.5 , 0 , 1 );
+}
+.sample-large-preview {
+    -fx-border-image-source: url("images/tile-border.png");
+    -fx-border-image-slice: 7 9 10 7;
+    -fx-border-image-width: 7 9 10 7;
+    -fx-border-image-insets: -2 -4 -5 -2;
+    -fx-border-image-repeat: stretch;
+    -fx-padding: 5px;
+}
+.sample-large-preview-label {
+    -fx-font-weight: bold;
+    -fx-font-size: 17;
+    -fx-text-fill: #555;
+    -fx-effect: dropshadow( one-pass-box , white , 0, 0 , 0 , 1 );
+}
+.sample-medium-preview {
+    -fx-border-image-source: url("images/tile-border.png");
+    -fx-border-image-slice: 7 9 10 7;
+    -fx-border-image-width: 7 9 10 7;
+    -fx-border-image-insets: -2 -4 -5 -2;
+    -fx-border-image-repeat: stretch;
+}
+.search-box {
+    -fx-font-family: "Arial";
+    -fx-font-size: 16px;
+    -fx-text-fill: #363636;
+}
+.search-clear-button {
+    -fx-shape: "M9.521,0.083c-5.212,0-9.438,4.244-9.438,9.479c0,5.234,4.225,9.479,9.438,9.479c5.212,0,9.437-4.244,9.437-9.479C18.958,4.327,14.733,0.083,9.521,0.083z M13.91,13.981c-0.367,0.369-0.963,0.369-1.329,0l-3.019-3.03l-3.019,3.03c-0.367,0.369-0.962,0.369-1.329,0c-0.367-0.368-0.366-0.965,0.001-1.334l3.018-3.031L5.216,6.585C4.849,6.217,4.849,5.618,5.217,5.25c0.366-0.369,0.961-0.368,1.328,0l3.018,3.031l3.019-3.031c0.366-0.368,0.961-0.369,1.328,0c0.366,0.368,0.366,0.967,0,1.335l-3.019,3.031l3.02,3.031C14.276,13.017,14.276,13.613,13.91,13.981z";
+    -fx-scale-shape: false;
+    -fx-background-color: #aaaaaa;
+    -fx-padding: 9.5px;
+}
+
+/* *****************************************************************************
+   * DOCS PAGE
+   ****************************************************************************/
+.sidebar-title {
+    -fx-font-family: "Arial";
+    -fx-font-weight: bold;
+    -fx-font-size: 17;
+    -fx-text-fill: white;
+    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.8) , 3, 0.5 , 0 , 1 );
+}
+
+/* *****************************************************************************
+   * SAMPLE PAGE
+   ****************************************************************************/
+/*.sample-page {
+    -fx-background-color: #eeeeee;
+    -fx-background-image: url("images/home-background.png");
+}*/
+.sample-page-iphone {
+    -fx-background-color: #eeeeee;
+    -fx-background-image: url("images/sample-background.png");
+    -fx-background-size: stretch;
+}
+.sample-page-front {
+    -fx-background-image: url("images/sample-page-background.png");
+    -fx-border-image-source: url("images/sample-page-background-shadow.png");
+    -fx-border-image-slice: 160;
+    -fx-border-image-width: 160;
+    -fx-border-image-repeat: stretch;
+}
+.sample-back-page {
+    -fx-background-image: url("images/sample-back-page-background.png"), url("images/sample-source-text.png");
+    -fx-background-position: left top, right bottom;
+    -fx-background-repeat: repeat, no-repeat;
+    -fx-border-image-source: url("images/sample-page-background-shadow.png");
+    -fx-border-image-slice: 160;
+    -fx-border-image-width: 160;
+    -fx-border-image-repeat: stretch;
+    -fx-base: #3d80ba;
+    -fx-shadow-highlight-color: rgba(255,255,255,0.1);
+    -fx-text-background-color: white;
+}
+.sample-back-page .tab:selected > .tab-container > .tab-label {
+    -fx-text-fill: #395d74 !important;
+}
+.sample-page-box {
+/*    -fx-border-image-source: url("images/sample-box.png");
+    -fx-border-image-slice: 7 7 9 7 fill;
+    -fx-border-image-width: 7 7 9 7;
+    -fx-border-image-insets: -1 -2 -3 -2;
+    -fx-border-image-repeat: stretch;*/
+    -fx-border-image-source: url("images/sample-paper-border.png");
+    -fx-border-image-slice: 6;
+    -fx-border-image-width: 6;
+    -fx-border-image-insets: -2 -5 -5 -2;
+    -fx-border-image-repeat: stretch;
+    -fx-padding: 5 10 5 33;
+    
+    -fx-background-image: url("images/sample-paper.png") , url("images/sample-paper-lines.png");
+    
+    -fx-font-family: "Arial";
+    -fx-font-size: 12px;
+    -fx-font-weight: bold;
+    -fx-text-background-color: #395d74;
+}
+.sample-page-box .hyperlink{
+    -fx-font-size: 12px;
+    -fx-text-overrun: leading-word-ellipsis;
+}
+.sample-page-box-title {
+    -fx-font-family: "Bree Serif";
+    -fx-font-size: 16;
+    -fx-text-fill: #e1731c;
+}
+
+/* *****************************************************************************
+   * POPOVERS
+   ****************************************************************************/
+.popover {
+    -fx-padding: 44 7 7 7; 
+}
+.popover-frame {
+    -fx-border-image-source: url("images/popover-empty.png");
+    -fx-border-image-slice: 78 50 60 120 fill;
+    -fx-border-image-width: 78 50 60 120;
+    -fx-border-image-insets: -32 -37 -47 -37;
+}
+.popover.right-tooth .popover-frame {
+    -fx-border-image-slice: 78 120 60 50 fill;
+    -fx-border-image-width: 78 120 60 50;
+}
+.popover-title {
+    -fx-font-family: "Arial";
+    -fx-font-size: 20px;
+    -fx-text-fill: white;
+    -fx-font-weight: bold;
+}
+.popover-tree-list-cell {
+    -fx-background-color: white;
+    -fx-border-color: transparent transparent #dfdfdf transparent;
+    -fx-padding: 0 30 0 12;
+    -fx-font-family: "Arial";
+    -fx-font-size: 15px;
+    -fx-font-weight: bold;
+    -fx-text-fill: #363636;
+}
+.search-result-cell {
+    -fx-background-color: white;
+    -fx-padding: 4 30 4 45;
+}
+.search-result-cell:selected {
+    -fx-background-color: white, #eeeeee;
+    -fx-background-insets: 0, 0 0 0 40;
+}
+.search-result-cell .title {
+    -fx-font-family: "Arial";
+    -fx-font-size: 15px;
+    -fx-font-weight: bold;
+    -fx-text-fill: #363636;
+}
+.search-result-cell .details {
+    -fx-font-family: "Arial";
+    -fx-font-size: 13px;
+    -fx-text-fill: #444444;
+}
+.search-icon-pane .label {
+    -fx-font-family: "Arial";
+    -fx-font-size: 16px;
+    -fx-font-weight: bold;
+    -fx-background-color: #515151;
+    -fx-background-radius: 3px;
+    -fx-text-fill: white;
+    -fx-alignment: center;
+}
+.sample-tree-list-cell {
+    -fx-background-color: white;
+    -fx-border-color: transparent transparent #dfdfdf transparent;
+    -fx-padding: 0 30 0 20;
+    -fx-font-family: "Arial";
+    -fx-font-size: 15px;
+    -fx-font-weight: bold;
+    -fx-text-fill: #363636;
+    -fx-graphic-text-gap: 20px;
+}
+
+/* *****************************************************************************
+   * 24px ICONS
+   ****************************************************************************/
+.samples-icon {
+    -fx-shape: "M12,0C5.373,0,0,5.373,0,12s5.373,12,12,12c6.627,0,12-5.373,12-12S18.627,0,12,0z M7.5,18V6l12.006,6L7.5,18z";
+    -fx-scale-shape: false;
+    -fx-background-color: #515151;
+}
+.documentation-icon {
+    -fx-shape: "M12,3c0,0-3-3-12-3v18c9.094,0,12,3,12,3s2.906-3,12-3V0C15,0,12,3,12,3z M3,3c3.813,0.319,6.152,1.201,7.5,1.916v12.082c-1.348-0.712-3.687-1.594-7.5-1.916V3z M21,15.082c-3.814,0.322-6.154,1.203-7.5,1.916V4.916C14.846,4.201,17.186,3.319,21,3V15.082z";
+    -fx-scale-shape: false;
+    -fx-background-color: #515151;
+}
+.folder-icon {
+    -fx-shape: "M4.141,4.039h15.82c0,0-0.268-2.004-0.936-2.004S9.214,2.034,8.346,2.034C7.479,2.034,7.143,0,6.409,0C5.675,0,1.672,0.001,0.805,0.001c-0.868,0-0.801,0.867-0.801,0.867s0,11.513,0,11.779S4.141,4.039,4.141,4.039z M5.28,5L0.07,16.009l19.756,0.033L23.996,5H5.28z";
+    -fx-scale-shape: false;
+    -fx-background-color: #515151;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/EnsembleStylesHelvetica.css	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2012, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.ensmeble-tool-bar .title {
+    -fx-font-family: "Helvetica";
+}
+.sample-button {
+    -fx-font-family: "Helvetica";
+}
+.sidebar-title {
+    -fx-font-family: "Helvetica";
+}
+.sample-page-box {
+    -fx-font-family: "Helvetica";
+}
+.popover-title {
+    -fx-font-family: "Helvetica";
+}
+.popover-tree-list-cell {
+    -fx-font-family: "Helvetica";
+}
+.popover-left-button {
+    -fx-font-family: "Helvetica";
+}
+.popover-right-button {
+    -fx-font-family: "Helvetica";
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/EnsembleStylesIOS.css	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2012, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+.ensmeble-tool-bar {
+    -fx-padding: 7 5 7 5;
+    -fx-background-image: url("images-ios/toolbar.png");
+    -fx-background-size: cover;
+    -fx-base: #58636a;
+    -fx-background: #58636a;
+    -fx-shadow-highlight-color: rgba(255,255,255,0.2);
+    -fx-outer-border: linear-gradient(
+        to bottom,
+        derive(-fx-color,-9%) 0%, 
+        derive(-fx-color,-45%) 100%
+    );
+}
+.ensmeble-tool-bar .title {
+    -fx-font-family: "Helvetica";
+    -fx-font-weight: bold;
+    -fx-font-size: 20;
+    -fx-text-fill: white;
+    -fx-padding: 3 0 0 0;
+    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.8) , 0 , 0 , 0 , -1 );
+}
+.ensmeble-tool-bar .button, .ensmeble-tool-bar .toggle-button {
+    -fx-background-size: cover;
+    -fx-background-color: null;
+}
+.ensmeble-tool-bar #back {
+    -fx-background-image: url("images-ios/back-btn.png");
+}
+.ensmeble-tool-bar #forward {
+    -fx-background-image: url("images-ios/forward-btn.png");
+}
+.ensmeble-tool-bar #home {
+    -fx-background-image: url("images-ios/home-btn.png");
+}
+.ensmeble-tool-bar #list {
+    -fx-background-image: url("images-ios/list-btn.png");
+}
+.ensmeble-tool-bar #search {
+    -fx-background-image: url("images-ios/search-btn.png");
+}
+/* ****** SCROLL BARS ******************************************************************************* */
+.scroll-bar, .scroll-bar:focused {
+    -fx-background-color: transparent;
+    -fx-background-insets: 0;
+    -fx-padding: 0 0 0 0;
+}
+.scroll-bar .thumb {
+    -fx-padding: 2;
+    -fx-background-color: rgba(0,0,0,0.3);
+    -fx-background-insets: 0;
+    -fx-background-radius: 10;
+}
+.scroll-bar .track, .scroll-bar:focused .track  {
+    -fx-background-color: null;
+    -fx-background-insets:  0;
+    -fx-background-radius: 0;
+}
+.scroll-bar .increment-button {
+    -fx-background-color: null;
+}
+.scroll-bar:horizontal .increment-button {
+    -fx-padding: -4 0 0 0;
+}
+.scroll-bar:vertical .increment-button {
+    -fx-padding: 0 0 0 -4;
+}
+.scroll-bar .decrement-button, .scroll-bar .increment-arrow, .scroll-bar .decrement-arrow {
+    -fx-background-color: null;
+    -fx-padding: 0;
+}
+.search-box {
+    -fx-border-image-source: url("images-ios/search.png");
+    -fx-border-image-slice: 0 15 0 30 fill;
+    -fx-border-image-width: 0 15 0 30;
+    -fx-padding: 0 50 0 0; 
+    -fx-prompt-text-fill: #b4b3b4;
+    -fx-text-fill: black;
+    -fx-cursor: text;
+    -fx-border-color: null;
+}
+
+/* *****************************************************************************
+   * POPOVERS
+   ****************************************************************************/
+.popover-frame {
+    -fx-border-image-source: url("images-ios/popover-empty.png");
+}
+.popover .button {
+    -fx-background-color: null;
+    -fx-padding: 5 10 5 10;
+    -fx-border-image-slice: 0 5 0 5 fill;
+    -fx-border-image-width: 0 5 0 5;
+    -fx-font-weight: bold;
+    -fx-text-fill: white;
+}   
+.popover-left-button {
+    -fx-border-image-source: url("images-ios/popover-blue-btn.png");
+}
+.popover-left-button .text {
+    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.9) , 0, 0.0 , 0 , -1 );
+}
+.popover-right-button {
+    -fx-border-image-source: url("images-ios/popover-light-blue-btn.png");
+}
+.popover-right-button .text {
+    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.9) , 0, 0.0 , 0 , -1 );
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/HomePage.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,376 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package ensemble;
+
+import ensemble.generated.Samples;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import javafx.beans.property.ReadOnlyStringProperty;
+import javafx.beans.property.ReadOnlyStringWrapper;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.geometry.Pos;
+import javafx.scene.Node;
+import javafx.scene.control.*;
+import javafx.scene.effect.*;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.Region;
+import javafx.scene.paint.Color;
+import javafx.scene.text.Text;
+import javafx.util.Callback;
+
+/**
+ * The home page for ensemble.
+ */
+public class HomePage extends ListView<HomePage.HomePageRow> implements Callback<ListView<HomePage.HomePageRow>, ListCell<HomePage.HomePageRow>>, ChangeListener<Number>, Page{
+    private static final Effect RIBBON_EFFECT = BlendBuilder.create()
+            .topInput(
+                    InnerShadowBuilder.create()
+                            .color(Color.rgb(0, 0, 0, 0.75))
+                            .offsetX(1)
+                            .offsetY(1)
+                            .radius(1)
+                            .blurType(BlurType.ONE_PASS_BOX)
+                            .build())
+            .bottomInput(
+                    DropShadowBuilder.create()
+                            .color(Color.rgb(255, 255, 255, 0.33))
+                            .offsetX(1)
+                            .offsetY(1)
+                            .radius(0)
+                            .blurType(BlurType.ONE_PASS_BOX)
+                            .build())
+            .build();
+    private static final int ITEM_WIDTH = 216;
+    private static final int ITEM_HEIGHT = 162;
+    private static final int ITEM_GAP = 32;
+    private static final int MIN_MARGIN = 20;
+    private static enum RowType{Highlights,Title,Samples};
+    private int numberOfColumns = -1;
+    private final HomePageRow HIGHLIGHTS_ROW = new HomePageRow(RowType.Highlights,null,null);
+    private final PageBrowser pageBrowser;
+    private final ReadOnlyStringProperty titleProperty = new ReadOnlyStringWrapper("JavaFX Ensemble");
+
+    public HomePage(PageBrowser pageBrowser) {
+        this.pageBrowser = pageBrowser;
+        getStyleClass().clear();
+        setId("HomePage");
+        // don't use any of the standard ListView CSS
+        //   getStyleClass().clear();
+       
+        // listen for when the list views width changes and recalculate number of columns
+        widthProperty().addListener(this);
+        // set our custom cell factory
+        setCellFactory(this);
+    }
+
+    @Override public ReadOnlyStringProperty titleProperty() {
+        return titleProperty;
+    }
+
+    @Override public String getTitle() {
+        return titleProperty.get();
+    }
+
+    @Override public String getUrl() {
+        return PageBrowser.HOME_URL;
+    }
+
+    @Override public Node getNode() {
+        return this;
+    }
+
+    /* Called when the ListView's width changes */
+    @Override public void changed(ObservableValue<? extends Number> observableValue, Number number, Number newWidth) {
+        // calculate new number of columns that will fit
+        double width = newWidth.doubleValue();
+        width -= MIN_MARGIN + MIN_MARGIN;
+        width += ITEM_GAP;
+        final int newNumOfColumns = Math.max(1, (int) (width / (ITEM_WIDTH + ITEM_GAP)));
+        // our size may have changed, so see if we need to rebuild items list
+        if (numberOfColumns != newNumOfColumns) {
+            numberOfColumns = newNumOfColumns;
+            rebuild();
+        }
+    }
+
+    @Override public ListCell<HomePageRow> call(ListView<HomePageRow> homePageRowListView) {
+        return new HomeListCell();
+    }
+    
+    // Called to rebuild the list's items based on the current number of columns
+    private void rebuild() {
+        // build new list of titles and samples
+        List<HomePageRow> newItems = new ArrayList<>();
+        // add any samples directly in root category
+        addSampleRows(newItems,Samples.ROOT.samples);
+        // add samples for all sub categories
+        for(SampleCategory category: Samples.ROOT.subCategories) {
+            // add title row
+            newItems.add(new HomePageRow(RowType.Title,category.name,null));
+            // add samples
+            addSampleRows(newItems,category.samplesAll);
+        }
+        // debug extra data
+        /*for (int a=0;a<30;a++) {
+            newItems.add(new HomePageRow(RowType.Title,"Category "+a,null));
+            for (int b=0;b<(1+(10*Math.random()));b++) {
+                SampleInfo[] samples = new SampleInfo[numberOfColumns];
+                for(int c=0;c<numberOfColumns;c++) {
+                    samples[c] = Samples.HIGHLIGHTS[0];
+                }
+                newItems.add(new HomePageRow(RowType.Samples,null,samples));
+            }
+        }*/
+        // add Highlights to top
+        if (getItems().isEmpty()) {
+            getItems().add(HIGHLIGHTS_ROW);
+        } else {
+            getItems().retainAll(HIGHLIGHTS_ROW);
+        }
+        // replace the lists items
+        getItems().addAll(newItems);
+    }
+
+    /**
+     * Add samples rows to the items list for all SampleInfo's in samples array
+     *
+     * @param items The list of rows to add too
+     * @param samples The SampleInfo's to create rows for
+     */
+    private void addSampleRows(List<HomePageRow> items, SampleInfo[] samples) {
+        if(samples == null) return;
+        for(int row=0; row <= (samples.length/numberOfColumns); row++) {
+            int sampleIndex = row*numberOfColumns;
+            SampleInfo[] sampleInfos = Arrays.copyOfRange(samples,sampleIndex, Math.min(sampleIndex+numberOfColumns,samples.length));
+            items.add(new HomePageRow(RowType.Samples, null, sampleInfos));
+        }
+    }
+
+    private static int cellCount = 0;
+    private class HomeListCell extends ListCell<HomePageRow> implements Callback<Integer,Node>,  Skin<HomeListCell> {
+        int cellIndex;
+        private RowType oldRowType = null;
+        private HBox box = new HBox(ITEM_GAP);
+        private HomeListCell() {
+            super();
+            getStyleClass().clear();
+            cellIndex = cellCount++;
+//            System.out.println("CREATED CELL " + (cellIndex));
+            box.getStyleClass().add("home-page-cell");
+            // we don't need any of the labeled functionality of the default cell skin, so we replace skin with our own
+            // in this case using this same class as it saves memory. This skin is very simple its just a HBox container
+            setSkin(this);
+        }
+
+        // CELL METHODS
+        @Override protected void updateItem(HomePageRow item, boolean empty) {
+            super.updateItem(item,empty);
+//            System.out.println("updating cell ["+cellIndex+"] to type "+(item==null?"null":item.rowType)+"  from "+oldRowType);
+            if (item == null) {
+                oldRowType = null;
+                box.getChildren().clear();
+            } else {
+                switch(item.rowType) {
+                    case Highlights:
+                        Pagination pagination = new Pagination(Samples.HIGHLIGHTS.length);
+                        pagination.getStyleClass().add(Pagination.STYLE_CLASS_BULLET);
+                        pagination.setMaxWidth(USE_PREF_SIZE);
+                        pagination.setPageFactory(this);
+//                        setGraphic(pagination);
+                        box.setAlignment(Pos.CENTER);
+                        ImageView highlightRibbon = new ImageView(new Image(getClass().getResource("images/highlights-ribbon.png").toExternalForm()));
+                        highlightRibbon.setManaged(false);
+                        highlightRibbon.layoutXProperty().bind(pagination.layoutXProperty().subtract(4));
+                        highlightRibbon.layoutYProperty().bind(pagination.layoutYProperty().subtract(4));
+                        box.getChildren().setAll(pagination, highlightRibbon);
+                        
+//                        box.getChildren().setAll(Samples.HIGHLIGHTS[0].getLargePreview());
+                        break;
+                    case Title:
+                        if (oldRowType == RowType.Title) { // reuse if we can
+                            ((SectionRibbon)box.getChildren().get(0)).setText(item.title);
+                        } else {
+                            box.getChildren().setAll(new SectionRibbon(item.title));
+                            box.setAlignment(Pos.CENTER_LEFT);
+                        }
+                        break;
+                    case Samples:
+                        if (oldRowType != RowType.Samples) {
+                            box.setAlignment(Pos.CENTER);
+                            box.getChildren().clear();
+                        }
+                        for (int i = 0; i < item.samples.length; i++) {
+                            final SampleInfo sample = item.samples[i];
+                            Button sampleButton;
+                            if (i < box.getChildren().size()) { // reusing existing buttons
+                                sampleButton = (Button) box.getChildren().get(i);
+                            } else {
+                                sampleButton = new Button();
+                                sampleButton.setCache(true);
+                                sampleButton.getStyleClass().setAll("sample-button");
+                                sampleButton.setContentDisplay(ContentDisplay.TOP);
+                                box.getChildren().add(sampleButton);
+                            }
+                            sampleButton.setText(sample.name);
+                            sampleButton.setGraphic(sample.getMediumPreview());
+                            sampleButton.setOnAction(new EventHandler<ActionEvent>() {
+                                
+                                @Override public void handle(ActionEvent actionEvent) {
+                                    pageBrowser.goToSample(sample);
+                                }
+                            });
+                        }
+                        break;
+                }
+                oldRowType = item.rowType;
+            }
+        }
+
+        // SKIN METHODS
+        @Override public HomeListCell getSkinnable() { return this; }
+        @Override public Node getNode() { return box; }
+        @Override public void dispose() {}
+        // CALLBACK METHODS
+        @Override public Node call(final Integer highlightIndex) {
+            Button sampleButton = new Button();
+            sampleButton.setCache(true);
+            sampleButton.getStyleClass().setAll("sample-button");
+            sampleButton.setGraphic(Samples.HIGHLIGHTS[highlightIndex].getLargePreview());
+            sampleButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
+            sampleButton.setOnAction(new EventHandler<ActionEvent>() {
+                @Override public void handle(ActionEvent actionEvent) {
+//                    System.out.println("Clicked " + Samples.HIGHLIGHTS[highlightIndex].name);
+                    pageBrowser.goToSample(Samples.HIGHLIGHTS[highlightIndex]);
+                }
+            });
+            return sampleButton;
+        }
+    }
+
+
+//    private class HomeListCell extends ListCell<HomePageRow> implements ChangeListener<HomePageRow>, Callback<Integer,Node> {
+//        private HomeListCell() {
+//            super();
+//            // don't use any of the standard CSS
+//            getStyleClass().setAll("home-page-cell");
+//            itemProperty().addListener(this);
+////            setSkin(new Label("DUDE"));
+//        }
+//
+//        @Override protected void updateItem(HomePageRow item, boolean empty) {
+//            super.updateItem(item, empty);
+//        }
+//
+//        @Override public void changed(ObservableValue<? extends HomePageRow> observableValue, HomePageRow oldRow, HomePageRow newRow) {
+//            setText(null);
+//            if (newRow == null) {
+//                setGraphic(null);
+//            } else {
+//                switch(newRow.rowType) {
+//                    case Highlights:
+////                        Pagination pagination = new Pagination(Samples.HIGHLIGHTS.length);
+////                        pagination.setMaxWidth(USE_PREF_SIZE);
+////                        pagination.setPageFactory(this);
+////                        setGraphic(pagination);
+//                        setGraphic(Samples.HIGHLIGHTS[0].getLargePreview());
+//                        setAlignment(Pos.CENTER);
+//                        break;
+//                    case Title:
+//                        SectionRibbon sectionRibbon = new SectionRibbon(newRow.title+"  public void changed(Obs");
+//                        setAlignment(Pos.CENTER_LEFT);
+//                        setGraphic(sectionRibbon);
+//                        break;
+//                    case Samples:
+//                        setAlignment(Pos.CENTER);
+//                        HBox hbox = new HBox(ITEM_GAP);
+//                        setGraphic(hbox);
+//                        hbox.setMaxWidth(USE_PREF_SIZE);
+//                        hbox.setAlignment(Pos.CENTER);
+//                        for (SampleInfo sample:newRow.samples) {
+//                            Label sampleLabel = new Label(sample.name);
+//                            sampleLabel.getStyleClass().add("sample-label");
+//                            sampleLabel.setGraphic(sample.getMediumPreview());
+//                            sampleLabel.setContentDisplay(ContentDisplay.TOP);
+//                            hbox.getChildren().add(sampleLabel);
+//                        }
+//                        break;
+//                }
+//            }
+//        }
+//
+//        @Override public Node call(Integer integer) {
+//            return Samples.HIGHLIGHTS[integer].getLargePreview();
+//        }
+//    }
+
+    public static class HomePageRow {
+        public final RowType rowType;
+        public final String title;
+        public final SampleInfo[] samples;
+
+        private HomePageRow(RowType rowType, String title, SampleInfo[] samples) {
+            this.rowType = rowType;
+            this.title = title;
+            this.samples = samples;
+        }
+    }
+
+    private static class SectionRibbon extends Region {
+        private Text textNode = new Text();
+        public SectionRibbon(String text) {
+            textNode.setText(text);
+            getStyleClass().add("section-ribbon");
+            textNode.setFill(Color.web("#0059a9"));
+            textNode.setStyle("-fx-font-family: 'Bree Serif'; -fx-font-size: 16");
+            setPrefHeight(38);
+            setMaxWidth(USE_PREF_SIZE);
+            textNode.setEffect(RIBBON_EFFECT);
+            setCache(true);
+            getChildren().add(textNode);
+        }
+
+        public void setText(String text) {
+            textNode.setText(text);
+        }
+
+        @Override protected void layoutChildren() {
+            textNode.relocate(30, snapPosition((getHeight() - textNode.getBoundsInParent().getHeight()) / 2) - 3);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/Page.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package ensemble;
+
+import javafx.beans.property.ReadOnlyStringProperty;
+import javafx.scene.Node;
+
+/**
+ * Interface for all pages
+ */
+public interface Page {
+    public ReadOnlyStringProperty titleProperty();    
+    public String getTitle();    
+    public String getUrl();    
+    public Node getNode();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/PageBrowser.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package ensemble;
+
+import ensemble.generated.Samples;
+import ensemble.samplepage.SamplePage;
+import java.util.LinkedList;
+import javafx.beans.property.BooleanProperty;
+import javafx.beans.property.ReadOnlyBooleanProperty;
+import javafx.beans.property.ReadOnlyStringProperty;
+import javafx.beans.property.SimpleBooleanProperty;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+import javafx.scene.Node;
+import javafx.scene.layout.Region;
+
+/**
+ * Sample page navigation with history.
+ * 
+ * Also knows how to create Ensemble pages.
+ */
+public class PageBrowser extends Region {
+    public static final String HOME_URL = "home";
+    private HomePage homePage;
+    private Page currentPage;
+    private String currentPageUrl;
+    private DocsPage docsPage;
+    private LinkedList<String> pastHistory = new LinkedList<>();
+    private LinkedList<String> futureHistory = new LinkedList<>();
+    private BooleanProperty forwardPossible = new SimpleBooleanProperty(false);
+    public ReadOnlyBooleanProperty forwardPossibleProperty() { return forwardPossible; }
+    public boolean isForwardPossible() { return forwardPossible.get(); }
+    private BooleanProperty backPossible = new SimpleBooleanProperty(false);
+    public ReadOnlyBooleanProperty backPossibleProperty() { return backPossible; }
+    public boolean isBackPossible() { return backPossible.get(); }
+    private BooleanProperty atHome = new SimpleBooleanProperty(false);
+    public ReadOnlyBooleanProperty atHomeProperty() { return atHome; }
+    public boolean isAtHome() { return atHome.get(); }
+    private StringProperty currentPageTitle = new SimpleStringProperty(null);
+    public ReadOnlyStringProperty currentPageTitleProperty() { return currentPageTitle; };
+    public String getCurrentPageTitle() { return currentPageTitle.get(); }
+    
+    public void forward() {
+        String newUrl = futureHistory.pop();
+        if (newUrl != null) {
+            pastHistory.push(getCurrentPageUrl());
+            goToPage(newUrl, null, false);
+        }
+    }
+    
+    public void backward() {
+        String newUrl = pastHistory.pop();
+        if (newUrl != null) {
+            futureHistory.push(getCurrentPageUrl());
+            goToPage(newUrl, null, false);
+        }
+    }
+    
+    public void goToSample(SampleInfo sample) {
+        goToPage("sample://"+sample.ensemblePath, sample, true);
+    }
+    
+    public void goToPage(String url) {
+        goToPage(url, null, true);
+    }
+    
+    public void goHome() {
+        goToPage(HOME_URL, null, true);
+    }
+    
+    /**
+     * This is called when a inner url has changed inside of a page and we want 
+     * to update the history.
+     * 
+     * @param newUrl The new url that the currentPage node is displaying
+     */
+    public void externalPageChange(String newUrl) {
+        if (currentPageUrl != null) {
+            pastHistory.push(getCurrentPageUrl());
+        }
+        futureHistory.clear();
+        currentPageUrl = newUrl;
+    }
+    
+    private void goToPage(String url, SampleInfo sample, boolean updateHistory) {
+        // update history
+        if (updateHistory) {
+            if (currentPageUrl != null) {
+                pastHistory.push(getCurrentPageUrl());
+            }
+            futureHistory.clear();
+        }
+        currentPageUrl = url;
+        // remove old page
+        if (currentPage != null) {
+            getChildren().remove((Node) currentPage);
+        }
+        // get node for page
+        if (url.equals(HOME_URL)) {
+            if (homePage == null) {
+                homePage = new HomePage(this);
+            }
+            currentPage = homePage;
+            getChildren().add(currentPage.getNode());
+        } else if (url.startsWith("http://") || url.startsWith("https://")) {
+            if (docsPage == null) docsPage = new DocsPage(this);
+            currentPage = docsPage;
+            docsPage.goToUrl(url);
+            getChildren().add(currentPage.getNode());
+        } else if (sample != null) {
+            currentPage = new SamplePage(sample,url,this);
+            getChildren().add(currentPage.getNode());
+        } else if (url.startsWith("sample://")) {
+            String samplePath = url.substring("sample://".length());
+            if (samplePath.contains("?")) {
+                samplePath = samplePath.substring(0, samplePath.indexOf('?') - 1);
+            }
+            sample = Samples.ROOT.sampleForPath(samplePath);
+            if (sample != null) {
+                currentPage = new SamplePage(sample,url,this);
+                getChildren().add(currentPage.getNode());
+            } else {
+                throw new UnsupportedOperationException("Unknown sample url ["+url+"]");
+            }
+        } else {
+            throw new UnsupportedOperationException("Unknown ensmeble page url ["+url+"]");
+        }
+        // update properties
+        atHome.set(url.equals(HOME_URL));
+        forwardPossible.set(!futureHistory.isEmpty());
+        backPossible.set(!pastHistory.isEmpty());
+        currentPageTitle.bind(currentPage.titleProperty());
+    }
+
+    @Override protected void layoutChildren() {
+        if (currentPage != null) {
+            currentPage.getNode().resize(getWidth(), getHeight());
+        }
+    }
+
+    public String getCurrentPageUrl() {
+        return currentPageUrl;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/PlatformFeatures.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2012, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package ensemble;
+
+public class PlatformFeatures {
+    private static final String os = System.getProperty("os.name");
+    private static final String arch = System.getProperty("os.arch");
+    
+    private static final boolean WINDOWS = os.startsWith("Windows");
+    private static final boolean MAC = os.startsWith("Mac");
+    private static final boolean LINUX = os.startsWith("Linux");
+    private static final boolean IOS = os.startsWith("iOS");   
+    private static final boolean ARM = arch.equals("arm");
+    
+    public static final boolean SUPPORTS_BENDING_PAGES = !ARM;
+    public static final boolean HAS_HELVETICA = MAC || IOS;
+    public static final boolean USE_IOS_THEME = IOS;
+    public static final boolean START_FULL_SCREEN = ARM;
+    
+    private PlatformFeatures(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/SampleCategory.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package ensemble;
+
+import ensemble.generated.Samples;
+
+/**
+ * Descriptor for a category containing samples and sub categories.
+ */
+public class SampleCategory {
+    public final String name;
+    /* samples contained in this category directly */
+    public final SampleInfo[] samples;
+    /* samples contained in this category directly and all sub categories recursively */
+    public final SampleInfo[] samplesAll;
+    public final SampleCategory[] subCategories;
+
+    public SampleCategory(String name, SampleInfo[] samples, SampleInfo[] samplesAll, SampleCategory[] subCategories) {
+        this.name = name;
+        this.samples = samples;
+        this.samplesAll = samplesAll;
+        this.subCategories = subCategories;
+    }
+    
+    public SampleInfo sampleForPath(String path) {
+        if (path.charAt(0) == '/') { // absolute path
+            return Samples.ROOT.sampleForPath(path.split("/"),1);
+        } else {
+            return sampleForPath(path.split("/"),0);
+        }
+    }
+    
+    private SampleInfo sampleForPath(String[] pathParts, int index) {
+        String part = pathParts[index];
+        if (samples!=null) for (SampleInfo sample: samples) {
+            if (sample.name.equals(part)) return sample;
+        }
+        if (subCategories!=null) for (SampleCategory category: subCategories) {
+            if (category.name.equals(part)) return category.sampleForPath(pathParts, index + 1);
+        }
+        return null;
+    }
+    
+    @Override public String toString() {
+        return name;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/SampleInfo.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,341 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package ensemble;
+
+import ensemble.playground.PlaygroundProperty;
+import ensemble.samplepage.SamplePage;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.AbstractList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.geometry.Pos;
+import javafx.geometry.Side;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.control.Control;
+import javafx.scene.control.Label;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.scene.layout.Background;
+import javafx.scene.layout.BackgroundImage;
+import javafx.scene.layout.BackgroundPosition;
+import javafx.scene.layout.BackgroundRepeat;
+import javafx.scene.layout.BackgroundSize;
+import javafx.scene.layout.Pane;
+import javafx.scene.layout.Region;
+
+/**
+ * Descriptor for a ensemble sample. Everything the ui needs is determined at 
+ * compile time from the sample sources and stored in these SampleInfo objects so 
+ * we don't have to calculate anything at runtime.
+ */
+public class SampleInfo {
+
+    // =============== BASICS ==================================================
+
+    public final String name;
+    public final String description;
+    public final String ensemblePath;
+
+    // =============== SOURCES & RESOURCES =====================================
+
+    /** The base URI for all the source files and resources for this sample. */
+    public final String baseUri;
+    /** All the files needed by this sample. Relative to the sample base URI. */
+    public final String[] resourceUrls;
+    /** The URL for the source of the sample main file. Relative to the sample base URI */
+    public final String mainFileUrl;
+    /** Full classpath for sample's application class */
+    public final String appClass;
+    /** ClassPath Url for preview image of size 206x152 */
+    public final String previewUrl;
+    /** List of properties in the sample that can be played with */
+    public final PlaygroundProperty[] playgroundProperties;
+
+    // =============== RELATED =================================================
+
+    /** Array of classpaths to related docs. */
+    public final String[] apiClasspaths;
+    /** Array of urls to related (non-api) docs given as pairs (url, name). */
+    private final String[] docsUrls;
+    /** Array of ensmeble paths to related samples. */
+    public final String[] relatesSamplePaths;
+
+    public SampleInfo(String name, String description, String ensemblePath, String baseUri, String appClass,
+                  String previewUrl, String[] resourceUrls, String[] apiClasspaths,
+                  String[] docsUrls, String[] relatesSamplePaths, String mainFileUrl,
+                  PlaygroundProperty[] playgroundProperties) {
+        this.name = name;
+        this.description = description;
+        this.ensemblePath = ensemblePath;
+        this.baseUri = baseUri;
+        this.appClass = appClass;
+        this.previewUrl = previewUrl;
+        this.resourceUrls = resourceUrls;
+        this.mainFileUrl = mainFileUrl;
+        this.apiClasspaths = apiClasspaths;
+        this.docsUrls = docsUrls;
+        this.relatesSamplePaths = relatesSamplePaths;
+        this.playgroundProperties = playgroundProperties;
+    }
+    
+    @Override public String toString() {
+        return name;
+    }
+
+    // 460 x 345 - 5x5px border = 450x335
+    public Node getLargePreview() {
+//        if (previewUrl != null) {
+//            String url = getClass().getResource(previewUrl).toExternalForm();
+//            label.setBackground(new Background(
+//                new BackgroundImage(
+//                    new Image(url), 
+//                    BackgroundRepeat.NO_REPEAT, 
+//                    BackgroundRepeat.NO_REPEAT, 
+//                    new BackgroundPosition(Side.LEFT,5,false, Side.TOP,5,false), 
+//                    new BackgroundSize(450, 335, false, false, false, false)
+//                )));
+//        }
+        
+        return new LargePreviewRegion();
+    }
+    
+    // 216x162 - 5+5px border = 206x152
+    public Node getMediumPreview() {
+        Region label = new Region();
+        if (previewUrl != null) {
+            String url = getClass().getResource(previewUrl).toExternalForm();
+            label.setBackground(new Background(
+                new BackgroundImage(
+                    new Image(url), 
+                    BackgroundRepeat.NO_REPEAT, 
+                    BackgroundRepeat.NO_REPEAT, 
+                    new BackgroundPosition(Side.LEFT,5,false, Side.TOP,5,false), 
+                    new BackgroundSize(206, 152, false, false, false, false)
+                )));
+        }
+        label.getStyleClass().add("sample-medium-preview");
+        label.setMinSize(Control.USE_PREF_SIZE, Control.USE_PREF_SIZE);
+        label.setPrefSize(216, 162);
+        return label;
+    }
+    
+    private Class clz;
+    private Object app;
+
+    public Class getClz() {
+        return clz;
+    }
+
+    public Object getApp() {
+        return app;
+    }
+    
+    public Parent buildSampleNode() {
+        try {
+            Method play = null;
+            Method stop = null;
+            clz = Class.forName(appClass);
+            app = clz.newInstance();
+            Parent root = (Parent) clz.getMethod("createContent").invoke(app);
+            
+            for (Method m : clz.getMethods()) {
+                switch(m.getName()) {
+                    case "play":
+                        play = m;
+                        break;
+                    case "stop":
+                        stop = m;
+                        break;
+                }
+            }
+            final Method fPlay = play;
+            final Method fStop = stop;
+            
+            root.sceneProperty().addListener(new ChangeListener<Scene>() {
+                @Override
+                public void changed(ObservableValue<? extends Scene> ov, Scene oldScene, Scene newScene) {
+                    try {
+                        if (oldScene != null && fStop != null) {
+                            fStop.invoke(app);
+                        }
+                        if (newScene != null && fPlay != null) {
+                            fPlay.invoke(app);
+                        }
+                    } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
+                        Logger.getLogger(SamplePage.class.getName()).log(Level.SEVERE, null, ex);
+                    }
+                }
+            });
+            
+            return root;
+        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | NoSuchMethodException | SecurityException | IllegalArgumentException | InvocationTargetException ex) {
+            Logger.getLogger(SamplePage.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        return new Pane();
+    }
+    private static final Image SAMPLE_BACKGROUND = new Image(
+            SampleInfo.class.getResource("images/sample-background.png").toExternalForm());
+    private class LargePreviewRegion extends Region {
+        private final Node sampleNode = buildSampleNode();
+        private final Label label = new Label();
+        private final ImageView background = new ImageView(SAMPLE_BACKGROUND);
+
+        public LargePreviewRegion() {
+            getStyleClass().add("sample-large-preview");
+            label.setText(name);
+            label.getStyleClass().add("sample-large-preview-label");
+            label.setAlignment(Pos.BOTTOM_CENTER);
+            label.setWrapText(true);
+            getChildren().addAll(background,sampleNode,label);
+        }
+        
+        @Override protected double computeMinWidth(double height) { return 460; }
+        @Override protected double computeMinHeight(double width) { return 345; }
+        @Override protected double computePrefWidth(double height) { return 460; }
+        @Override protected double computePrefHeight(double width) { return 345; }
+
+        @Override protected void layoutChildren() {
+            double labelHeight = label.prefHeight(440);
+            background.setLayoutX(5);
+            background.setLayoutY(5);
+            background.setFitWidth(450);
+            background.setFitHeight(335);
+            sampleNode.setLayoutX(10);
+            sampleNode.setLayoutY(10);
+            sampleNode.resize(440, 315-labelHeight);
+            label.setLayoutX(10);
+            label.setLayoutY(345 - 15 - labelHeight);
+            label.resize(440, labelHeight);
+        }
+    }
+    
+    private List<URL> relatedSampleURLs = new AbstractList<URL>() {
+
+        @Override
+        public URL get(final int index) {
+            return new URL() {
+
+                @Override
+                public String getURL() {
+                    return relatesSamplePaths[index];
+                }
+
+                @Override
+                public String getName() {
+                    String url = getURL();
+                    return url.substring(url.lastIndexOf('/') + 1);
+                }
+            };
+        }
+
+        @Override
+        public int size() {
+            return relatesSamplePaths.length;
+        }
+    };
+    
+    public List<URL> getRelatedSampleURLs() {
+        return relatedSampleURLs;
+    }
+    
+    private List<URL> docURLs = new AbstractList<URL>() {
+
+        @Override
+        public URL get(final int index) {
+            return new URL() {
+
+                @Override
+                public String getURL() {
+                    return docsUrls[index * 2];
+                }
+
+                @Override
+                public String getName() {
+                    return docsUrls[index * 2 + 1];
+                }
+            };
+        }
+
+        @Override
+        public int size() {
+            return docsUrls.length / 2;
+        }
+    };
+
+    public List<URL> getDocURLs() {
+        return docURLs;
+    }
+    
+    private List<URL> sources = new AbstractList<URL>() {
+
+        @Override
+        public URL get(final int index) {
+            return new URL() {
+
+                @Override
+                public String getURL() {
+                    return resourceUrls[index];
+                }
+
+                @Override
+                public String getName() {
+                    String url = getURL();
+                    return url.substring(url.lastIndexOf('/') + 1);
+                }
+            };
+        }
+
+        @Override
+        public int size() {
+            return resourceUrls.length;
+        }
+    };
+
+    public List<URL> getSources() {
+        return sources;
+    }
+    
+    public boolean needsPlayground() {
+        return playgroundProperties.length > 0;
+    }
+    
+    public static interface URL {
+        String getURL();
+        String getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/samples/Ensemble8/src/app/ensemble/SamplePopoverTreeList.java	Tue Feb 26 10:04:35 2013 -0800
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2008, 2013 Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *  - Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  - Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the distribution.
+ *  - Neither the name of Oracle Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package ensemble;
+
+import ensemble.control.Popover;
+import ensemble.control.PopoverTreeList;
+import ensemble.generated.Samples;
+import javafx.event.EventHandler;
+import javafx.geometry.Bounds;
+import javafx.scene.Node;
+import javafx.scene.control.ListCell;
+import javafx.scene.control.ListView;
+import javafx.scene.image.ImageView;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.layout.Region;
+
+/**
+ * Popover page that displays a list of samples and sample categories for a given
+ * SampleCategory.
+ */
+public class SamplePopoverTreeList extends PopoverTreeList implements Popover.Page {
+    private Popover popover;
+    private SampleCategory category;
+    private PageBrowser pageBrowser;
+
+    public SamplePopoverTreeList(SampleCategory category, PageBrowser pageBrowser) {
+        this.category = category;
+        this.pageBrowser = pageBrowser;
+        if (category.subCategories!=null) getItems().addAll((Object[])category.subCategories);
+        if (category.samples!=null) getItems().addAll((Object[])category.samples);
+    }
+    
+    @Override public ListCell call(ListView p) {
+        return new SampleItemListCell();
+    }
+
+    @Override protected void itemClicked(Object item) {
+        if (item instanceof SampleCategory) {
+            popover.pushPage(new SamplePopoverTreeList((SampleCategory)item, pageBrowser));
+        } else if (item instanceof SampleInfo) {
+            popover.hide();
+            pageBrowser.goToSample((SampleInfo)item);
+        }
+    }
+
+    @Override public void setPopover(Popover popover) {
+        this.popover = popover;
+    }
+
+    @Override public Popover getPopover() {
+        return popover;
+    }
+
+    @Override public Node getPageNode() {
+        return this;
+    }
+
+    @Override public String getPageTitle() {
+        return "Samples";
+    }
+
+    @Override public String leftButtonText() {
+        return category == Samples.ROOT ? null : "Back";
+    }
+
+    @Override public void handleLeftButton() {
+        popover.popPage();
+    }
+
+    @Override public String rightButtonText() {
+        return &