changeset 151:19e850f7dbef 2.1-b05

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/2.1/MASTER/jfx/rt
author David Grieve<david.grieve@oracle.com>
date Tue, 13 Dec 2011 10:11:05 -0500
parents 8b6d03b2f545 8997b2d2d14f
children 07a7807fb26b 085098d519e8
files
diffstat 111 files changed, 8228 insertions(+), 194 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/build-closed.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="javafx-beans-dt" default="jar" basedir=".">
+    <description>Builds, tests, and jars the closed version of the javafx-beans-dt project.</description>
+    
+    <property name="runtime.dist.root.dir" value="../../rt-closed" />    
+    <path id="javac.closed.classpath.path" path="
+        ${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar:
+        ${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar:
+        ${runtime.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar" />
+    <property name="javac.classpath" refid="javac.closed.classpath.path"/>
+    
+    <import file="../build-defs.xml"/>
+    <import file="build-common.xml"/>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/build-common.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="javafx-ui-controls-common" default="jar" basedir=".">
+
+    <target name="check-binary-css">
+        <uptodate property="binaryCssUpToDate" targetfile="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss">
+            <srcfiles dir="${src.dir}/com/sun/javafx/scene/control/skin/caspian" includes="caspian.css"/>
+        </uptodate>
+    </target> 
+
+    <target name="-pre-init" depends="check-binary-css" unless="binaryCssUpToDate">
+        <mkdir dir="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian"/>
+        <java classname="com.sun.javafx.css.parser.Css2Bin" fork="true" failonerror="true">
+          <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>
+          <classpath> 
+            <pathelement location="${runtime.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-anim/dist/javafx-anim.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-logging/dist/javafx-logging.jar"/>
+          </classpath> 
+          <arg value="${src.dir}/com/sun/javafx/scene/control/skin/caspian/caspian.css"/>
+          <arg value="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss"/>
+        </java>
+    </target>
+
+    <target name="debug-test-file" depends="jar">
+        <echo message="${run.test.classpath}" />
+        <debug-selected-file-in-test/>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/build.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="javafx-beans-dt" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project javafx-beans-dt.</description>
+
+  <import file="../build-defs.xml"/>
+
+  <target name="debug-test-file" depends="jar">
+      <debug-selected-file-in-test/>
+  </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/jar.jardesc	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<jardesc>
+    <jar path="javafx-beans-dt/dist/javafx-beans-dt.jar"/>
+    <options buildIfNeeded="true" compress="true" descriptionLocation="/javafx-beans-dt/jar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
+    <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
+    <selectedProjects/>
+    <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
+        <sealing sealJar="false">
+            <packagesToSeal/>
+            <packagesToUnSeal/>
+        </sealing>
+    </manifest>
+    <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
+        <javaElement handleIdentifier="=javafx-beans-dt/src"/>
+    </selectedElements>
+</jardesc>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/nbproject/project.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>javafx-beans-dt</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="debug.test.single">
+                    <script>build.xml</script>
+                    <target>debug-test-file</target>
+                    <context>
+                        <property>debug.class</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>java-name</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="debug.single">
+                    <target>debug-test-file</target>
+                    <context>
+                        <property>debug.class</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>java-name</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/javafx-beans-dt.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                    <source-file>
+                        <location>project.properties</location>
+                    </source-file>
+                    <source-file>
+                        <location>nbproject/project.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/javafx-beans-dt.jar</built-to>
+                <source-level>1.6</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.6</source-level>
+            </compilation-unit>
+        </java-data>
+        <spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
+            <word>callbacks</word>
+        </spellchecker-wordlist>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/project.properties	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,10 @@
+JFXRT_HOME=\
+    ${runtime.dist.root.dir}/../artifacts/sdk/rt/lib
+javac.classpath=\
+    ${JFXRT_HOME}/jfxrt.jar
+disable-lombok=true
+javac.classpath=\
+    ${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar:\
+    ${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar:\
+    ${runtime.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/DisplayItem.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design;
+
+import javafx.scene.image.Image;
+
+/**
+ * <P>The DisplayItem interface describes the basic information needed to
+ * display an action in a menu or a button. Several interfaces in this API
+ * extend this one to provide a basic name, description, icon, etc.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface DisplayItem {
+    /**
+     * Returns a display name for this item. This will be used to show in a
+     * menu or as a button label, depending on the subinterface.
+     *
+     * @return A String representing the display name for this item.
+     */
+    public String getDisplayName();
+
+    /**
+     * Returns a description for this item. This will be used as a tooltip in a
+     * menu or on a button, depending on the subinterface.
+     *
+     * @return A String representing the description for this item.
+     */
+    public String getDescription();
+
+    /**
+     * Returns a large image icon for this item. Generally "large" means 32x32
+     * pixels.
+     *
+     * @return An Image representing the large icon for this item.
+     */
+    public Image getLargeIcon(); //TODO I would prefer "findImage"
+
+    /**
+     * Returns a small image icon for this item. Generally "small" means 16x16
+     * pixels.
+     *
+     * @return An Image representing the large icon for this item.
+     */
+    public Image getSmallIcon(); //TODO I would prefer "findImage"
+
+    /**
+     * Returns the help key for this item. This is usually a key used to look up
+     * a help context item in an online help facility.
+     *
+     * @return A String representing the help key for this item.
+     */
+    public String getHelpKey();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/BeanCreateInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.DisplayItem;
+import com.sun.javafx.beans.design.tool.DesignBean;
+
+/**
+ * <P>A BeanCreateInfo describes an item on a Palette that will create a bean in a visual designer.
+ * This includes a display name, description, icon, etc.  There is also (most importantly) a hook
+ * to programmatically manipulate the newly created bean immediately after is has been created.
+ * This is useful for setting a default state for the newly created bean.</P>
+ *
+ * <P>If the specified JavaBean has an associated DesignInfo, the DesignInfo's 'beanCreatedSetup'
+ * method will be called before the BeanCreateInfo's 'beanCreatedSetup' method is called.  This 
+ * gives the DesignInfo the "first crack", but it gives the BeanCreateInfo the "last word".</P>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.  The BasicBeanCreateInfo class can be used for convenience.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see javax.beans.impl.BasicBeanCreateInfo
+ */
+public interface BeanCreateInfo<T> extends DisplayItem {
+
+    /**
+     * Returns the class name of the new JavaBean to create when this BeanCreateInfo is invoked in
+     * a visual designer.
+     *
+     * @return The String fully qualified class name for the JavaBean to create.
+     */
+    public String getBeanClassName();
+
+    /**
+     * <p>A hook that gets called after this JavaBean gets created initially.  This is useful for a
+     * component author to setup an initial state for their JavaBean when it is first created.  Note
+     * that this method is only called one time after the JavaBeans are initially created from the
+     * palette.  This is *not* a hook that is called each time the project is reopened.</p>
+
+     * <p>NOTE: If the specified bean has an associated DesignInfo class - it will have "first
+     * crack" at modifying the initial state of the bean.  This method will be called after the
+     * DesignInfo one is called.</p>
+     *
+     * @return A standard Result object, indicating success or failure - and optionally including
+     *         messages for the user.
+     */
+    public Result beanCreatedSetup(DesignBean<T> designBean);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/BeanCreateInfoSet.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.DisplayItem;
+import com.sun.javafx.beans.design.tool.DesignBean;
+
+/**
+ * <P>A BeanCreateInfoSet is a group version of the BeanCreateInfo interface.  It describes a
+ * single item on a Palette that will create a set of beans in a visual designer.  This includes a
+ * display name, description, icon, etc.  There is also (most importantly) a hook to
+ * programmatically manipulate the newly created beans immediately after they have been created.
+ * This is useful for setting the default state for the newly created set of beans.</P>
+ *
+ * <P>If the any of the specified JavaBeans have an associated DesignInfo, the DesignInfo's
+ * 'beanCreatedSetup' method will be called before the BeanCreateInfoSet's 'beansCreatedSetup' method
+ * will be called.  This gives the DesignInfo the "first crack", but it ultimately gives the
+ * BeanCreateInfoSet the "last word".</P>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.  The BasicBeanCreateInfoSet class can be used for convenience.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see javax.beans.impl.BasicBeanCreateInfoSet
+ */
+public interface BeanCreateInfoSet extends DisplayItem {
+
+    /**
+     * Returns an array of class names of the new JavaBeans to create when this BeanCreateInfoSet
+     * is invoked in a visual designer.
+     *
+     * @return A String[] of fully qualified class names for the JavaBeans to create.
+     */
+    public String[] getBeanClassNames();
+
+    /**
+     * <p>A hook that gets called after the full set of JavaBean gets created.  This is useful for
+     * a component author to setup an initial state for a set of JavaBeans when they are first
+     * created.  Note that this method is only called one time after the JavaBeans are initially
+     * created from the palette.  This is *not* a hook that is called each time the project is
+     * reopened.</p>
+     *
+     * <P>If the any of the specified JavaBeans have an associated DesignInfo, the DesignInfo's
+     * 'beanCreatedSetup' method will be called before each of the BeanCreateInfo's 'beanCreatedSetup'
+     * methods are called.  Once all of the beans have been created, and the individual 
+     * 'beanCreatedSetup' methods have been called, this 'beansCreatedSetup' method will be called.
+     * This gives the DesignInfo the "first crack", but it ultimately gives the BeanCreateInfoSet the
+     * "last word".</P>
+     *
+     * @param designBeans The array of DesignBean objects representing the JavaBeans that have just been
+     *        created.
+     * @return A standard Result object, indicating success or failure - and optionally including
+     *         messages for the user.
+     */
+    public Result beansCreatedSetup(DesignBean[] designBeans);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/CheckedDisplayAction.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+/**
+ * <P>The CheckedDisplayAction represents a checked display item (like a checkbox in a menu or on a
+ * dialog).  The invoke method (inherited from DisplayAction) should toggle the checked state if
+ * possible.</P>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.  The BasicCheckedDisplayAction class can be used for convenience.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see DisplayAction
+ * @see javax.beans.impl.BasicCheckedDisplayAction
+ */
+public interface CheckedDisplayAction extends DisplayAction {
+
+    /**
+     * Returns the boolean checked state of this display item.
+     *
+     * @return <code>true</code> if this display action is checked, and <code>false</code> if not
+     */
+    public boolean isChecked();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/Customizer.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.DisplayItem;
+import com.sun.javafx.beans.design.tool.DesignBean;
+import com.sun.javafx.beans.design.tool.DesignProperty;
+import javafx.beans.property.ReadOnlyBooleanProperty;
+import javafx.scene.Node;
+
+/**
+ * <p>The Customizer interface describes a context-aware customizer for a
+ * JavaFX Bean. A component author may wish to supply a customizer for their
+ * JavaFX Bean, which is a dialog that pops up and provides a rich set of UI
+ * controls to manipulate the configuration of the entire JavaFX Bean. This
+ * type of Customizer has significantly more access to the context that the
+ * JavaFX Bean is being designed in, and thus allows for much greater
+ * functionality.</p>
+ *
+ * TODO the following description should be updated to include the notion
+ * of pop-overs
+ *
+ * <p>If a Customizer is apply capable (isApplyCapable() returns true), the host
+ * dialog will have three buttons: "OK", "Apply", and "Cancel" (and possibly
+ * "Help" if there is a helpKey). The 'isModified' method will be called each
+ * time a PropertyChangeEvent is fired to check if the "Apply" button should be
+ * enabled. When the user clicks "OK" or "Apply", the 'applyChanges' method is
+ * called.  This implies that manipulations in the dialog are not directly
+ * affecting the DesignBean. The DesignBean should not be touched until
+ * 'applyChanges' has been called.</p>
+ *
+ * <p>If a Customizer is NOT apply capable (isApplyCapable() returns false), the
+ * host dialog will only have one button: "Done" (and possibly "Help" if there
+ * is a helpKey). The DesignBean may be manipulated at will in this dialog, as
+ * it is considered to be non-stateful.  When the user clicks "Done", the
+ * 'applyChanges' method will be called.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to
+ * be implemented by the component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface Customizer extends DisplayItem {
+
+    /**
+     * Returns a UI node (should be resizable) to be displayed to the user.
+     * The passed in DesignBean is the design-time proxy representing the
+     * JavaFX Bean being customized. This method (or
+     * getCustomizerPanel(DesignProperty)) will be called *every* time the
+     * Customizer is invoked.
+     *
+     * @param designBean the DesignBean to be customized
+     * @return a resizable UI node to display to the user
+     * @see #getCustomizerPanel(DesignProperty)
+     */
+    public Node getCustomizerPanel(DesignBean designBean);
+
+    /**
+     * Returns a UI node (should be resizable) to be displayed to the user. The
+     * passed in DesignProperty is the design-time proxy representing the
+     * JavaFX Bean property being customized. This method (or
+     * getCustomizerPanel(DesignBean)) will be called *every* time the
+     * Customizer is invoked.
+     *
+     * @param designProperty the DesignProperty to be customized
+     * @return a resizable node to display to the user
+     * @see #getCustomizerPanel(DesignBean)
+     */
+    public Node getCustomizerPanel(DesignProperty designProperty);
+
+    /**
+     * <p>If a Customizer is apply capable (isApplyCapable() returns true), the
+     * host dialog will have three buttons: "OK", "Apply", and "Cancel" (and
+     * possibly "Help" if there is a helpKey). The 'isModified' method will be
+     * called each time a PropertyChangeEvent is fired to check if the "Apply"
+     * button should be enabled.  When the user clicks "OK" or "Apply", the
+     * 'applyChanges' method is called.  This implies that manipulations in the
+     * dialog are not directly affecting the DesignBean. The DesignBean should
+     * not be touched until 'applyChanges' has been called.</p>
+     *
+     * <p>If a Customizer is NOT apply capable (isApplyCapable() returns false),
+     * the host dialog will only have one button: "Done" (and possibly "Help" if
+     * there is a helpKey).  The DesignBean may be manipulated at will in this
+     * dialog, as it is considered to be non-stateful.  When the user clicks
+     * "Done", the 'applyChanges' method will be called.</p>
+     *
+     * @return returns <code>true</code> if the customizer is stateful and is
+     *         capable of handling an apply operation
+     * @see #isModified()
+     * @see #applyChanges()
+     */
+    public boolean isApplyCapable();
+
+    /**
+     * Returns <code>true</code> if the customizer is in an edited state - to
+     * notify the customizer dialog that the "Apply" button should be activated.
+     *
+     * @return returns <code>true</code> if the customizer is in an edited
+     *         state, <code>false</code> if not
+     */
+    public boolean isModified();
+
+    /**
+     * Gets a reference to the modified Property.
+     *
+     * @return A reference to the modified property.
+     */
+    public ReadOnlyBooleanProperty modifiedProperty();
+
+    /**
+     * Notifies the customizer that the user has clicked "OK" or "Apply" and the
+     * customizer should commit it's changes to the DesignBean.
+     *
+     * @return A Result object, indicating success or failure, and optionally
+     *         including messages for the user
+     */
+    public Result applyChanges();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/CustomizerResult.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.tool.DesignBean;
+import com.sun.javafx.beans.design.tool.DesignProperty;
+
+
+/**
+ * <p>The CustomizerResult is a special Result object that triggers the customizer dialog to be
+ * displayed.  This Result object can be returned from any component-author operation and thus pop
+ * up a customizer dialog.  Common uses include a context-menu item, which allows a right-click menu
+ * item to launch a customizer, and a return value from a beanCreatedSetup method to pop up the
+ * customizer dialog just as a component is dropped from the palette.</p>
+ *
+ * @todo Create a Builder?
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see Customizer2
+ * @see Result
+ */
+public class CustomizerResult extends Result {
+    /**
+     * Storage for the 'customizeBean' property
+     */
+    protected DesignBean customizeBean;
+
+    /**
+     * Storage for the 'customizeBean' property
+     */
+    protected DesignProperty customizeProperty;
+
+    /**
+     * Storage for the 'customizer' property
+     */
+    protected Customizer customizer;
+
+    /**
+     * Constructs a CustomizerResult without a DesignBean, DesignProperty or Customizer2 (which
+     * must be specified via 'setDesignBean(...)' and/or 'setDesignProperty(...)' and
+     * 'setCustomizer(...)' before being returned).
+     */
+    public CustomizerResult() {
+        super(true);
+    }
+
+    /**
+     * Constructs a CustomizerResult with the specified DesignBean and no Customizer2 (which must
+     * be specified via 'setCustomizer2' before being returned).
+     */
+    public CustomizerResult(final DesignBean customizeBean) {
+        super(true);
+        this.customizeBean = customizeBean;
+    }
+
+    /**
+     * Constructs a CustomizerResult with the specified DesignProperty and no Customizer2 (which
+     * must be specified via 'setCustomizer2' before being returned).
+     */
+    public CustomizerResult(final DesignProperty customizeProperty) {
+        super(true);
+        this.customizeProperty = customizeProperty;
+    }
+
+    /**
+     * Constructs a CustomizerResult with the specified DesignBean and Customizer2
+     */
+    public CustomizerResult(final DesignBean customizeBean, final Customizer customizer) {
+        this(customizeBean);
+        this.customizer = customizer;
+    }
+
+    /**
+     * Constructs a CustomizerResult with the specified DesignProperty and Customizer2
+     */
+    public CustomizerResult(final DesignProperty customizeProperty, final Customizer customizer) {
+        this(customizeProperty);
+        this.customizer = customizer;
+    }
+
+    /**
+     * Sets the 'customizeBean' property
+     *
+     * @param customizeBean DesignBean the desired DesignBean to be customized
+     */
+    public void setCustomizeBean(final DesignBean customizeBean) {
+        this.customizeBean = customizeBean;
+    }
+
+    /**
+     * Retrieves the 'customizeBean' property
+     *
+     * @return the current value of the 'customizeBean' property
+     */
+    public DesignBean getCustomizeBean() {
+        return customizeBean;
+    }
+
+    /**
+     * Sets the 'customizeProperty' property
+     *
+     * @param customizeProperty the desired DesignProperty to be customized
+     */
+    public void setCustomizeProperty(final DesignProperty customizeProperty) {
+        this.customizeProperty = customizeProperty;
+    }
+
+    /**
+     * Retrieves the 'customizeProperty' property
+     *
+     * @return the current value of the 'customizeProperty' property
+     */
+    public DesignProperty getCustomizeProperty() {
+        return customizeProperty;
+    }
+
+    /**
+     * Sets the 'customizer' property
+     *
+     * @param customizer the desired Customizer2 to use on this DesignBean or DesignProperty
+     */
+    public void setCustomizer(final Customizer customizer) {
+        this.customizer = customizer;
+    }
+
+    /**
+     * Retrieves the 'customizer' property
+     *
+     * @return the current value of the 'customizer' property
+     */
+    public Customizer getCustomizer() {
+        return customizer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/DesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.tool.DesignBean;
+import com.sun.javafx.beans.design.tool.DesignBeanListener;
+import com.sun.javafx.beans.metadata.PropertyMetaData;
+import java.util.List;
+
+/**
+ * <P>The DesignInfo interface is another type of BeanInfo interface to provide more live design-
+ * time functionality for a JavaBean.  BeanInfo represents static meta-data about a JavaBean, while
+ * DesignInfo provides dynamic design-time behavior.</P>
+ *
+ * <P>To provide a DesignInfo for a JavaBean, a component author must provide an implementation
+ * of the DesignInfo interface available at design-time that matches the name of the JavaBean
+ * class with "DesignInfo" appended to it.</P>
+ *
+ * <P>For example, a component author may supply a JavaBean class named 'com.company.Donkey', and
+ * may also supply a corresponding 'com.company.DonkeyBeanInfo' (implements BeanInfo) as well as
+ * 'com.company.DonkeyDesignInfo' (implements DesignInfo).  Note that these cannot be the same
+ * class, as there is no guarantee that the supplied BeanInfo class will be the same instance that
+ * is used in the designer - typically, a BeanInfo class is 'deep-copied' into another instance
+ * inside of an IDE.</P>
+ *
+ * <p><b>GLOBAL CONTEXT LISTENERS:</b>  If you wish to provide a global IDE-wide
+ * DesignContextListener (to listen to multiple beans across multiple contexts), you can declare
+ * the following static method in your DesignInfo class.  When the DesignInfo for your bean is
+ * loaded, this static method will be looked for via reflection and called if it exists:</p>
+ *
+ * <code>
+ *    public static DesignContextListener getGlobalDesignContextListener() { ... }
+ * </code>
+ *
+ * <p>If this method is declared in a DesignInfo implementation class, it will be called when the
+ * DesignInfo is first loaded by the IDE, and added to a static list of global listeners.  These
+ * listeners will be notified of *every* event that happens in the IDE, so please use sparingly!</p>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.  BasicDesignInfo is supplied for convenience for subclassing.</P>
+ *
+ * @author Joe Nuxoll
+ * @author Tor Norbye
+ * @version 1.0
+ * @see javax.beans.impl.BasicDesignInfo
+ * @todo Add additional feature descriptors. How about quick tips and fixes?
+ *   How about error annotations and smart tags
+ */
+public interface DesignInfo<T> extends DesignBeanListener<T> {
+
+    /**
+     * Returns the class type of the JavaBean that this DesignInfo was designed to work with
+     *
+     * @return The JavaBean's class type object
+     */
+    public Class<T> getBeanClass();
+
+    /**
+     * <p>Returns <code>true</code> if this child component (passed as 'childBean' and/or
+     * 'childClass') can be added as a child to the specified parent component (passed as
+     * 'parentBean').  This allows a component author to dynamically inspect the component hierarchy
+     * to determine if a particular component may be inserted.</p>
+     *
+     * <p>This method is called on the DesignInfo representing the childBean component any time a
+     * new component is being created, or dragged around in the visual designer.</p>
+     *
+     * <p>Note that the 'childBean' argument may be null if this operation is happening as a result
+     * of a fresh component drop from the palette.  In that case, the child component instance will
+     * not be created until the actual drop happens, thus these checks must be done with only the
+     * child component's Class.</p>
+     *
+     * @param parentBean The DesignBean representing the potential parent component to receive the
+     *        child
+     * @param childBean The DesignBean representing the potential child component that is being
+     *        created or reparented.  This argument may be null if this represents an initial drag
+     *        from the palette, where the child bean has not been instantiated yet.
+     * @param childClass The Class object representing the potential child component that is being
+     *        created or reparented.
+     * @return <code>true</code> if this parent bean is suitable for this child bean, or
+     *         <code>false</code> if not
+     */
+    public boolean acceptParent(DesignBean parentBean, DesignBean<T> childBean, Class<T> childClass);
+
+    /**
+     * <p>Returns <code>true</code> if this child component (passed as 'childBean' and/or
+     * 'childClass') can be added as a child to the specified parent component (passed as
+     * 'parentBean').  This allows a component author to dynamically inspect the component hierarchy
+     * to determine if a particular component may be inserted.</p>
+     *
+     * <p>This method is called on the DesignInfo representing the parentBean component any time a
+     * new component is being created or dragged around in the visual designer.</p>
+     *
+     * <p>Note that the 'childBean' argument may be null if this operation is happening as a result
+     * of a fresh component drop from the palette.  In that case, the child component instance will
+     * not be created until the actual drop happens, thus these checks must be done with only the
+     * child component's Class.</p>
+     *
+     * @param parentBean The DesignBean representing the potential parent component to receive the
+     *        child
+     * @param childBean The DesignBean representing the potential child component that is being
+     *        created or reparented.  This argument may be null if this represents an initial drag
+     *        from the palette, where the child bean has not been instantiated yet.
+     * @param childClass The Class object representing the potential child component that is being
+     *        created or reparented.
+     * @return <code>true</code> if this child bean is suitable for this parent bean, or
+     *         <code>false</code> if not
+     */
+    public boolean acceptChild(DesignBean<T> parentBean, DesignBean childBean, Class childClass);
+
+    /**
+     * Provides an opportunity for a DesignInfo to setup the initial state of a newly created
+     * bean.  Anything can be done here, including property settings, event hooks, and even the
+     * creation of other ancillary beans within the context.  Note that this method is only called
+     * once after the component has been first created from the palette.
+     *
+     * @param designBean The bean that was just created
+     * @return A Result object, indicating success or failure and including messages for the user
+     */
+    public Result beanCreatedSetup(DesignBean<T> designBean);
+
+    /**
+     * Provides an opportunity for a DesignInfo to fix-up the state of a pasted bean. Anything can
+     * be done here, including property settings, event hooks, and even the creation of other
+     * ancillary beans within the context.
+     *
+     * @param designBean The bean that was just pasted from the clipboard
+     * @return A Result object, indicating success or failure and including messages for the user
+     */
+    public Result beanPastedSetup(DesignBean<T> designBean);
+
+    /**
+     * Provides an opportunity for a DesignInfo to cleanup just before a bean gets deleted.
+     * Anything can be done here, including property settings, event hooks, and even the
+     * creation/deletion of other ancillary beans within the context.  Note, however, that this
+     * DesignBean will be deleted immediately upon the return of this method.  This is intended for
+     * cleanup of ancillary items created in 'beanCreatedSetup'.
+     *
+     * @param designBean The bean that is about to be deleted
+     * @return A Result object, indicating success or failure and including messages for the user
+     */
+    public Result beanDeletedCleanup(DesignBean<T> designBean);
+
+    /**
+     * Returns the list (or hierarchy) of items to be included in a right-click context menu for
+     * this bean at design-time.
+     *
+     * @param designBean The DesignBean that a user has right-clicked on
+     * @return An array of DisplayAction objects representing a context menu to display to the user,
+     *  or {@link DisplayAction#EMPTY_ARRAY} if there are no items
+     */
+    public DisplayAction[] getContextItems(DesignBean<T> designBean);
+
+    /**
+     * This method is called when an object from a design surface or palette is being dragged 'over'
+     * a JavaBean type handled by this DesignInfo.  If the 'sourceBean' or 'sourceClass' is of
+     * interest to the 'targetBean' instance or vice-versa (they can be "linked"), this method
+     * should return <code>true</code>.  The user will then be presented with visual cues that this
+     * is an appropriate place to 'drop' the item and establish a link.  If the user decides to drop
+     * the item on this targetBean, the 'linkBeans' method will be called.  Note that the
+     * 'sourceBean' argument may be null if this drag operation is originating from the palette,
+     * because an instance of the bean will not have been created yet.
+     *
+     * @param targetBean The DesignBean instance that the user is 'hovering' the mouse over
+     * @param sourceBean The DesignBean instance that the user may potentially 'drop' to link - may
+     *        be null if this drag operation originated from the palette, because the instance will
+     *        not have been created yet
+     * @param sourceClass The class type of the object that the user may potentially 'drop' to link
+     * @return <code>true</code> if the 'targetBean' cares to have the 'sourceBean' or an instance
+     *         of type 'sourceClass' linked to it, <code>false</code> if not
+     * @see #linkBeans(DesignBean, DesignBean)
+     */
+    public boolean acceptLink(DesignBean<T> targetBean, DesignBean sourceBean, Class sourceClass);
+
+    /**
+     * <P>This method is called when an object from a design surface or palette is being dropped or
+     * has been dropped 'on' a JavaBean type handled by this DesignInfo (to establish a link). This
+     * method will not be called unless the corresponding 'acceptLink' method call returned
+     * <code>true</code> for at least one of the beans involved.  Typically, this results in new
+     * property settings on potentially both of the DesignBean objects.</P>
+     *
+     * @param targetBean The target DesignBean instance that the user has 'dropped' an object onto
+     *        to establish a link
+     * @param sourceBean The DesignBean instance that has been 'dropped'
+     * @return A Result object, indicating success or failure and including messages for the user
+     * @see #acceptLink(DesignBean, DesignBean, Class)
+     */
+    public Result linkBeans(DesignBean<T> targetBean, DesignBean sourceBean);
+
+    /**
+     * <P> This method is called when something is being dragged over a JavaBean handled by this DesignInfo.
+     * This method should indicate whether the component is interested in accepting the drop. If it returns
+     * true, and the user commits the drag &amp; drop operation, then the {@link #handleDnd} method
+     * will be called.</P>
+     * <P>
+     * The objects handled by this method will not be DesignBeans from this or any other instance of
+     * the IDE. Those operations will be handled by the normal {@link #acceptLink} method. This method
+     * is intended for all other drag operations, typically from outside of the IDE. Common examples will
+     * be dragging images or text from the system desktop and dropping them on components. As an
+     * example, a Label component should look for String Transferables and to handle the drop, set the
+     * text property to the dropped text. An Image component should look for an Image filename to be dropped
+     * and set its image source to the given filename. Components could also check for java.util.List
+     * when appropriate to handle sets of items being dropped.
+     * </P>
+     *
+     * @param targetBean The DesignBean instance that the user is 'hovering' the mouse over
+     * @param transferInfo Vital information about the drop, such as the type of drop, drop location, the
+     *     Transferable, etc.
+     * @return <code>true</code> if the 'targetBean' is willing to accept the drop
+     * @see #handleDnd(DesignBean, TransferHandler.TransferSupport)
+     */
+//    public boolean acceptDnd(DesignBean<T> targetBean, TransferHandler.TransferSupport transferInfo);
+
+
+    /**
+     * <P>This method is called when a system drag &amp; drop operation is performed on top of
+     * a JavaBean type handled by this DesignInfo.  This method will not be called unless the corresponding
+     * {@link #acceptDnd} method call returned <code>true</code>.  Typically, this results in new
+     * property settings on the DesignBean.</P>
+     * <P>
+     * @param targetBean The DesignBean instance that the user is 'hovering' the mouse over
+     * @param transferInfo Vital information about the drop, such as the type of drop, drop location, the
+     *     Transferable, etc.
+     * @return A Result object, indicating success or failure and including messages for the user
+     * @see #acceptDnd(DesignBean, TransferHandler.TransferSupport)
+     */
+//    public Result handleDnd(DesignBean<T> targetBean, TransferHandler.TransferSupport transferInfo);
+
+    // TODO Shouldn't this have been part of the interface? How does an
+    // implementation of DesignBean know whether it should return isContainer
+    // or not? Doesn't that require specific knowledge of the component? For
+    // example, although strict containership is well known in the JavaFX
+    // API (Stage has a Scene, Scene has a Root, Parent has children), this
+    // only tells us the actual hierarchy. But it doesn't tell us anything
+    // about the virtual or "logical" hierarchy, which in the case of
+    // Control omits the Skin and adds Tooltip and ContextMenu, and in the case
+    // of some arbitrary component might be any old arbitrary thing. How does
+    // a component author encode these rules such that the tool can ask in
+    // some generic manner "please help me construct design beans based on your
+    // logical structure"?
+    public List<PropertyMetaData> getChildrenProperties();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/DisplayAction.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.DisplayItem;
+
+/**
+ * <P>A DisplayAction represents a menu item or dialog button - depending on where and how it is
+ * used.  It has a 'displayName' and a 'description' so that it can display localized text to the
+ * user.  DisplayActions may be enabled or disabled ('enabled' property) to appear grayed-out as
+ * menu items or buttons.  A DisplyAction can be 'invoked', and thus execute custom behavior when
+ * it is activated from a menu-pick or button-click.</P>
+ *
+ * <P>DisplayAction extends the DisplayItem interface, thus it includes 'displayName', 'description',
+ * 'largeIcon', and 'smallIcon' properties.</P>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.  The BasicDisplayAction class can be used for convenience.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see javax.beans.impl.BasicDisplayAction
+ */
+public interface DisplayAction extends DisplayItem {
+
+    public static final DisplayAction[] EMPTY_ARRAY = {};
+
+    /**
+     * Returns <B>true</B> if this DisplayAction should be displayed as enabled, or <B>false</B> if
+     * it should be disabled.
+     *
+     * @return <B>true</B> if this DisplayAction should be displayed as enabled, or <B>false</B> if
+     *         it should be disabled.
+     */
+    public boolean isEnabled();
+
+    /**
+     * This method is called when a DisplayAction is selected from a context menu or 'clicked' when
+     * it is displayed as a button.
+     *
+     * @return A standard Result object
+     */
+    public Result invoke();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/DisplayActionSet.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+/**
+ * <p>An extension of the DisplayAction interface that introduces a hierarchy (tree) structure.
+ * This allows a DisplayAction to become an arbitrary tree of items.  If displayed in a menu,
+ * the DisplayActionSet is either a popup item (if isPopup() returns true), or it is displayed as
+ * a flat list of items between separators.  If displayed as a button (in an option dialog), the
+ * DisplayActionSet defines a button with a popup menu on it.  Note that the 'invoke()' method will
+ * never be called in a DisplayActionSet.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface DisplayActionSet extends DisplayAction {
+
+    /**
+     * Returns the list of contained DisplayAction objects.  These will either be shown in a popup
+     * or a flat list depending on the 'isPopup' return value.
+     *
+     * @return An array of DisplayAction objects
+     */
+    public DisplayAction[] getDisplayActions();
+
+    /**
+     * Returns <code>true</code> if this DisplayActionSet should be displayed as a pop-up, or 
+     * <code>false</code> if it is should be represented as a flat container (for example, between 
+     * separators in a context menu).
+     *
+     * @return <code>true</code> if this DisplayActionSet should be displayed as a pop-up, or 
+     *         <code>false</code> if it is should be represented as a flat container (for example, 
+     *         between separators in a context menu)
+     */
+    public boolean isPopup();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/LayoutDesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import javafx.scene.layout.Pane;
+
+/**
+ * A DesignInfo which adds information about layout.
+ *
+ * @author Richard
+ */
+public interface LayoutDesignInfo<T extends Pane> extends DesignInfo<T> {
+    // What methods do we want here? Something like:
+    //      - What are the layout coords for this node
+    //      - What are the bounds for the layout position at a given x/y
+    //      - What would happen to this node if it were positioned at x/y
+    //      - Other???
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/PropertyEditor.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.tool.DesignProperty;
+import javafx.scene.Node;
+import javafx.util.StringConverter;
+
+/**
+ * <p>This interface is used by the component author to specify a custom UI for
+ * editing a specific DesignProperty. This is useful if a PropertyEditor author
+ * wishes to display a list of instances within scope, or wishes to drill-in to
+ * the object that this property is being set on, or simply wants to specify
+ * some other method for editing the property (such as input constrained
+ * text entry).</p>
+ *
+ * <p>NOTE: This class is expected to directly manipulate the property using the
+ * passed DesignProperty instance.  All type conversions to and from String are
+ * done using a StringConverter object.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to
+ * be implemented by the component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface PropertyEditor {
+
+    /**
+     * <p>When the PropetyEditor is being invoked, the matching DesignProperty
+     * will be passed in for context. This can be used to dig into the
+     * DesignBean being edited and its surrounding context. When a
+     * PropertyEditor is "finished", this method is called with
+     * <code>null</code>.</p>
+     *
+     * <p>NOTE: Any manipulation of the passed DesignProperty will
+     * *immediately* affect the underlying value and produce the appropriate
+     * code generation.</p>
+     *
+     * @param prop The DesignProperty currently being edited by this
+     *        PropertyEditor - use this to modify the property as desired.
+     */
+    public void setDesignProperty(DesignProperty prop);
+
+    //----------------------------------------------------------------------
+
+    /**
+     * Returns true if this PropertyEditor has a custom converter for the
+     * property. If no custom StringConverter is supplied, the property type
+     * is used to find one via the
+     * <code>PropertyConverterManager.findConverter(Class type)</code> method.
+     *
+     * @return boolean
+     */
+    public boolean hasCustomConverter();
+
+    /**
+     * Returns a custom StringConverter for this property. If no custom
+     * StringConverter is supplied, the property type is used to find one via
+     * the <code>PropertyConverterManager.findConverter(Class type)</code>
+     * method.
+     *
+     * @return StringConverter
+     */
+    public StringConverter getStringConverter();
+
+    //----------------------------------------------------------------------
+
+    /**
+     * Specifies whether this property editor wishes to provide custom painting
+     * of this property value.
+     *
+     * @return True if the class will honor the customPaintValue method.
+     */
+    public boolean isCustomPaintable();
+
+    /**
+     * <p>Gets a node (or hierarchy) which is used both for display and for
+     * editing of the property. The node should be resizable, since the tool
+     * will want to resize it to fit within some allocated space.</p>
+     *
+     * <p>If the PropertyEditor doesn't honor paint requests
+     * (see isCustomPaintable) this method should return null.</p>
+     */
+    public Node getCustomEditor();
+
+    //----------------------------------------------------------------------
+
+    /**
+     * Returns <code>true</code> if the user should be allowed to type a new
+     * string value in to a property sheet. This includes properties with tag
+     * items.
+     *
+     * @return boolean
+     */
+    public boolean isEditableAsString();
+
+    //----------------------------------------------------------------------
+
+//    public boolean isValueToggle();
+//    public Result toggleValue();
+
+//    public boolean hasDoubleClickAction();
+//    public Result doubleClickAction();
+
+    //----------------------------------------------------------------------
+
+    /**
+     * Returns true if this PropertyEditor has tag items (DisplayActions) to
+     * display in a drop-down list.
+     *
+     * @return boolean
+     */
+    public boolean hasTagItems();
+
+    /**
+     * Returns an array of DisplayAction that will be shown in a drop-down list.
+     */
+    public DisplayAction[] getTagItems();
+
+    //----------------------------------------------------------------------
+
+    /**
+     * Determines whether this property editor supplies a pop-up customizer.
+     *
+     * @return true if this property editor can provide a pop-up customizer.
+     */
+    public boolean hasCustomizer();
+
+    /**
+     * A PropertyEditor may choose to make available a full customizer that may
+     * access the property (or any other property) with a complex UI.
+     *
+     * @return A Customizer that will allow a human to directly edit the current
+     *         property value. May be null if this is not supported.
+     */
+    public Customizer getCustomizer();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/Result.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,418 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import java.util.ArrayList;
+
+/**
+ * <p>A Result object represents the logical result of an operation.  The <b>SUCCESS</b> and
+ * <b>FAILURE</b> Result objects are useful when returning an otherwise empty result with no user
+ * messages. <b>null</b> Results should never be returned, but if one is, it will be treated
+ * as Result.SUCCESS with no messages.</p>
+ *
+ * <p>Some Result objects may contain user messages, returned by the 'getMessages()' method.  These
+ * messages will be displayed to the user in one of three ways:</p>
+ *
+ * <p><table border="1" width="100%">
+ *   <tr>
+ *     <td><b>Status Bar</b></td>
+ *     <td>The Status Bar displays very low-importance messages.  Any ResultMessage objects of type
+ *         ResultMessage.TYPE_INFORMATION will be displayed here, as long as there are no result
+ *         options returned from the 'getResultOptions()' method.</td>
+ *   </tr>
+ *   <tr>
+ *     <td><b>Message Window</b></td>
+ *     <td>The Message Window displays more important messages than the status bar, as they are
+ *         persisted until the user clears the message window.  Any ResultMessage objects of type
+ *         ResultMessage.TYPE_WARNING will be displayed here, as long as there are no result
+ *         options returned from the 'getResultOptions()' method.</td>
+ *   </tr>
+ *   <tr>
+ *     <td><b>Message Dialog</b></td>
+ *     <td>A pop-up modal Message Dialog displays the most important messages, as the user must stop
+ *         work to 'handle' the dialog.  Any ResultMessage objects of type ResultMessage.TYPE_CRITICAL
+ *         will be displayed in an modal dialog.  If there are any result options returned from the
+ *         'getResultOptions()' method, they will be displayed as buttons in the dialog, otherwise
+ *         a default 'OK' button will be displayed.  If a Result contains messages that are less
+ *         than TYPE_CRITICAL, but result options are included - the messages will be 'upgraded' and
+ *         displayed in the model dialog, as if they were TYPE_CRITICAL.</td>
+ *   </tr>
+ * </table></p>
+ *
+ * <p>The three most important methods of this class are:  'isSuccess()', 'getMessages()', and
+ * 'getMessageOptions()'.  These are called by the IDE to investigate the details of a Result
+ * object.</p>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public class Result {
+    /**
+     * Common instance of a successful result object
+     */
+    public static final Result SUCCESS = new Result(true);
+
+    /**
+     * Common instance of a failed result object
+     */
+    public static final Result FAILURE = new Result(false);
+
+    /**
+     * Protected storage for the 'success' property
+     */
+    protected boolean success;
+
+    /**
+     * Protected storage for the message list (ResultMessage[])
+     */
+    protected ArrayList messages;
+
+    /**
+     * Protected storage for the result option list (DisplayAction[])
+     */
+    protected ArrayList options;
+
+    /**
+     * Protected storage for the 'resultDialogTitle' property
+     */
+    protected String dialogTitle;
+
+    /**
+     * Protected storage for the 'dialogHelpKey' property
+     */
+    protected String helpKey;
+
+    /**
+     * Constructs a Result object with the specified success status
+     *
+     * @param success <code>true</code> if successful, <code>false</code> if not
+     */
+    public Result(final boolean success) {
+        this.success = success;
+    }
+
+    /**
+     * Constructs a Result object with the specified success status and message
+     *
+     * @param success <code>true</code> if successful, <code>false</code> if not
+     * @param message A ResultMessage to display to the user
+     */
+    public Result(final boolean success, final ResultMessage message) {
+        this(success);
+        addMessage(message);
+    }
+
+    /**
+     * Constructs a Result object with the specified success status and messages
+     *
+     * @param success <code>true</code> if successful, <code>false</code> if not
+     * @param messages A set of ResultMessage(s) to display to the user
+     */
+    public Result(boolean success, ResultMessage[] messages) {
+        this(success);
+
+        if (messages != null) {
+            for (ResultMessage message : messages) {
+                addMessage(message);
+            }
+        }
+    }
+
+    /**
+     * Constructs a Result object with the specified success status, messages, and options
+     *
+     * @param success <code>true</code> if successful, <code>false</code> if not
+     * @param messages A set of ResultMessage(s) to display to the user
+     * @param options A set of DisplayAction(s) to present to the user as option buttons
+     */
+    public Result(final boolean success, final ResultMessage[] messages,
+        final DisplayAction[] options) {
+        this(success, messages);
+
+        if (options != null) {
+            for (DisplayAction option : options) {
+                addResultOption(option);
+            }
+        }
+    }
+
+    /**
+     * Sets the success state of this Result
+     *
+     * @param success the success state of this Result
+     */
+    public void setSuccess(final boolean success) {
+        this.success = success;
+    }
+
+    /**
+     * Returns <code>true</code> if the operation represented by this Result object was successful
+     *
+     * @return <code>true</code> if the operation was successful, <code>false</code> if not
+     */
+    public boolean isSuccess() {
+        return success;
+    }
+
+    /**
+     * Adds a ResultMessage to this Result to be displayed to the user
+     *
+     * @param message The ResultMessage to add
+     */
+    public final void addMessage(ResultMessage message) {
+        if (message == null) {
+            return;
+        }
+
+        if (messages == null) {
+            messages = new ArrayList();
+        }
+
+        if (!messages.contains(message)) {
+            messages.add(message);
+        }
+    }
+
+    /**
+     * Adds an array of ResultMessage to this Result to be displayed to the user
+     *
+     * @param messages The array of ResultMessage(s) to add
+     */
+    public void addMessages(ResultMessage[] messages) {
+        if ((messages == null) || (messages.length < 1)) {
+            return;
+        }
+
+        if (this.messages == null) {
+            this.messages = new ArrayList();
+        }
+
+        for (ResultMessage message : messages) {
+            if (!this.messages.contains(message)) {
+                this.messages.add(message);
+            }
+        }
+    }
+
+    /**
+     * Removes a ResultMessage from the set to display to the user
+     *
+     * @param message the ResultMessage to remove from the set
+     */
+    public void removeMessage(ResultMessage message) {
+        if ((messages == null) || (message == null)) {
+            return;
+        }
+
+        messages.remove(message);
+
+        if (messages.size() == 0) {
+            messages = null;
+        }
+    }
+
+    /**
+     * Removes an array of ResultMessage(s) from the set to display to the user
+     *
+     * @param messages the ResultMessage(s) to remove from the set
+     */
+    public void removeMessages(ResultMessage[] messages) {
+        if ((this.messages == null) || (messages == null) || (messages.length < 1)) {
+            return;
+        }
+
+        for (ResultMessage message : messages) {
+            this.messages.remove(message);
+        }
+
+        if (this.messages.size() == 0) {
+            this.messages = null;
+        }
+    }
+
+    /**
+     * Returns the count of ResultMessage(s) in this Result
+     *
+     * @return the count of ResultMessage(s) in this Result
+     */
+    public int getMessageCount() {
+        return (messages != null) ? messages.size() : 0;
+    }
+
+    /**
+     * Returns an (optional) set of ResultMessage objects from the completed operation.  Any
+     * ResultMessage objects will be displayed to the user either via the status-line, message
+     * window, or in a dialog - depending on several conditions outlined above.
+     *
+     * @return An array of ResultMessage objects, or null if there the operation produced no
+     *         messages
+     */
+    public ResultMessage[] getMessages() {
+        return (messages != null)
+        ? (ResultMessage[])messages.toArray(new ResultMessage[messages.size()]) : null;
+    }
+
+    /**
+     * Adds a DisplayAction to this Result to be displayed to the user as an option button in a
+     * dialog
+     *
+     * @param option The DisplayAction to add as an option button
+     */
+    public final void addResultOption(DisplayAction option) {
+        if (option == null) {
+            return;
+        }
+
+        if (options == null) {
+            options = new ArrayList();
+        }
+
+        if (!options.contains(option)) {
+            options.add(option);
+        }
+    }
+
+    /**
+     * Adds a set of DisplayAction(s) to this Result to be displayed to the user as option buttons
+     * in a dialog
+     *
+     * @param options The DisplayAction(s) to add as option buttons
+     */
+    public void addResultOptions(DisplayAction[] options) {
+        if ((options == null) || (options.length < 1)) {
+            return;
+        }
+
+        if (this.options == null) {
+            this.options = new ArrayList();
+        }
+
+        for (DisplayAction option : options) {
+            if (!this.options.contains(option)) {
+                this.options.add(option);
+            }
+        }
+    }
+
+    /**
+     * Removes a DisplayAction (option button in a dialog) from this Result
+     *
+     * @param option The DisplayAction (option button) to remove
+     */
+    public void removeResultOption(DisplayAction option) {
+        if ((options == null) || (option == null)) {
+            return;
+        }
+
+        options.remove(option);
+
+        if (options.size() == 0) {
+            options = null;
+        }
+    }
+
+    /**
+     * Removes an array of DisplayAction(s) (option buttons in a dialog) from this Result
+     *
+     * @param options The DisplayAction(s) (option buttons) to remove
+     */
+    public void removeResultOptions(DisplayAction[] options) {
+        if ((this.options == null) || (options == null) || (options.length < 1)) {
+            return;
+        }
+
+        for (DisplayAction option : options) {
+            this.options.remove(option);
+        }
+
+        if (this.options.size() == 0) {
+            this.options = null;
+        }
+    }
+
+    /**
+     * Returns the count of DisplayAction(s) in this Result which will be displayed to the user as
+     * option buttons in a dialog
+     *
+     * @return The count of option buttons to show in the dialog
+     */
+    public int getResultOptionCount() {
+        return (options != null) ? options.size() : 0;
+    }
+
+    /**
+     * Returns an (optional) set of DisplayAction objects representing options in a dialog box for
+     * the user.  If the returned array is non-null and has more than zero elements, a dialog box
+     * will automatically be shown to the user with a button for each returned DisplayAction.  When
+     * the user 'clicks' a particular button, the DisplayAction will be 'invoked()'.
+     *
+     * @return An array of DisplayAction objects representing buttons in a dialog to show the user,
+     *         or null
+     */
+    public DisplayAction[] getResultOptions() {
+        return (options != null)
+        ? (DisplayAction[])options.toArray(new DisplayAction[options.size()]) : null;
+    }
+
+    /**
+     * Sets the 'dialogTitle' property.  The Result can only trigger a dialog if there is a
+     * ResultMessage of TYPE_CRITICAL or there are result options to display.
+     *
+     * @param dialogTitle The desired title for the result dialog
+     */
+    public void setDialogTitle(final String dialogTitle) {
+        this.dialogTitle = dialogTitle;
+    }
+
+    /**
+     * Returns the 'dialogTitle' property.  The Result can only trigger a dialog if there is a
+     * ResultMessage of TYPE_CRITICAL or there are result options to display.
+     *
+     * @return The title for the result dialog
+     */
+    public String getDialogTitle() {
+        return dialogTitle;
+    }
+
+    /**
+     * Sets the 'dialogHelpKey' property.  The Result can only trigger a dialog if there is a
+     * ResultMessage of TYPE_CRITICAL or there are result options to display.
+     *
+     * @param helpKey The desired help key for the result dialog
+     */
+    public void setDialogHelpKey(final String helpKey) {
+        this.helpKey = helpKey;
+    }
+
+    /**
+     * Returns the 'dialogHelpKey' property.  The Result can only trigger a dialog if there is a
+     * ResultMessage of TYPE_CRITICAL or there are result options to display.
+     *
+     * @return The help key for the result dialog
+     */
+    public String getDialogHelpKey() {
+        return helpKey;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/ResultMessage.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.DisplayItem;
+import static com.sun.javafx.beans.design.author.ResultMessageType.*;
+import javafx.scene.image.Image;
+
+
+/**
+ * <p>A ResultMessage object represents a single message to a user about an operation that was just
+ * completed (or failed).  ResultMessage objects are created and added to Result objects when
+ * returning from an operation.</p>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see Result
+ */
+public class ResultMessage implements DisplayItem {
+    protected ResultMessageType type;
+    protected String displayName;
+    protected String description;
+    protected Image smallIcon;
+    protected Image largeIcon;
+    protected String helpKey;
+
+    /**
+     * TODO Missing javadoc
+     */
+    public ResultMessage(final ResultMessageType type, final String displayName,
+        final String description) {
+        if ((type == INFORMATION) || (type == WARNING) || (type == CRITICAL)) {
+            this.type = type;
+        } else {
+            throw new IllegalArgumentException(
+                "Message type must be TYPE_INFORMATION (0), TYPE_WARNING (1), or TYPE_CRITICAL (2)"); // NOI18N
+        }
+
+        this.type = type;
+        this.displayName = displayName;
+        this.description = description;
+    }
+
+    public ResultMessage(final ResultMessageType type, final String displayName,
+        final String description, final Image smallIcon) {
+        this(type, displayName, description);
+        this.smallIcon = smallIcon;
+    }
+
+    /**
+     * Creates a new ResultMessage object with the specified type, displayName, and description.
+     *
+     * @param type The desired type of the message: {@link ResultMessageType#INFORMATION},
+     *  {@link ResultMessageType#WARNING}, or {@link ResultMessageType#CRITICAL}.
+     * @param displayName The desired display name of the message
+     * @param description The desired description of the message
+     * @return A newly created ResultMessage object
+     */
+    public static ResultMessage create(final ResultMessageType type, final String displayName,
+        final String description) {
+        return new ResultMessage(type, displayName, description);
+    }
+
+    /**
+     * Creates a new ResultMessage object with the specified type, displayName, description, and icon.
+     *
+     * @param type The desired type of the message: {@link ResultMessageType#INFORMATION},
+     *  {@link ResultMessageType#WARNING}, or {@link ResultMessageType#CRITICAL}.
+     * @param displayName The desired display name of the message
+     * @param description The desired description of the message
+     * @param smallIcon The desired image icon for the message
+     * @return A newly created ResultMessage object
+     */
+    public static ResultMessage create(final ResultMessageType type, final String displayName,
+        final String description, final Image smallIcon) {
+        return new ResultMessage(type, displayName, description, smallIcon);
+    }
+
+    public void setMessageType(final ResultMessageType type) {
+        if ((type == INFORMATION) || (type == WARNING) || (type == CRITICAL)) {
+            this.type = type;
+        } else {
+            throw new IllegalArgumentException(
+                "Message type must be one of ResultMessageType.{INFORMATION, WARNING, CRITICAL}"); // NOI18N
+        }
+    }
+
+    public ResultMessageType getMessageType() {
+        return type;
+    }
+
+    public void setDisplayName(final String displayName) {
+        this.displayName = displayName;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public void setDescription(final String description) {
+        this.description = description;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setSmallIcon(final Image smallIcon) {
+        this.smallIcon = smallIcon;
+    }
+
+    public Image getSmallIcon() {
+        return smallIcon;
+    }
+
+    public void setLargeIcon(final Image largeIcon) {
+        this.largeIcon = largeIcon;
+    }
+
+    public Image getLargeIcon() {
+        return largeIcon;
+    }
+
+    public void setHelpKey(final String helpKey) {
+        this.helpKey = helpKey;
+    }
+
+    public String getHelpKey() {
+        return helpKey;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/author/ResultMessageType.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+
+/**
+ * Types of {@link ResultMessage}
+ * @author Tor Norbye
+ * @version 1.0
+ * @see ResultMessage
+ */
+public enum ResultMessageType {
+    /**
+     * This message is informational, and may be displayed on the status
+     * bar to the user.
+     */
+    INFORMATION, 
+    /**
+     * This message is a warning, and may be displayed on the status bar
+     * or in a dialog to the user.
+     */
+    WARNING, 
+    /**
+     * This message is critical, and will be displayed in a dialog to the
+     * user.
+     */
+    CRITICAL;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/package.html	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,201 @@
+<!--
+ Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation.  Oracle designates this
+ particular file as subject to the "Classpath" exception as provided
+ by Oracle in the LICENSE file that accompanied this code.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ or visit www.oracle.com if you need additional information or have any
+ questions.
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <title></title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+    <body>
+        <p>
+            These packages define API for working with JavaFX components at
+            design-time, predominantly within a GUI builder IDE. The API is
+            split into two parts: those APIs intended to be implemented by
+            component authors, and those APIs intended to be implemented by
+            the IDE. The strict separation between these different APIs is
+            used to create an environment where third party component authors
+            can contribute components which plug-and-play well into
+            specification compliant design tools, while remaining rich and
+            highly interactive.
+        </p>
+        <p>
+            A "Component" is a visual or non-visual JavaBean which conforms
+            either to the normal JavaBeans conventions or to the JavaFX bean
+            conventions. Any given bean is either mutable (and has a default
+            no-arg constructor with setter methods) or immutable (and has a
+            constructor accepting all args). For cases of immutable beans,
+            there should be a Builder following the standard JavaFX convention.
+            A component can be annotated to provide meta data for properties,
+            although such annotations are not presently defined. Meta data is
+            defined in the TODO:TBD package. Both visual components
+            (such as a Rectangle, Pane, or Button) and non visual components
+            (such as a Service) can be designed and configured by the GUI
+            builder.
+        </p>
+        <p>
+            The DesignInfo is the starting place for the design tool wishing to
+            work with a specific bean. The design tool has some method for
+            registering new beans with the tool. When it does so, it looks for
+            the associated DesignInfo's for the registered beans. It
+            instantiates and gets all further information about the custom
+            bean, including any relevant help information, icons, etc, from
+            the DesignInfo. Likewise, when parsing an FXML file, when a new
+            type of bean is encountered, the design tool will look for a
+            DesignInfo on the classpath for the associated bean.
+        </p>
+        <p>
+            The DesignInfo also exposes the BeanMetaData, PropertyMetaData,
+            and EventMetaData defined for some JavaBean. These meta data classes
+            can, in turn, be turned by the IDE into DesignProperty, DesignEvent,
+            and DesignBean instances. The meta-data classes contain the relevant
+            and necessary meta-data information about the bean, its properties,
+            and its events such as the name, reflective access to the
+            getter, setter, and property methods, wiring up listeners and
+            handling events. It contains information about which category
+            each property or event should be grouped under including whether a
+            property or event is preferred, hidden, or expert. It also contains
+            information about what the default value for a particular property
+            is.
+        </p>
+        <p>
+            The various DesignXXX classes (other than DesignInfo, such as
+            DesignContext, DesignProject, DesignBean, DesignProperty, and
+            DesignEvent) are representations of various constructs from the
+            tool's perspective. The tool will create instances of these classes
+            which proxy access to the raw DesignInfo, Property, meta-data, etc.
+            These classes are passed to code under the control of the component
+            author when various interaction scenarios occur such as editing
+            a property or handling drag and drop or data binding. That is, the
+            purpose of these APIs is to represent the tool to the component
+            author, while the purpose of DesignInfo is to represent the
+            component to the tool.
+        </p>
+        <p>
+            In GUI builders, there are essentially two major activities:
+            constructing the UI and hooking it up to business logic.
+            Constructing the UI consists of establishing a containment hierarchy
+            and performing layout. To establish the containment hierarchy, the
+            user may either manipulate the Hierarchy Viewer (where each
+            essential element in the hierarchy is represented in a tree) or in
+            the WYSIWYG layout area. The same DesignBeans are represented in
+            both places. As a DesignBean is dragged onto the tree or layout from
+            the palette, or as a DesignBean is dragged from one place on the
+            tree or layout  to another, the tool needs to ask for and receive
+            feedback as to relevant drop targets. When dragged over a layout
+            container in a scene, it needs to be able to ask for the expected
+            new size and position if the drop were to happen at that location,
+            such that an image representing the DesignBean could be resized
+            and positioned where it would end up being dropped.
+        </p>
+        <p>
+            Even non-visual components might have some visual representation
+            in the tool. For example, a Service might be represented in some
+            visual manner with simplified means for configuring the service. It
+            might allow you to drag and drop onto it. At some point, data
+            binding will be enabled and we will allow sources to be dragged or
+            in some other way enable a binding mode so you can see all the
+            binding interconnections.
+        </p>
+        <p>
+            In the final design, it is expected that nearly all configuration
+            for a component will be done by using annotations to describe the
+            meta-data for a component. For example, an @Bean annotation would
+            be used with a class to give it a different "displayName" or
+            "category". The @Property annotation could be used to give a
+            Property a reference to a different editor. Layout panes can be
+            configured with meta data indicating what LayoutEditor should
+            be used to provide information to the layout tool.
+        </p>
+        <p>
+            However, since adding a runtime annotation to the classes will
+            expose, via reflection, non-public API, we would like to avoid
+            using the annotations until they become proper publicly supported
+            API. As such, we are likely to hand-edit our DesignInfo classes
+            and various meta data classes. Luckily, these use reflection to
+            produce the bulk of their values.
+        </p>
+        <p>
+            The DesignInfo and various MetaData classes are immutable. As
+            such, we will introduce Builders to enable the construction of the
+            MetaData, such that you can augment the reflection-supplied values
+            as opposed to having to hand-write everything. There is not yet
+            any provision for doing this, and to be honest it might make
+            more sense to "leak" the annotations by making them runtime
+            annotations, but we'll cross that bridge when we get there.
+        </p>
+        <p>
+            
+        </p>
+
+
+
+        In the long term:
+            - Annotations are provided such that the developer can add meta-data
+              to JavaBeans, Properties, and Events. This meta-data includes
+              things like names, data types, descriptions, etc.
+            - If no DesignInfo is specified, an Introspector is capable of
+              producing a DesignInfo. It uses reflection to look for
+              properties and events on a JavaBean and generates the
+              BeanMetaData, PropertyMetaData, and EventMetaData objects.
+              If the JavaBean being inspected has annotations, those annotations
+              are considered authoritative and used to create the meta-data.
+            - If a DesignInfo is specified, then no automatic construction is
+              done. However the Introspector can be used to generate the
+              BeanMetaData, PropertyMetaData, and EventMetaData. This allows
+              the hand-written DesignInfo to still get the benefit of
+              automatically generated meta-data based on the annotations
+              on the bean.
+
+        Button:
+            - Suppose I double click the button. In such a case, I want to see
+              inline editing of the text.
+            - Suppose I drag some node either from the palette, library, or from
+              somewhere on the design canvas over the button. When I do, I would
+              expect that a drop rectangle be shown over the button indicating
+              the fact that it can accept that node as its graphic. Something
+              needs to be done in the case that the Button has its graphic
+              display property set to TEXT_ONLY or whatnot (perhaps stuff
+              cannot be dropped onto it).
+            - If I click on the button to drag it, and I click on the graphic,
+              then what? What if the graphic is something complex like an inner
+              scene?
+
+        FlowPane:
+            - When the FlowPane is selected I will want to show the padding
+              between its children, as well as any insets etc around the
+              FlowPane itself. hgap, vgap, rowVAlignment, columnHAlignment
+              all are needed to display somehow on the pane, and perhaps be
+              configurable on the pane.
+        HBox:
+            - fillHeight, spacing, alignment
+        BorderPane:
+            - Each position wants to be represented specially. Each should
+              be drawn with dashed borders separating, and anything dropped
+              in should somehow communicate how it fits within the space it
+              has been given. So what is drawn is a combination of what
+              properties are on the BorderPane itself, as well as what
+              layout properties are defined on the children.
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/ContextField.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+/**
+ *
+ * @author Tor Norbye
+ */
+public class ContextField extends ContextMember {
+    private Class type;
+
+    public ContextField(DesignContext designContext, String name, Class type) {
+        super(designContext, name);
+
+        this.type = type;
+    }
+
+    /**
+     * Get the type of this field
+     * @return The type of this field
+     */
+    public Class getType() {
+        return type;
+    }
+
+    /**
+     * Set the type of this field
+     * @param type The type of this field
+     */
+    public void setType(Class type) {
+        this.type = type;
+    }
+
+    public String toString() {
+        // TODO - include more properties?
+        return "ContextField(name=" + name + ")";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/ContextMember.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+import java.lang.reflect.Modifier;
+
+/**
+ * A ContextMember represents a ContextField or a ContextMethod that is present in
+ * a DesignContext.
+ * 
+ * @author Tor Norbye
+ */
+public abstract class ContextMember {
+    protected DesignContext designContext;
+    protected String name;
+    protected int modifiers = Modifier.PUBLIC;
+    protected String commentText;
+    protected String annotationText;
+
+    public ContextMember(DesignContext designContext, final String name) {
+        this.designContext = designContext;
+        this.name = name;
+    }
+
+    /**
+     * Returns the DesignContext associated with this DesignContext
+     *
+     * @return The DesignContext associated with this DesignContext
+     */
+    public DesignContext getDesignContext() {
+        return designContext;
+    }
+
+    /**
+     *
+     * @param designContext DesignContext
+     */
+    public void setDesignContext(final DesignContext designContext) {
+        this.designContext = designContext;
+    }
+
+    /**
+     * Returns the name of the method represented by this <code>Member</code>
+     * object, as a <code>String</code>.
+     * @see java.lang.reflect.Member#getName
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Set the name of this member
+     * @param name The name of this member 
+     */
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    /**
+     * Returns the Java language modifiers for the method represented
+     * by this <code>ContextMember</code> object, as an integer. The <code>Modifier</code> class should
+     * be used to decode the modifiers.
+     *
+     * @see java.lang.reflect.Member#getModifiers
+     * @see java.lang.reflect.Modifier
+     */
+    public int getModifiers() {
+        return modifiers;
+    }
+
+    public void setModifiers(final int modifiers) {
+        this.modifiers = modifiers;
+    }    
+    
+    /**
+     * Set the comment text associated with this member.
+     *
+     * @param commentText The comment to be associated with this member
+     */
+    public void setCommentText(final String commentText) {
+        this.commentText = commentText;
+    }
+
+    /**
+     * Get the comment text associated with this member.
+     * 
+     * @return The comment associated with this member
+     */
+    public String getCommentText() {
+        return commentText;
+    }
+
+    /**
+     * Get the annotations associated with this member, expressed as a source string.
+     * For example, a method intended to be overridden could have the annotationText
+     * set to <code>"@java.lang.Override"</code>.
+     * @return The annotations set on this member, or null if none are set
+     */ 
+    public String getAnnotationText() {
+        return annotationText;
+    }
+
+    /**
+     * Set the annotations associated with this member.
+     * @param annotationText The annotations to be set on this member, or null to remove them
+     * @see #getAnnotationText
+     */
+    public void setAnnotationText(String annotationText) {
+        this.annotationText = annotationText;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/ContextMethod.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+/**
+ * <p>The ContextMethod class represents a single source code method on a {@link DesignContext}.
+ * Use the ContextMethod class to create, update, and remove methods via the DesignContext methods:
+ * {@link DesignContext#createContextMethod(ContextMethod)},
+ * {@link DesignContext#updateContextMethod(ContextMethod)}, and
+ * {@link DesignContext#removeContextMethod(ContextMethod)}.  Use
+ * {@link DesignContext#getContextMethods()} to retrieve the list of methods on a DesignContext.</p>
+ *
+ * <p>Note that a ContextMethod object is like a simple struct in that manipulations to an instance
+ * of this class will not affect the underlying DesignContext (and source code) until the
+ * ContextMethod has been passed as an argument to one of the above DesignContext methods.  At that
+ * point, the underlying code is manipulated.</p>
+ *
+ * @author Joe Nuxoll
+ * @author Tor Norbye
+ */
+public class ContextMethod extends ContextMember {
+    private Class[] parameterTypes;
+    private String[] parameterNames;
+    private String[] parameterAnnotations;
+    private Class returnType;
+    private Class[] exceptionTypes;
+    private String methodBodyText;
+
+    /**
+     * Constructs a default ContextMethod with the given name, modifier and associated DesignContext.
+     */
+    public ContextMethod(DesignContext designContext, final String name) {
+        super(designContext, name);
+    }
+
+    /**
+     * Constructs a ContextMethod with the specified DesignContext, name, modifiers,
+     * returnType, parameterTypes, parameterNames, methodBody, and commentText.
+     *
+     * @param designContext DesignContext for this ContextMethod
+     * @param name The method name for this ContextMethod
+     * @param modifiers The method {@link Modifier} bits
+     * @param parameterTypes The parameter types for this ContextMethod
+     * @param parameterNames The parameter names for this ContextMethod
+     * @param returnType The return type for this ContextMethod
+     * @param methodBodyText The Java source code for the body of this ContextMethod
+     * @param commentText The comment text for this ContextMethod
+     */
+    public ContextMethod(final DesignContext designContext, final String name, final int modifiers,
+        final Class returnType, final Class[] parameterTypes, final String[] parameterNames,
+        final String[] parameterAnnotations, final String methodBodyText, final String commentText, 
+        final String annotationText) {
+        this(designContext, name);
+        this.commentText = commentText;
+        this.annotationText = annotationText;
+        this.modifiers = modifiers;
+
+        this.returnType = returnType;
+        this.parameterTypes = parameterTypes;
+        this.parameterNames = parameterNames;
+        this.parameterAnnotations = parameterAnnotations;
+        this.methodBodyText = methodBodyText;
+    }
+
+    /**
+     *
+     * @param returnType Class
+     */
+    public void setReturnType(final Class returnType) {
+        this.returnType = returnType;
+    }
+
+    /**
+     *
+     * @return Class
+     */
+    public Class getReturnType() {
+        return returnType;
+    }
+
+    /**
+     *
+     * @param parameterTypes Class[]
+     */
+    public void setParameterTypes(final Class[] parameterTypes) {
+        this.parameterTypes = parameterTypes;
+    }
+
+    /**
+     *
+     * @return Class[]
+     */
+    public Class[] getParameterTypes() {
+        return parameterTypes;
+    }
+
+    /**
+     *
+     * @param parameterNames String[]
+     */
+    public void setParameterNames(final String[] parameterNames) {
+        this.parameterNames = parameterNames;
+    }
+    
+    /**
+     * Get the annotations associated with the parameters expressed as
+     * source code.
+     * 
+     * @see #setParameterAnnotations
+     */
+    public String[] getParameterAnnotations() {
+        return parameterAnnotations;
+    }
+    
+    /** 
+     * Set the annotations associated with the parameters. The annotations are
+     * expressed as source code, just as is the case for {@link #getAnnotationText},
+     * and should correspond one-to-one to the parameters in {@link #getParameterNames}
+     * and {@link #getParameterTypes}. Use null for array elements that should no be
+     * annotated.
+     * @see #getParameterAnnotations
+     */
+    public void setParameterAnnotations(String[] parameterAnnotations) {
+        this.parameterAnnotations = parameterAnnotations;
+    }
+
+    /**
+     *
+     * @return String[]
+     */
+    public String[] getParameterNames() {
+        return parameterNames;
+    }
+
+    /**
+     *
+     * @param exceptionTypes Class[]
+     */
+    public void setExceptionTypes(final Class[] exceptionTypes) {
+        this.exceptionTypes = exceptionTypes;
+    }
+
+    /**
+     *
+     * @return Class[]
+     */
+    public Class[] getExceptionTypes() {
+        return exceptionTypes;
+    }
+
+    /**
+     *
+     * @param methodBodyText String
+     */
+    public void setMethodBodyText(final String methodBodyText) {
+        this.methodBodyText = methodBodyText;
+    }
+
+    /**
+     *
+     * @return String
+     */
+    public String getMethodBodyText() {
+        return methodBodyText;
+    }
+
+    public String toString() {
+        // TODO - include more properties?
+        return "ContextMethod(name=" + name + ")";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/DesignBean.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+import com.sun.javafx.beans.design.author.DesignInfo;
+import com.sun.javafx.beans.metadata.BeanMetaData;
+import com.sun.javafx.beans.metadata.EventMetaData;
+import com.sun.javafx.beans.metadata.PropertyMetaData;
+
+/**
+ * <P>A DesignBean represents an instance of a JavaBean class at design-time.  There is one
+ * DesignBean instance 'wrapping' each instance of a component class in a bean design tool. All
+ * access to properties and events should be done via the DesignBean interface at design-time, so
+ * that the tool is able to track changes and persist them.  Think of the "DesignBean" as the
+ * design-time proxy for an instance of a JavaBean.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE IDE</B> - This interface is implemented by the IDE for use by the
+ * component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface DesignBean<T> {
+
+    /**
+     * Returns the BeanInfo descriptor for this bean instance's type.
+     *
+     * @return The BeanInfo descriptor for this bean instance's type.
+     */
+    public BeanMetaData getBeanInfo();
+
+    /**
+     * Returns the DesignInfo instance for this bean instance.
+     *
+     * @return The DesignInfo instance for this bean instance.
+     */
+    public DesignInfo<T> getDesignInfo();
+
+    /**
+     * Returns the instance that this DesignBean is marshalling.
+     *
+     * @return The instance of the wrapped bean instance.
+     */
+    public T getInstance();
+
+    /**
+     * Returns the instance name of this bean - as declared in source code.
+     *
+     * @return The source code instance name of this bean.
+     */
+    public String getInstanceName();
+
+    /**
+     * Returns <code>true</code> if this instance can be renamed via this interface.
+     *
+     * @return <code>true</code> if this instance can be renamed via this interface, or 
+     *         <code>false</code> if not.
+     */
+    public boolean canSetInstanceName();
+
+    /**
+     * Renames the instance variable for this bean instance in the source code.  If successful,
+     * this method returns <code>true</code>, if there is a problem, including the existence of a
+     * duplicate instance variable name, this method returns <code>false</code>.
+     *
+     * @param name The desired source code instance name for this bean.
+     * @return <code>true</code> if the rename was successful, or <code>false</code> if not.
+     */
+    public boolean setInstanceName(String name);
+
+    /**
+     * Renames the instance variable for this bean instance in the source code, and appends an
+     * auto-incremented number.  For example:  setInstanceName("button", true) --> button1 -->
+     * button2 --> button3, etc.  If successful, this method returns <code>true</code>, if there is 
+     * a problem, this method returns <code>false</code>.
+     *
+     * @param name The desired source code instance name (base) for this bean.
+     * @param autoNumber <code>true</code> to auto-number the instance name, <code>false</code> to 
+     *        strictly attempt the specified name.
+     * @return <code>true</code> if the rename was successful, or <code>false</code> if not.
+     */
+    public boolean setInstanceName(String name, boolean autoNumber);
+
+    /**
+     * Returns the DesignContext that 'owns' this bean instance.
+     *
+     * @return The DesignContext 'owner' of this bean instance.
+     */
+    public DesignContext getDesignContext();
+
+    /**
+     * Returns the DesignBean parent of this bean instance, or null if this is a top-level bean.
+     *
+     * @return The DesignBean parent of this bean instance, or null if this is a top-level bean.
+     */
+    public DesignBean getParentBean();
+
+    /**
+     * Returns an array of DesignProperty objects representing the properties of this DesignBean.
+     *
+     * @return An array of DesignProperty objects representing the properties of this DesignBean.
+     */
+    public DesignProperty[] getProperties();
+
+    /**
+     * Returns a single DesignProperty object representing the specified property (by name).
+     *
+     * @param propertyName The name of the desired DesignProperty to retrieve.
+     * @return The DesignProperty representing the desired property, or null if the specified 
+     *         property does not exist in this DesignBean.
+     */
+    public DesignProperty getProperty(String propertyName);
+
+    /**
+     * Returns a single DesignProperty object representing the specified property (by descriptor).
+     *
+     * @param property The PropertyDescriptor of the desired DesignProperty to retrieve.
+     * @return The DesignProperty representing the desired property, or null if the specified 
+     *         property does not exist in this DesignBean.
+     */
+    public DesignProperty getProperty(PropertyMetaData property);
+
+    /**
+     * Returns an array of DesignEvent objects representing the events of this DesignBean.
+     *
+     * @return An array of DesignEvent object representing the events of this DesignBean.
+     */
+    public DesignEvent[] getEvents();
+
+    /**
+     * Returns the DesignEvent objects for a particular event set.
+     *
+     * @param eventSet The EventSetDescriptor containing the desired events.
+     * @return An array of DesignEvent objects representing the events contained in the specified
+     *         event set.
+     */
+    public DesignEvent[] getEvents(EventMetaData eventSet);
+
+    /**
+     * Returns the DesignEvent from within the specified event set and having the specified
+     * MethodDescriptor.
+     *
+     * @param eventSet The desired EventSetDescriptor
+     * @param event The desired MethodDescriptor
+     * @return The DesignEvent representing the event desired, or null if none matched criteria
+     */
+//    public DesignEvent getEvent(EventMetaData eventSet, MethodDescriptor event);
+
+    /**
+     * Returns a DesignEvent with the specified EventDescriptor.
+     *
+     * @param event The desired event's EventDescriptor
+     * @return The DesignEvent representing the event desired, or null if none matched criteria
+     */
+    public DesignEvent getEvent(EventMetaData event);
+
+    /**
+     * Returns <code>true</code> if this DesignBean can be a logical container for other 
+     * DesignBeans, or <code>false</code> if not.  For example, if a DesignBean is representing a 
+     * HtmlCommandButton instance, it will return <code>false</code> from this method, whereas a 
+     * DesignBean representing an HtmlDataTable will return <code>true</code>.  You can only add 
+     * children to a DesignBean that returns <code>true</code> from this method.
+     *
+     * @return <code>true</code> if this DesignBean is a container, and <code>false</code> if it is 
+     *         not
+     */
+    public boolean isContainer();
+
+    /**
+     * Returns <code>true</code> is this DesignBean is considered valid. This is the
+     * normal state for a DesignBean. However, after a DesignBean has been deleted,
+     * a DesignBean is no longer valid and this method will return <code>false</code>.
+     *
+     * @return <code>true</code> if the DesignBean is valid, and <code>false</code> if it is not
+     */
+    public boolean isValid();
+
+    /**
+     * Returns the count of child DesignBeans contained in this DesignBean.  Children are "logical"
+     * children in that they represent the sub-components contained inside of another component in
+     * the markup (JSP) or containership hierarchy.
+     *
+     * @return The count of DesignBean children contained by this DesignBean
+     */
+    public int getChildBeanCount();
+
+    /**
+     * Returns the child DesignBean at the specified cardinal index (zero-based).
+     *
+     * @param index The zero-based cardinal index for the desired DesignBean child
+     * @return the DesignBean at the specified index
+     */
+    public DesignBean getChildBean(int index);
+
+    /**
+     * Returns an array of DesignBean children of this DesignBean
+     *
+     * @return An array of DesignBean children of this DesignBean
+     */
+    public DesignBean[] getChildBeans();
+
+    /**
+     * Adds a DesignBeanListener event listener to this DesignBean
+     *
+     * @param beanListener the event listener to add
+     */
+    public void addDesignBeanListener(DesignBeanListener beanListener);
+
+    /**
+     * Removes a DesignBeanListener event listener from this DesignBean
+     *
+     * @param beanListener the event listener to remove
+     */
+    public void removeDesignBeanListener(DesignBeanListener beanListener);
+
+    /**
+     * Returns an array of DesignBeanListener currently listening to this DesignBean
+     * @return An array of DesignBeanListener currently listening to this DesignBean
+     */
+    public DesignBeanListener[] getDesignBeanListeners();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/DesignBeanListener.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+import java.util.EventListener;
+
+/**
+ * DesignBeanListener is the event listener interface for DesignBeans.  These methods are called
+ * when a DesignBean is changed, a DesignProperty is changed (on a DesignBean), or a DesignEvent is
+ * changed (on a DesignBean).
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see DesignBean#addDesignBeanListener(DesignBeanListener)
+ */
+public interface DesignBeanListener<T> extends EventListener {
+    /**
+     * The specified DesignBean's DesignContext has been "activated" in the project
+     *
+     * @param designBean the DesignBean who's DesignContext that has been activated
+     */
+    public void beanContextActivated(DesignBean<T> designBean);
+
+    /**
+     * The specified DesignBean's DesignContext has been "deactivated" in the project
+     *
+     * @param designBean the DesignBean who's DesignContext that has been deactivated
+     */
+    public void beanContextDeactivated(DesignBean<T> designBean);
+
+    /**
+     * The specified DesignBean's instance name was changed.  This is the source-code instance name
+     * of the bean component.
+     *
+     * @param designBean The DesignBean that has a new instance name
+     * @param oldInstanceName The old instance name
+     */
+    public void instanceNameChanged(DesignBean<T> designBean, String oldInstanceName);
+
+    /**
+     * The specified DesignBean has changed.  This represents a larger-scale change than a single
+     * property. For example, this event will be called when a bean has a child added or
+     * removed from it, or if the instance name has changed. This method will be called whenever
+     * a "more than just a property" aspect of the DesignBean has changed.
+     *
+     * @param designBean The DesignBean that has changed
+     */
+    public void beanChanged(DesignBean<T> designBean);
+
+    /**
+     * The specified DesignProperty has changed.  This could mean that a new value was set, or the
+     * property was 'unset', or anything that results in the DesignProperty being different.  The
+     * oldValue will be passed in if applicable and possible.
+     *
+     * @param prop The DesignProperty that has changed
+     * @param oldValue The prior value of the property (may be null)
+     */
+    public void propertyChanged(DesignProperty prop, Object oldValue);
+
+    /**
+     * The specified DesignEvent has changed.  This could mean that the event was hooked, unhooked,
+     * or the handler method name was changed, or anything that results in the DesignEvent being
+     * different.
+     *
+     * @param event The DesignEvent that has changed
+     */
+    public void eventChanged(DesignEvent event);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/DesignContext.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,496 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+import com.sun.javafx.beans.design.DisplayItem;
+import java.io.IOException;
+import java.net.URL;
+import javafx.util.Pair;
+
+/**
+ * <p>A DesignContext is a 'host' for DesignBean instances at design-time.  The DesignContext
+ * represents the 'source file' or 'persistence model' for a design-time session.  A DesignContext
+ * is the container (instance host) for a set of DesignBeans.  For example, in a JSF application,
+ * the DesignContext represents the logical backing file which is the combination of the 'Page1.jsp'
+ * and the 'Page1.java' files.  In a Swing application, the DesignContext represents the
+ * 'JFrame1.java' file.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE IDE</B> - This interface is implemented by the IDE for use by the
+ * component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface DesignContext extends DisplayItem {
+
+    //-------------------------------------------------------------------- DesignBean Access Methods
+
+    /**
+     * Returns the root container DesignBean for this DesignContext.  This is typically the "this"
+     * component being designed.  For example, this would be the view root in a JSF application.
+     * The children of the root container are the items you see on the page.  To get all of the
+     * DesignBeans within the scope of this context (ignoring the containership hierarchy), use
+     * the getBeans() method.
+     *
+     * @return The root container DesignBean for this DesignContext
+     * @see #getBeans()
+     */
+    public DesignBean getRootContainer();
+
+    /**
+     * Returns a DesignBean (design-time proxy) to represent the specified JavaBean instance.  This
+     * must be an instance that lives within the scope of this DesignContext, or the method will
+     * return null.
+     *
+     * @param beanInstance A live instance of a JavaBean
+     * @return A DesignBean (design-time proxy) representing the specified bean instance, or null if
+     *         the specified Object does not represent a JavaBean within the scope of this
+     *         DesignContext
+     */
+    public DesignBean getBeanForInstance(Object beanInstance);
+
+    /**
+     * Returns a DesignBean (design-time proxy) to represent the JavaBean with the specified
+     * instance name.  This must be an instance that lives within the scope of this DesignContext,
+     * or the method will return null.
+     *
+     * @param instanceName The String instance name of the desired JavaBean
+     * @return A DesignBean (design-time proxy) representing the specified bean, or null if the
+     *         specified instance name does not represent a JavaBean within the scope of this
+     *         DesignContext
+     */
+    public DesignBean getBeanByName(String instanceName);
+
+    /**
+     * Returns a DesignBean array (design-time proxies) representing the JavaBeans within the scope
+     * of this DesignContext that are assignable from the specified class type.  This uses
+     * Class.isAssignableFrom(...) to determine if a JavaBean satisfies the specified criteria, so
+     * subtypes of the specified type will be included.
+     *
+     * @param beanClass The desired class type
+     * @return An array of DesignBean representing the JavaBeans within the scope of this
+     *         DesignContext that are assignable from the specified class type
+     * @see Class#isAssignableFrom(Class)
+     */
+    public <T> DesignBean<T>[] getBeansOfType(Class<T> beanClass);
+
+    /**
+     * Returns an array of all the DesignBeans within the scope of this DesignContext.  This is a 
+     * flat list of instances, ignoring the containership hierarchy.  To navigate the containership
+     * hierarchy, use the getRootContainer() method.
+     *
+     * @return An array of DesignBean representing the JavaBeans within the scope of this 
+     *         DesignContext
+     * @see #getRootContainer()
+     */
+    public DesignBean[] getBeans();
+
+    /**
+     * Returns the Class corresponding to the Java bean of the given fully qualified class
+     * name.
+     *
+     * @param      className the fully qualified name of the desired class.
+     * @return     the <code>Class</code> object for the class with the
+     *             specified name.
+     * @exception LinkageError if the linkage fails
+     * @exception ExceptionInInitializerError if the initialization provoked
+     *            by this method fails
+     * @exception ClassNotFoundException if the class cannot be located
+     */
+    public Class findBeanClass(String className) throws ClassNotFoundException;
+
+    //-------------------------------------------------------------- DesignBean Manipulation Methods
+
+    /**
+     * Returns <code>true</code> if the specified type (beanClass) of JavaBean can be created as a 
+     * child of the specified parent DesignBean at the specified position.  This is a test call that 
+     * should be performed before calling the createBean method.
+     *
+     * @param beanClass The class of the JavaBean to be created
+     * @param parent The DesignBean parent for the JavaBean to be created
+     * @param position The desired position for the JavaBean to be created
+     * @return <code>true</code> if a matching call to 'createBean' would succeed, or 
+     *         <code>false</code> if not
+     * @see DesignContext#createBean(Class, DesignBean, Position)
+     */
+    public boolean canCreateBean(Class beanClass, DesignBean parent, Position position);
+
+    /**
+     * Creates an instance of a JavaBean of the specified type, as a child of the
+     * specified parent DesignBean at the specified position.  If successful, a DesignBean
+     * representing the newly created bean is returned.  Before this method is called, a test call
+     * should be performed to the canCreateBean method. The IDE will call
+     * {@link DesignBeanListener#beanChanged} on the parent bean if creating the bean succeeds.
+     *
+     * @param beanClass The class of the JavaBean to be created
+     * @param parent The DesignBean parent for the JavaBean to be created
+     * @param position The desired position for the JavaBean to be created
+     * @return A DesignBean representing the JavaBean that was created, or null if the operation
+     *         failed
+     * @see DesignContext#canCreateBean(Class, DesignBean, Position)
+     */
+    public <T> DesignBean<T> createBean(Class<T> beanClass, DesignBean parent, Position position);
+
+    /**
+     * Returns <code>true</code> if the specified DesignBean can be can be moved to be a child of 
+     * the specified parent DesignBean at the specified position.  This is a test call that should 
+     * be performed before calling the moveBean method.
+     *
+     * @param designBean The DesignBean to be moved
+     * @param newParent The new DesignBean parent for the DesignBean
+     * @param position The desired position for the DesignBean to be moved
+     * @return <code>true</code> if a matching call to 'moveBean' would succeed, or 
+     *         <code>false</code> if not
+     * @see #moveBean(DesignBean, DesignBean, Position)
+     */
+    public boolean canMoveBean(DesignBean designBean, DesignBean newParent, Position position);
+
+    /**
+     * Moves a DesignBean, to become a child of the specified parent DesignBean at the specified
+     * position.  Returns <code>true</code> if successful, <code>false</code> if not.  Before this 
+     * method is called, a test call should be performed to the canMoveBean method.
+     * The IDE will call {@link DesignBeanListener#beanChanged} on both the old and new parent
+     * beans if the move succeeds.
+     *
+     * @param designBean The DesignBean to move
+     * @param newParent The new DesignBean parent for the DesignBean
+     * @param position The desired position for the DesignBean to be moved
+     * @return <code>true</code> if move was successful, or <code>false</code> if not
+     * @see #canMoveBean(DesignBean, DesignBean, Position)
+     */
+    public boolean moveBean(DesignBean designBean, DesignBean newParent, Position position);
+
+    /**
+     * Returns <code>true</code> if the specified DesignBean can be can be replaced with
+     * another. This is a test call that should be performed before calling the replaceBean
+     * method.
+     *
+     * @param designBean The DesignBean to be replaced
+     * @param newDesignBean The DesignBean that will replace the original DesignBean
+     * @return <code>true</code> if a matching call to 'replaceBean' would succeed, or 
+     *         <code>false</code> if not
+     * @see #replaceBean(DesignBean, DesignBean)
+     */
+    public boolean canReplaceBean(DesignBean designBean, DesignBean newDesignBean);
+
+    /**
+     * Replaces a given DesignBean with another. The replaced DesignBean will be deleted.
+     * The new DesignBean will be moved from its current position to the position of the
+     * original design bean.
+     * Returns <code>true</code> if successful, <code>false</code> if not.  Before this 
+     * method is called, a test call should be performed to the canReplaceBean method.
+     * (And canReplaceBean will call canMoveBean on the new bean to ensure that the
+     * move is valid.)
+     * The IDE will call {@link DesignBeanListener#beanChanged} on the parent if the 
+     * replacement succeeds.
+     *
+     * @param designBean The DesignBean to be replaced
+     * @param newDesignBean The DesignBean that will replace the original DesignBean
+     * @return <code>true</code> if replacement was successful, or <code>false</code> if not
+     * @see #canReplaceBean(DesignBean, DesignBean)
+     */
+    public boolean replaceBean(DesignBean designBean, DesignBean newDesignBean);
+
+    /**
+     * Copies a set of DesignBean instances into a clipboard-like format.  This returns a
+     * Transferable object that stores all the necessary data for the pasteBeans method.
+     *
+     * @param designBeans An array of desired DesignBean instances
+     * @return the resulting Transferable object representing the copied beans
+     * @see #pasteBeans(java.awt.datatransfer.Transferable, DesignBean, Position)
+     */
+//    public Transferable copyBeans(DesignBean[] designBeans);
+
+    /**
+     * Pastes a set of DesignBean instances (acquired via copyBeans) into the specified parent
+     * DesignBean at the specified position.  This returns an array of DesignBean(s), representing
+     * the newly pasted children.
+     * The IDE will call {@link DesignBeanListener#beanChanged} on the parent bean after the beans
+     * have been pasted.
+     *
+     * @param persistData The Transferable object acquired via 'copyBeans' that contains the data
+     *        representing the DesignBean(s) to be pasted
+     * @param newParent The desired new parent DesignBean to paste the DesignBean(s) into
+     * @param position The desired new position for the pasted DesignBean(s)
+     * @return The newly created DesignBean instances
+     * @see #copyBeans(DesignBean[])
+     */
+//    public DesignBean[] pasteBeans(Transferable persistData, DesignBean newParent, Position position);
+
+    /**
+     * Deletes a DesignBean object (and removes all persistence).  Returns <code>true</code> if the 
+     * delete was successful, <code>false</code> if not.
+     * The IDE will call {@link DesignBeanListener#beanChanged} on the parent if the deletion succeeded.
+     *
+     * @param designBean The desired DesignBean to delete
+     * @return <code>true</code> if the delete operation was successful, <code>false</code> if not
+     */
+    public boolean deleteBean(DesignBean designBean);
+
+    //------------------------------------------------------------------------- Context Data Methods
+
+    /**
+     * <p>Sets a name-value pair of data on this DesignContext.  This name-value pair will be stored
+     * in the associated project file (as text) that contains this DesignContext, so this data is
+     * retrievable in a future IDE session.</p>
+     *
+     * <p>NOTE: The 'data' Object must be a Java Bean, such as a String, or a List (containing
+     *  only JavaBeans, etc.). The IDE may rely on Java Beans persistence
+     * to store the data in the project.</p>
+     *
+     * @param key The key to store the data object under
+     * @param data The data object to store - this must be a JavaBean, such as a String, or a Collection
+     *    of Colors
+     * @see #getContextData(Key)
+     */
+    public <K,V> void setContextData(Pair<K,V> pair);
+
+    /**
+     * <p>Retrieves the value for a name-value pair of data on this DesignContext.  This name-value
+     * pair is stored in the associated project file (as text) that contains this DesignContext, so
+     * this data is retrievable in any IDE session once it has been set.</p>
+     *
+     * <p>NOTE: The 'data' Object must be a Java Bean, such as a String, or a List (containing
+     *  only JavaBeans, etc.). The IDE may rely on Java Beans persistence
+     * to store the data in the project.</p>
+     *
+     * @param key The desired key to retrieve the data object for
+     * @return The data object that is currently stored under this key - this must be a JavaBean, 
+     *   such as a String, or a Collection of Colors
+     * @see #setContextData(Key, Object)
+     * @see Constants.ContextData
+     */
+    public <K,V> V getContextData(K key);
+
+    //----------------------------------------------------------------------------- Resource Methods
+
+    /**
+     * Adds a resource reference to this DesignContext, and converts the external URL into a local
+     * resource identifier String.  This may also copy (if specified) an external resource into the
+     * project.
+     *
+     * @param resource A URL pointing to the desired external resource
+     * @param copy <code>true</code> if the resource should be copied into the project, 
+     *        <code>false</code> if not
+     * @throws IOException if the resource cannot be copied
+     * @return The resulting relative resource identifier String.  This will be a local relative
+     *         resource if the external resource was copied into the project.
+     */
+    public String addResource(URL resource, boolean copy) throws IOException;
+
+    /**
+     * Resolves a local resource identifier String into a fully-qualified URL.
+     *
+     * @param localResource A local resource identifier string
+     * @return A fully-qualified URL
+     */
+    public URL resolveResource(String localResource);
+
+    //----------------------------------------------------------------------- Context Method Methods
+
+    /**
+     * Returns a set of {@link ContextMember} objects describing the fields and methods declared on this
+     * DesignContext (source file).
+     *
+     * @return An array of {@link ContextMember} objects, describing the fields and methods declared on this
+     * DesignContext (source file)
+     */
+    public ContextMember[] getContextMembers();
+
+    /**
+     * Returns a {@link ContextMethod} object describing the method with the specified name and
+     * parameter types.  Returns <code>null</code> if no method exists on this DesignContext with
+     * the specified name and parameter types.
+     *
+     * @param methodName The method name of the desired context method
+     * @param parameterTypes The parameter types of the desired context method
+     * @return A ContextMethod object describing the requested method, or <code>null</code> if no
+     *         method exists with the specified name and parameter types
+     */
+    public ContextMethod getContextMethod(String methodName, Class[] parameterTypes);
+
+    /**
+     * Returns a {@link ContextField} object describing the field with the specified name.
+     * Returns <code>null</code> if no method exists on this DesignContext with the specified name.
+     *
+     * @param fieldName The field name of the desired context method
+     * @return A ContextField object describing the requested field, or <code>null</code> if no
+     *         field exists with the specified name
+     */
+    public ContextField getContextField(String fieldName);
+    
+    /**
+     * <p>Creates a new method or field in the source code for this DesignContext.  The passed 
+     * ContextMember <strong>must</strong> specify at least the designContext and name, and <strong>must
+     * not</strong> describe a method or field that already exists in the DesignContext source.  To update
+     * an existing member, use the <code>updateContextMember()</code> method.  These methods are
+     * separated to help prevent accidental method overwriting.  The following table
+     * details how the specified ContextMember is used for this method:</p>
+     *
+     * <p><table border="1">
+     * <tr><th>designContext <td><strong>REQUIRED.</strong> Must match the DesignContext that is
+     *         being called.  This is essentially a safety precaution to help prevent accidental
+     *         method overwriting.
+     * <tr><th>name <td><strong>REQUIRED.</strong> Defines the method name.
+     * <tr><th>modifiers <td>Defines the method modifiers.  Use {@link java.lang.reflect.Modifier}
+     *         to define the modifier bits.  If <code>0</code> is specified (no modifier bits), then
+     *         a public method is created.
+     * <tr><th>returnType <td>(ContextMethods only) Defines the return type.  If <code>null</code> is specified, the
+     *         created method will have a <code>void</code> return type.
+     * <tr><th>type <td>(ContextFields only) Defines the field type.  Should never be <code>null</code>.
+     * <tr><th>parameterTypes <td>(ContextMethods only) Defines the parameter types.  If <code>null</code> or an empty
+     *         array is specified, the created method will have no arguments.
+     * <tr><th>parameterNames <td>(ContextMethods only) Defines the parameter names.  If <code>null</code> or an empty
+     *         array is specified (or an array shorter than the parameterTypes array), default
+     *         argument names will be used.
+     * <tr><th>exceptionTypes <td>(ContextMethods only) Defines the throws clause exception types.  If <code>null</code>
+     *         is specified, the created method will have no throws clause.
+     * <tr><th>methodBodyText <td>(ContextMethods only) Defines the method body Java source code.  If <code>null</code> is
+     *         specified, the method will have an empty body.  If the value is non-null, this must
+     *         represent valid (compilable) Java source code.
+     * <tr><th>commentText <td>Defines the comment text above the newly created method.  If
+     *         <code>null</code> is specified, no comment text will be included.
+     * </table></p>
+     *
+     * @param method A ContextMember object representing the desired method.
+     * @return <code>true</code> if the member was created successfully, or <code>false</code> if
+     *         it was not.
+     * @throws IllegalArgumentException If there was a syntax error in any of the ContextMember
+     *         settings, or if the ContextMember represents a member that already exists on this
+     *         DesignContext (<code>updateContextMember()</code> must be used in this case to avoid
+     *         accidental member overwriting)
+     * 
+     * @see ContextMethod
+     * @see ContextField
+     */
+    public boolean createContextMember(ContextMember method) throws IllegalArgumentException;
+
+    /**
+     * <p>Updates an existing member in the source code for this DesignContext.  The passed
+     * ContextMember will be used to locate the desired member to update using the designContext,
+     * name, and (if applicable) parameterTypes.  This method may only be used to update the modifiers, 
+     * type or returnType, parameterNames, exceptionTypes, methodBodyText, or commentText.  Any other changes
+     * actually constitute the creation of a new method, as they alter the method signature.  To
+     * create a new method, the <code>createContextMember()</code> method should be used.  These
+     * operations are separated to help prevent accidental member overwriting.  The following table
+     * details how the specified ContextMember is used for this method:</p>
+     *
+     * <p><table border="1">
+     * <tr><th>designContext <td><strong>REQUIRED.</strong> Must match the DesignContext that is
+     *         being called.  This is essentially a safety precaution to help prevent accidental
+     *         method overwriting.
+     * <tr><th>name <td><strong>REQUIRED.</strong> Specifies the desired method name.
+     * <tr><th>modifiers <td>Defines the method modifiers.  Use {@link java.lang.reflect.Modifier}
+     *         to define the modifier bits.
+     * <tr><th>returnType <td>(ContextMethods only) Defines the method's return type.  If <code>null</code> is specified,
+     *         the method is assumed to have a <code>void</code> return type.
+     * <tr><th>type <td>(ContextFields only) Defines the field type.  Should never be <code>null</code>.
+     * <tr><th>parameterTypes <td>(ContextMethods only) <strong>REQUIRED.</strong> Specifies the desired method's
+     *         parameter types (if it has any).  If <code>null</code> or an empty array is
+     *         specified, the desired method is assumed to have zero arguments.
+     * <tr><th>parameterNames <td>(ContextMethods only) Defines the parameter names.  If <code>null</code> or an empty
+     *         array is specified (or an array shorter than the parameterTypes array), default
+     *         argument names will be used.
+     * <tr><th>exceptionTypes <td>(ContextMethods only) Defines the throws clause exception types.  If <code>null</code>
+     *         is specified, the resulting method will have no throws clause.
+     * <tr><th>methodBodyText <td>(ContextMethods only) Defines the method body Java source code.  If <code>null</code> is
+     *         specified, the resulting method body will be empty.  If the value is non-null, this
+     *         must represent valid (compilable) Java source code.  Note that a method with a
+     *         non-void return type <strong>must</strong> return a value.
+     * <tr><th>commentText <td>Defines the comment text above the newly created method.  If
+     *         <code>null</code> is specified, no comment text will be included.
+     * </table></p>
+     *
+     * @todo Clean this documentation up. The table should not be necessary. The ContextMembers
+     *   should do this.
+     * 
+     * @param method The desired ContextMember representing the method to be updated
+     * @return The resulting ContextMember object (including any updates from the process)
+     * @throws IllegalArgumentException If there was a syntax error in any of the ContextMember
+     *         settings, or if the ContextMember does not exist in this DesignContext.
+     */
+    public ContextMember updateContextMember(ContextMember method) throws IllegalArgumentException;
+
+    /**
+     * <p>Removes an existing member from the source code for this DesignContext.  The passed
+     * ContextMember will be used to locate the desired member to remove using the designContext,
+     * name, and (if applicable) parameterTypes.  No other portions of the ContextMember are used.  The
+     * following table details how the specified ContextMember is used:</p>
+     *
+     * <p><table border="1">
+     * <tr><th>designContext <td><strong>REQUIRED.</strong> Must match the DesignContext that is
+     *         being called.  This is essentially a safety precaution to help prevent accidental
+     *         method removal.
+     * <tr><th>name <td><strong>REQUIRED.</strong> Specifies the desired method name.
+     * <tr><tr>modifiers <id>Ignored.
+     * <tr><th>type/returnType <td>Ignored.
+     * <tr><th>parameterTypes <td>(ContextMethods only) <strong>REQUIRED.</strong> Specifies the desired method's
+     *         parameter types (if it has any).  If <code>null</code> or an empty array is
+     *         specified, the desired method is assumed to have zero arguments.
+     * <tr><th>parameterNames <td>Ignored.
+     * <tr><th>exceptionTypes <td>Ignored.
+     * <tr><th>methodBodyText <td>Ignored.
+     * <tr><th>commentText <td>Ignored.
+     * </table></p>
+     *
+     * @param method A ContextMember object defining the field or method to be removed
+     * @return <code>true</code> if the method was successfully removed
+     * @exception IllegalArgumentException if the specified ContextMember does not exist on this
+     *            DesignContext
+     */
+    public boolean removeContextMember(ContextMember method);
+
+    //------------------------------------------------------------------------ Project Access Method
+
+    /**
+     * Returns the project, which is the top-level container for all contexts.
+     *
+     * @return The DesignProject associated with this DesignContext
+     */
+    public DesignProject getProject();
+
+    //------------------------------------------------------------------- Event Registration Methods
+
+    /**
+     * Adds a listener to this DesignContext
+     *
+     * @param listener The desired listener to add
+     */
+    public void addDesignContextListener(DesignContextListener listener);
+
+    /**
+     * Removes a listener from this DesignContext
+     *
+     * @param listener The desired listener to remove
+     */
+    public void removeDesignContextListener(DesignContextListener listener);
+
+    /**
+     * Returns the array of current listeners to this DesignContext
+     *
+     * @return An array of listeners currently listening to this DesignContext
+     */
+    public DesignContextListener[] getDesignContextListeners();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/DesignContextListener.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+/**
+ * DesignContextListener is the event listener interface for DesignContexts.  These methods are called
+ * when a DesignBean is created, deleted, changed, or moved.  This includes the DesignBeanListener
+ * methods as well, so effectively a DesignContextListener is a listener to *all* DesignBeans in a
+ * context.
+ *
+ * <p><b>GLOBAL CONTEXT LISTENERS:</b>  If you wish to provide a global IDE-wide
+ * DesignContextListener, you can declare the following static method in your DesignInfo class.
+ * When the DesignInfo for your bean is loaded, this static method will be looked for via
+ * reflection and called if it exists:</p>
+ *
+ * <code>
+ *    public static DesignContextListener getGlobalDesignContextListener() { ... }
+ * </code>
+ *
+ * <p>If this methods is declared in a DesignInfo implementation class, it will be called when the
+ * DesignInfo is loaded, and added to a static list of global listeners. This listener will be
+ * notified of *every* event that happens in the IDE, so please use sparingly!</p>
+ *
+ * <P><B>IMPLEMENTED BY THE COMPONENT AUTHOR</B> - This interface is designed to be implemented by
+ * the component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface DesignContextListener extends DesignBeanListener {
+    /**
+     * A DesignContext has been "activated" in the project
+     *
+     * @param context the DesignContext that has been activated
+     */
+    public void contextActivated(DesignContext context);
+
+    /**
+     * A DesignContext has been "deactivated" in the project
+     *
+     * @param context the DesignContext that has been deactivated
+     */
+    public void contextDeactivated(DesignContext context);
+
+    /**
+     * Something at the context-level changed.  This is a large-grain change like a file rename or
+     * something that cannot be represented by one of the smaller-grain methods.
+     *
+     * @param context DesignContext The DesignContext that changed
+     */
+    public void contextChanged(DesignContext context);
+
+    /**
+     * A new DesignBean has been created.  This corresponds to a new instance bean being dropped from
+     * the palette or programmatically created via the Design-Time API.
+     *
+     * @param designBean DesignBean The newly created DesignBean
+     */
+    public void beanCreated(DesignBean designBean);
+
+    /**
+     * A DesignBean has been deleted.
+     *
+     * @param designBean DesignBean The DesignBean that was deleted.  At this point, it is a goner, so any
+     *        manipulations done to the passed bean will be tossed out immediately after this method
+     *        returns
+     */
+    public void beanDeleted(DesignBean designBean);
+
+    /**
+     * A DesignBean was moved either within its parent DesignBean, or to another parent DesignBean.
+     *
+     * @param designBean DesignBean The DesignBean that was moved
+     * @param oldParent DesignBean The old parent DesignBean (may match the new parent)
+     * @param pos Position The new parent DesignBean (may match the old parent)
+     */
+    public void beanMoved(DesignBean designBean, DesignBean oldParent, Position pos);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/DesignEvent.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+import com.sun.javafx.beans.metadata.EventMetaData;
+
+/**
+ * <p>A DesignEvent represents a single event listener method (and possibly handler) on a single
+ * instance of a DesignBean at design-time.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE IDE</B> - This interface is implemented by the IDE for use by the
+ * component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ */
+public interface DesignEvent {
+
+    /**
+     * Returns the EventDescriptor that defines the meta-data for this DesignEvent
+     *
+     * @return The EventDescriptor that defines teh meta-data for this DesignEvent
+     */
+    public EventMetaData getEventDescriptor();
+
+    /**
+     * Returns the DesignBean that owns this DesignEvent
+     *
+     * @return the DesignBean that owns this DesignEvent
+     */
+    public DesignBean getDesignBean();
+
+    /**
+     * Returns the default event handler method name.  For example on a Button component's 'click'
+     * event, the default handler name might be "button1_click".
+     *
+     * @return the default event handler method name, same as setHandlerName would use if passed null
+     */
+    public String getDefaultHandlerName();
+
+    /**
+     * Sets the method name for this DesignEvent.  If the event is not currently 'hooked', this will
+     * 'hook' it and add the required wiring to direct the event handler code to this method name.
+     * If 'null' is passed as the handlerName, then the default event handler method name will be
+     * used.
+     *
+     * @param handlerMethodName The desired event handler method name - may be null to use default
+     *        event handler method name
+     * @return <code>true</code> if the event was successfully 'hooked', and the specified name was unique
+     */
+    public boolean setHandlerName(String handlerMethodName);
+
+    /**
+     * Returns the current event method handler name, or null if the event is currently not 'hooked'
+     *
+     * @return the current event method handler name, or null if the event is currently not 'hooked'
+     */
+    public String getHandlerName();
+
+    /**
+     * Returns <code>true</code> if this DesignEvent is currently 'hooked', or <code>false</code> 
+     * if it is not.
+     *
+     * @return <code>true</code> if this DesignEvent is currently 'hooked', or <code>false</code> 
+     *         if it is not
+     */
+    public boolean isHandled();
+
+    /**
+     * Removes and unwires an event handler method from this DesignEvent, if one exists.  Returns
+     * <code>true</code> if successful, <code>false</code> if not.
+     *
+     * @return <code>true</code> if successful, <code>false</code> if not
+     */
+    public boolean removeHandler();
+
+    /**
+     * Sets the Java source for the method body of the handler method.  This is expected to be valid
+     * Java source to be injected into the body of this event handler method.  If it is not, an
+     * IllegalArgumentException is thrown.
+     *
+     * @param methodBody The Java source for the method body of this event handler method
+     * @throws IllegalArgumentException thrown if the Java source is invalid
+     */
+    public void setHandlerMethodSource(String methodBody) throws IllegalArgumentException;
+
+    /**
+     * Returns the Java source code from the body of the handler method
+     *
+     * @return the Java source code from the body of the handler method
+     */
+    public String getHandlerMethodSource();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/DesignProject.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+import com.sun.javafx.beans.design.DisplayItem;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Map;
+import javafx.util.Pair;
+
+/**
+ * <p>A DesignProject is a top-level container for DesignContexts at design-time.  The DesignProject
+ * represents the project in the IDE.  Not much can be done with Projects in the Design-Time API for
+ * JavaBeans, except for accessing DesignContexts and resources, listening to project-level events,
+ * and storing project-level and global data.  Check <code>instancoef</code> to see if this
+ * DesignProject class is from a specific IDE to access more extensive "project" functionality.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE IDE</B> - This interface is implemented by the IDE for use by the
+ * component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see DesignContext#getProject()
+ */
+public interface DesignProject extends DisplayItem {
+
+    //------------------------------------------------------------------------ DesignContext Methods
+
+    /**
+     * Returns all the DesignContexts in this project.  There will be one DesignContext for each
+     * designable file in the project.  Note that for JSF, this means one DesignContext for each
+     * combination of "PageX.java" and "PageX.jsp" file, as well as one for each of the non-page
+     * beans, like "SessionBeanX.java", "ApplicationBeanX.java", etc.
+     *
+     * @return An array of DesignContext objects - one for each designable file in the project
+     */
+    public DesignContext[] getDesignContexts();
+
+    /**
+     * Creates a new DesignContext (backing file) in this project.
+     *
+     * @param className The desired fully-qualified class name for the file
+     * @param baseClass The desired base class for the file
+     * @param contextData A Map of context data to apply to the newly created context file
+     * @return The newly created DesignContext, or null if the operation was unsuccessful
+     */
+    public DesignContext createDesignContext(String className, Class baseClass, Map contextData);
+
+    /**
+     * Removes an existing DesignContext (backing file) from this project.
+     *
+     * @param context The desired DesignContext to remove from the project
+     * @return <code>true</code> if the operation was successful, <code>false</code> if not
+     */
+    public boolean removeDesignContext(DesignContext context);
+
+    //----------------------------------------------------------------------------- Resource Methods
+
+    /**
+     * <p>Returns the set of project root relative resources in this project as an array of local
+     * resource identifiers.  The returned URIs will always be paths from the project root,
+     * including folder hierarchy within the project.  The specified <code>rootPath</code> is used
+     * as a filter, to allow drilling-in to directories as desired.  Use
+     * <code>URI.relativize()</code> to make relative URIs when needed.  Use
+     * <code>getResourceFile(URI)</code> to retrieve a File object for a particular resource in
+     * the project.</p>
+     *
+     * @param rootPath The root path to fetch resources underneath.  Passing <code>null</code> will
+     *        start at the root of the project.
+     * @param recurseFolders <code>true</code> to include the sub-resources inside of any folders
+     * @return A project root relative array of URIs representing all the resource files under the
+     *         specified root path
+     */
+    public URI[] getResources(URI rootPath, boolean recurseFolders);
+
+    /**
+     * Returns a File object containing the specified resource.
+     *
+     * @param resourceUri The desired project relative resource URI to fetch a file object
+     * @return A File object containing the project resource
+     */
+    public File getResourceFile(URI resourceUri);
+
+    /**
+     * Copies a resource into this project, and converts the external URL into a local URI
+     * (resource identifier string).
+     *
+     * @param sourceUrl A URL pointing to the desired external resource
+     * @param targetUri The desired resource URI (path) within the project directory
+     * @return The resulting project relative resource URI (resourceUri)
+     * @throws IOException if the resource cannot be copied
+     */
+    public URI addResource(URL sourceUrl, URI targetUri) throws IOException;
+
+    /**
+     * Removes a resource from the project directory.
+     *
+     * @param resourceUri The desired resource to remove from the project
+     * @return boolean <code>true</code> if the resource was successfully removed,
+     *         <code>false</code> if not
+     */
+    public boolean removeResource(URI resourceUri);
+
+    //------------------------------------------------------------------------- Project Data Methods
+
+    /**
+     * <p>Sets a name-value pair of data on this DesignContext.  This name-value pair will be stored
+     * in the associated project file, so this data is retrievable in a future IDE session.</p>
+     *
+     * <p>NOTE: The 'data' Object must be a Java Bean, such as a String, or a List (containing
+     *  only JavaBeans, etc.). The IDE may rely on Java Beans persistence
+     * to store the data in the project.</p>
+     *
+     * @param key The key to store the data object under
+     * @param data The data object to store - this must be a JavaBean, such as a String, or a Collection
+     *    of Colors
+     * @see #getProjectData(Key)
+     */
+    public <K,V> void setProjectData(Pair<K,V> pair);
+
+    /**
+     * <p>Retrieves the value for a name-value pair of data on this DesignProject.  This name-value
+     * pair is stored in the project file, so this data is retrievable in any IDE session once it
+     * has been set.</p>
+     *
+     * <p>NOTE: The 'data' Object must be a Java Bean, such as a String, or a List (containing
+     *  only JavaBeans, etc.). The IDE may rely on Java Beans persistence
+     * to store the data in the project.</p>
+     *
+     * @param key The desired key to retrieve the data object for
+     * @return The data object that is currently stored under this key - this must be a JavaBean,
+     *   such as a String, or a Collection of Colors
+     * @see #setProjectData(Key, Object)
+     */
+    public <K,V> V getProjectData(K key);
+
+    //-------------------------------------------------------------------------- Global Data Methods
+
+
+    /**
+     * <p>Sets a global name-value pair of data.  This name-value pair will be stored in the
+     * associated user settings file (as text), so this data is retrievable in a future IDE
+     * session.</p>
+     *
+     * <p>NOTE: The 'data' Object must be a Java Bean, such as a String, or a List (containing
+     *  only JavaBeans, etc.). The IDE may rely on Java Beans persistence
+     * to store the data in the project.</p>
+     *
+     * @param key The key to store the data object under
+     * @param data The data object to store - this must be a JavaBean, such as a String, or a Collection
+     *    of Colors
+     * @see #getGlobalData(Key)
+     */
+    public <K,V> void setGlobalData(Pair<K,V> pair);
+
+    /**
+     * <p>Retrieves the value for a global name-value pair of data.  This name-value pair will be
+     * stored in the associated user settings file (as text), so this data is retrievable in any
+     * IDE session once it has been set.</p>
+     *
+     * <p>NOTE: The 'data' Object must be a Java Bean, such as a String, or a List (containing
+     *  only JavaBeans, etc.). The IDE may rely on Java Beans persistence
+     * to store the data in the project.</p>
+     *
+     * @param key The desired key to retrieve the data object for
+     * @return The data object that is currently stored under this key - this must be a JavaBean,
+     *   such as a String, or a Collection of Colors
+     * @see #setGlobalData(Key, Object)
+     */
+    public <K,V> V getGlobalData(K key);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/DesignProperty.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+import com.sun.javafx.beans.metadata.PropertyMetaData;
+
+/**
+ * <p>A DesignProperty represents a single property (setter/getter method pair) on a single instance
+ * of a DesignBean at design-time.  All manipulation of properties at design-time should be done via
+ * this interface.  This allows the IDE to both persist the changes as well as reflect them in the
+ * design-time session.</p>
+ *
+ * <P><B>IMPLEMENTED BY THE IDE</B> - This interface is implemented by the IDE for use by the
+ * component (bean) author.</P>
+ *
+ * @author Joe Nuxoll
+ * @version 1.0
+ * @see DesignBean#getProperties()
+ * @see DesignBean#getProperty(String)
+ */
+public interface DesignProperty {
+
+    /**
+     * Returns the PropertyDescriptor associated with this DesignProperty
+     *
+     * @return the PropertyDescriptor associated with this DesignProperty
+     */
+    public PropertyMetaData getPropertyDescriptor();
+
+    /**
+     * Returns the DesignBean that this DesignProperty is associated with
+     *
+     * @return the DesignBean that this DesignProperty is associated with
+     */
+    public DesignBean getDesignBean();
+
+    /**
+     * Returns the current value of this DesignProperty.  The returned value is the *actual* value
+     * that the design-time instance of the DesignBean has set for this property.
+     *
+     * @return the current value of this DesignProperty
+     */
+    public Object getValue();
+
+    /**
+     * Sets the current value of this DesignProperty.  This will set the *actual* value of this
+     * property on the design-time instance of this DesignBean.  The associated PropertyEditor will
+     * be used to produce the appropriate Java or markup code to set the property.  Calling this
+     * method results in the persistence being written, and will cause the backing file buffer to
+     * become "dirty".
+     *
+     * @param value The Object value to set as the current value of this property
+     * @return <code>true</code> if the property setting was successful, <code>false</code> if it 
+     *         was not
+     * @see java.beans.PropertyEditor
+     */
+    public boolean setValue(Object value);
+
+    /**
+     * Returns the source-persistence String value of this property.  This is the value that
+     * the associated PropertyEditor would use to persist the property's current value in source
+     * code.
+     *
+     * @return the source-persistence String value of this property
+     * @see java.beans.PropertyEditor#getJavaInitializationString()
+     */
+    public String getValueSource();
+
+    /**
+     * Sets the source-persistence String value for this property.  This is the value that will
+     * actually appear in Java source code (or markup), depending on how the property setting is
+     * persisted.
+     *
+     * @param source the source-persistence String value for this property
+     * @return <code>true</code> if the property source setting was successful, <code>false</code> 
+     *         if not
+     */
+    public boolean setValueSource(String source);
+
+    /**
+     * Returns the value that this property would have if it were unset.  This is the property's
+     * original (default) state, which is determined by reading the property value on a fresh 
+     * instance of the associated class (that owns this property).
+     * 
+     * @return The unset (default) value for this property
+     */
+    public Object getUnsetValue();
+
+    /**
+     * Removes the property setting (if it exists) from the source code, and reverts the property
+     * setting back to its original (default) state.  The original state is determined by reading
+     * the property value on a fresh instance of the associated class (that owns this property),
+     * and reading the default value of the property.
+     *
+     * @return <code>true</code> if the unset operation was successful, <code>false</code> if not
+     */
+    public boolean unset();
+
+    /**
+     * Returns <code>true</code> if this DesignProperty has been modified from the 'default' value.
+     * A 'modified' property is one that differs in value (== and .equals()) from a newly 
+     * constructed instance of the DesignBean.
+     *
+     * @return <code>true</code> if this DesignProperty has been modified from the 'default' value, 
+     *         <code>false</code> if not
+     */
+    public boolean isModified();
+    
+    /**
+     * Returns <code>true</code> if this DesignProperty has been assigned a value. 
+     * This method differs from {@link #isModified} in that a value may be set to the
+     * default value, in which case {@link #isModified} would return false, and this method would return
+     * true. However, a property which has not been defined will also not be modified, so !isDefined
+     * implies !isModified.
+     *
+     * @return <code>true</code> is this DesignProperty has been assigned any value,
+     *         <code>false</code> if not.
+     */
+    public boolean isDefined();
+
+    /**
+     * Returns the parent property that this property is a child of.  This may be null if this is
+     * a top-level property.
+     * 
+     * @return Parent DesignProperty for this DesignProperty
+     */
+    public DesignProperty getParentProperty();
+
+    /**
+     * Returns an array of DesignProperty objects representing the sub-properties of this property
+     * based on the static type of this property.
+     *
+     * @return An array of DesignProperty objects representing the sub-properties of this property
+     */
+    public DesignProperty[] getProperties();
+
+    /**
+     * Returns a single DesignProperty object representing the specified sub-property (by name).
+     *
+     * @param propertyName The name of the desired sub-property to retrieve.
+     * @return The DesignProperty representing the desired property, or null if the specified 
+     *         property does not exist as a child of this property.
+     */
+    public DesignProperty getProperty(String propertyName);
+
+    /**
+     * Returns a single DesignProperty object representing the specified sub-property (by descriptor).
+     *
+     * @param property The PropertyDescriptor of the desired sub-property to retrieve.
+     * @return The DesignProperty representing the desired property, or null if the specified 
+     *         property does not exist as a child of this property.
+     */
+    public DesignProperty getProperty(PropertyMetaData property);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/LinearPosition.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+
+/**
+ * <p>A descriptor that identifies the position of a DesignBean within its container.</p>
+ *
+ * @author Carl Quinn
+ * @author Tor Norbye
+ * @version 1.0
+ */
+public class LinearPosition extends Position {
+    /**
+     * Protected storage field for the index property.
+     */
+    protected int index;
+
+    /**
+     * Constructs a Position object with the default index (-1: unspecified)
+     */
+    public LinearPosition() {
+        index = -1; // < 0 is unspecified
+    }
+
+    /**
+     * Constructs a Position object with the specified index
+     *
+     * @param index The desired index for this Position
+     */
+    public LinearPosition(final int index) {
+        this.index = index;
+    }
+
+    /**
+     * @return Returns the position index
+     */
+    public int getIndex() {
+        return index;
+    }
+
+    /**
+     * @param index The index to set
+     */
+    public void setIndex(final int index) {
+        this.index = index;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/design/tool/Position.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.tool;
+
+/**
+ * <p>A descriptor that identifies the position of a DesignBean.</p>
+ *
+ * @author Carl Quinn
+ * @version 1.0
+ */
+public abstract class Position {
+
+    /**
+     * Constructs a Position object
+     */
+    public Position() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/Bean.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * An annotation for adding meta-data to a JavaFX Bean. Some of the meta-data
+ * information can be gleaned simply by reflecting on the JavaFX Bean and
+ * discovering, for example, the name of the Bean and computing a suitable
+ * default display name. However, for enhanced control, including specifying
+ * the "category" and a short description for the bean, you should use this
+ * annotation.
+ * <p>
+ * Because annotations do not allow for null, and because the developer
+ * might want to explicitly set the display name or some other value to the
+ * empty String, this annotation defines a static <code>COMPUTE</code> constant.
+ * When used for the value of one of the String properties of this annotation,
+ * the meta-data system will compute a reasonable default for that particular
+ * property of the annotation.
+ *
+ * @author Richard
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface Bean {
+    /**
+     * A constant unlikely to be used in actual practice which is used to
+     * indicate to the meta-data loading system that the value for the
+     * Bean annotation value so specified should be computed with a reasonable
+     * default value.
+     */
+    public static final String COMPUTE = "^^^^^COMPUTE^^^^^";
+
+    /**
+     * The displayName of the JavaFX Bean. If prefixed with %,
+     * the name will be looked up via a resource bundle. The resource bundle
+     * must either be named "resources" and located in the same package as the
+     * JavaFX Bean, or it must be named after the JavaFX Bean with "Resources"
+     * as the suffix.
+     * <p>
+     * If the displayName is set to <code>COMPUTE</code>, then the displayName
+     * will be computed. First, any resource bundles defined for this JavaFX
+     * Bean will be queried for an entry by first looking in the most specific
+     * resource bundle ([BeanName]Resources) for an entry called "displayName",
+     * and then looking in the generic "resources" bundle for an entry titled
+     * "[BeanName]-displayName". Otherwise, the name will be computed
+     * based on the name of the class.
+     */
+    String displayName() default COMPUTE;
+
+    /**
+     * A short description of the JavaFX Bean. If prefixed with %,
+     * the short description will be looked up via a resource bundle. The
+     * resource bundle must either be named "resources" and located in the same
+     * package as the JavaFX Bean, or it must be named after the JavaFX Bean
+     * with "Resources" as the suffix.
+     * <p>
+     * If the shortDescription is set to <code>COMPUTE</code>, then the
+     * shortDescription will be computed. First, any resource bundles defined
+     * for this JavaFX Bean will be queried for an entry by first looking in the
+     * most specific resource bundle ([BeanName]Resources) for an entry called
+     * "shortDescription", and then looking in the generic "resources" bundle
+     * for an entry titled "[BeanName]-shortDescription". Otherwise, the
+     * shortDescription will be computed and may be empty.
+     */
+    String shortDescription() default COMPUTE;
+
+    /**
+     * The category for this JavaFX Bean. Categories help to organize beans
+     * within a tool palette or other system. This can be any String value.
+     * If the category is set to <code>COMPUTE</code> then any resource bundles
+     * defined for this JavaFX Bean will be queried for an entry by first
+     * looking in the most specific resource bundle ([BeanName]Resources) for an
+     * entry called "category", and then looking in the generic "resources"
+     * bundle for an entry titled "[BeanName]-category". Otherwise, the category
+     * will be set to some default value, which may be the same as the empty
+     * string.
+     */
+    String category() default COMPUTE;
+
+    /**
+     * The name of the image file(s) to use for representing this Bean visually.
+     * You may actually provide multiple image files, all derived based on
+     * this given name. For example, if the value for <code>image</code> were
+     * <code>MyWidget</code>, then the following image files would be looked
+     * up:
+     * <ul>
+     *  <li>MyWidget.[png,jpg]</li>
+     *  <li>MyWidget-16x16[png.jpg]</li>
+     *  <li>MyWidget-32x32[png.jpg]</li>
+     *  <li>MyWidget-64x64[png.jpg]</li>
+     *  <li>MyWidget-128x128[png.jpg]</li>
+     *  <li>MyWidget-256x256[png.jpg]</li>
+     *  <li>MyWidget-512x512[png.jpg]</li>
+     * </ul>
+     * For example, suppose I have the following image files on disk:
+     * <ul>
+     *  <li>MyWidget-16x16.png</li>
+     *  <li>MyWidget-32x32.jpg</li>
+     *  <li>MyWidget-256x256.jpg</li>
+     *  <li>MyWidget.png</li>
+     * </ul>
+     * Further suppose that my IDE wanted to locate a 64x64 representation of
+     * MyWidget. It could ask for a 64x64 representation, and the BeanMetaData
+     * will load the next closest size above the requested representation size
+     * and scale as appropriate. In this case it will return a 64x64 scaled
+     * version of MyWidget-256x256. The MyWidget.png is the highest resolution
+     * version of the file, and is used when no other suitable size is found.
+     * As indicated, the image type can be either jpg or png.
+     * <p>
+     * If the value for the image is <code>COMPUTE</code>, then the actual image
+     * name will be computed. First, any resource bundles defined for this
+     * JavaFX Bean will be queried for an entry by first looking in the most
+     * specific resource bundle ([BeanName]Resources) for an entry called
+     * "image", and then looking in the generic "resources" bundle for an entry
+     * titled "[BeanName]-image". Otherwise, the image name will be computed
+     * based on the name of the class.
+     */
+    String image() default COMPUTE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/BeanMetaData.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,497 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import static com.sun.javafx.beans.metadata.Bean.COMPUTE;
+import java.io.InputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import javafx.beans.DefaultProperty;
+import javafx.scene.image.Image;
+import javafx.util.Builder;
+
+/**
+ * Represents the meta-data for a JavaFX Bean. A BeanMetaData is created by
+ * invoking one of the constructors. These constructors reflect on a Class
+ * representing a JavaFX Bean and extracts and/or generates the meta-data for
+ * that class. Some information, such as the actual name of the bean, are
+ * determined reflectively and cannot be customized. Most information however
+ * can be customized either through the use of the {@link Bean} annotation,
+ * or through the use of one or more {@link java.util.ResourceBundle}s.
+ * <p>
+ * During the reflective process, this class will look first for a resource
+ * bundle named after the bean, and then for a generic "resources"
+ * ResourceBundle located in the same package as the bean.
+ * <p>
+ * For example, suppose I had a bean named MyWidget. In the same package as
+ * MyWidget there may be both a resources.properties, and a
+ * MyWidgetResources.properties. When looking up the displayName of MyWidget,
+ * BeanMetaData will first:
+ *  <ol>
+ *      <li>Check for a Bean annotation with a specified displayName.
+ *          <ol>
+ *              <li>If the displayName does not start with a % character and is
+ *                  not {@link Bean.COMPUTE}, then take the value of displayName
+ *                  as a literal value.</li>
+ *              <li>If the displayName starts with a % character, then take the
+ *                  displayName as the key for a corresponding value in the
+ *                  resource bundles. First check the MyWidgetResources bundle,
+ *                  and if there is no entry then check the resources
+ *                  bundle.</li>
+ *              <li>If the displayName is {@link Bean.COMPUTE}, then look in
+ *                  the resource bundles (first in MyWidgetResources and then
+ *                  in resources) for an entry MyWidget-displayName. If it is
+ *                  not in either location, then attempt to synthesize a
+ *                  displayName based on the class name.</li>
+ *          </ol>
+ *      </li>
+ *      <li>If there is no annotation, then look for MyWidget-displayName first
+ *          in MyWidgetResources, and then in resources. If it is not in either
+ *          location, then attempt to synthesize a displayName based on the
+ *          class name.</li>
+ *  </ol>
+ * <p>
+ * Likewise, for other attributes, we follow the same lookup scheme but instead
+ * of MyWidget-displayName we look for MyWidget-shortDescription, and so on.
+ * <p>
+ * The BeanMetaData also provides access to the PropertyMetaData and
+ * EventMetaData and CallbackMetaData for the JavaFX Bean. If you are not
+ * interested in the full BeanMetaData but only really want a specific
+ * PropertyMetaData, then you can create a PropertyMetaData directly.
+ * <p>
+ * For a larger discussion on the JavaFX Beans design pattern, see the
+ * package documentation in javafx.beans.
+ *
+ * TODO need to write this larger documentation for JavaFX Beans.
+ *
+ * @author Richard
+ */
+public final class BeanMetaData<T> extends MetaData {
+    /**
+     * This is used in the implementation to find the images of the specified
+     * sizes on disk, and in storing them and retrieving them as needed.
+     */
+    private enum ImageSize {
+        Size_16(16),
+        Size_32(32),
+        Size_64(64),
+        Size_128(128),
+        Size_256(256),
+        Size_512(512),
+        Size_Full(Integer.MAX_VALUE);
+
+        private final int size;
+
+        ImageSize(int size) {
+            this.size = size;
+        }
+
+        public final String getExtension() {
+            return size == Integer.MAX_VALUE ? "" : size + "x" + size;
+        }
+
+        public final int getSize() {
+            return size;
+        }
+    }
+
+    /**
+     * The list of meta-data for properties.
+     */
+    private List<PropertyMetaData> properties;
+
+    /**
+     * The list of meta-data for events.
+     */
+    private List<EventMetaData> events;
+
+    /**
+     * The list of meta-data for callbacks.
+     */
+    private List<CallbackMetaData> callbacks;
+
+    /**
+     * A map containing the images that were discovered for this bean.
+     */
+    private Map<ImageSize,Image> images;
+
+    /**
+     * The class of the Builder, if any, which is associated with this
+     * JavaFX Bean. If there is a builder, you should use it when constructing
+     * an instance of this bean, rather than using the bean itself.
+     */
+    private Class<? extends Builder> builderClass;
+
+    /**
+     * The property which is designated with the DefaultProperty annotation
+     * on the bean. This might be null.
+     */
+    private PropertyMetaData defaultProperty;
+
+    /**
+     * The type of the Bean that this BeanMetaData is for.
+     */
+    private Class<T> type;
+
+    /**
+     * Creates a new BeanMetaData instance based on the supplied class. This
+     * constructor will introspect the supplied bean to discover (a) whether
+     * it is a bean, and if not will throw an IllegalArgumentException; (b)
+     * whether the bean has public access, and if not throw an
+     * IllegalArgumentException; (c) the name, displayName, and so forth
+     * associated with this bean based on annotations, resource bundles,
+     * and direct computation where appropriate ; and (d) what the properties,
+     * callbacks, and events are.
+     *
+     * @param beanClass The class to use
+     */
+    public BeanMetaData(final Class<T> beanClass) {
+        if (beanClass == null) throw new NullPointerException(
+                "beanClass cannot be null");
+
+        this.type = beanClass;
+
+        // Step 0: Verify that this is a JavaBean. It must have public access.
+        //         It must either have a public no-arg constructor, or a
+        //         Builder with a public static create() method and a public
+        //         instance build() method.
+
+        if (!Modifier.isPublic(beanClass.getModifiers())) {
+            throw new IllegalArgumentException("The supplied bean '" +
+                    beanClass + "' does not have public access");
+        }
+
+        // Look for a Builder class.
+        String builderClassName = beanClass.getName() + "Builder";
+        try {
+            // TODO does this bail in an unsigned context?
+            builderClass = (Class<? extends Builder>)Class.forName(builderClassName);
+        } catch (ClassNotFoundException ex) {
+            // There is no builder, this is an OK condition.
+        } catch (ClassCastException ex) {
+            // The builder wasn't of the expected type
+        }
+
+        // Verify that there is a public no-arg constructor, or that there
+        // is a builder with both a public static create() method and a
+        // public instance build() method.
+        try {
+            Constructor<T> noArgConstructor = beanClass.getConstructor();
+            if (!Modifier.isPublic(noArgConstructor.getModifiers())) {
+                throw new NoSuchMethodException();
+            }
+        } catch (NoSuchMethodException ex) {
+            if (builderClass == null) {
+                throw new IllegalArgumentException("The supplied bean '" +
+                        beanClass + "' does not have a no-arg constructor");
+            } else {
+                // There is a builder, and it may be able to create the bean,
+                // so we need to do a quick check to make sure it has a no-arg
+                // static create() method and a no-arg instance method build().
+                try {
+                    Method method = builderClass.getMethod("create");
+                    if (!Modifier.isStatic(method.getModifiers()) ||
+                            !Modifier.isPublic(method.getModifiers())) {
+                        throw new NoSuchMethodException();
+                    }
+                } catch (NoSuchMethodException ex2) {
+//                    throw new IllegalArgumentException("The supplied bean '" +
+//                            beanClass + "' does not have a builder with a "
+//                            + "public no-arg static create() method");
+                }
+
+//                try {
+//                    Method method = builderClass.getMethod("build");
+//                    if (Modifier.isStatic(method.getModifiers()) ||
+//                            !Modifier.isPublic(method.getModifiers())) {
+//                        throw new NoSuchMethodException();
+//                    }
+//                } catch (NoSuchMethodException ex2) {
+//                    throw new IllegalArgumentException("The supplied bean '" +
+//                            beanClass + "' does not have a builder with a "
+//                            + "no-arg instance build() method");
+//                }
+            }
+        }
+
+        // Step 0a: Look for and load the resource bundles associated with
+        //          this bean. Look for a "resources" bundle in the same
+        //          package as the class, and a "FooResources" bundle also
+        //          in the same package as the class. The FooResources takes
+        //          precedence over "resources" in the case of lookup
+        Resources bundle = new Resources(beanClass);
+
+        // Step 1: Discover the name of the bean. Assign this name to the
+        //         name property. Create a proper display name based on it.
+        //         Let the short description be an empty string. Default the
+        //         category to an empty string.
+
+        String _name = beanClass.getSimpleName();
+        String _displayName = bundle.get("displayName", toDisplayName(_name));
+        String _shortDescription = bundle.get("shortDescription", "");
+        String _category = bundle.get("category", "");
+        String _imageName = bundle.get("image", _name);
+
+        // Step 2: Look for the @Bean annotation on the JavaBean. If it exists,
+        //         then use the information defined there to override the
+        //         information previously computed.
+
+        Bean beanAnnotation = beanClass.getAnnotation(Bean.class);
+        if (beanAnnotation != null) {
+            String s = beanAnnotation.displayName();
+            if (s != null && !COMPUTE.equals(s)) _displayName = s;
+            s = beanAnnotation.shortDescription();
+            if (s != null && !COMPUTE.equals(s)) _shortDescription = s;
+            s = beanAnnotation.category();
+            if (s != null && !COMPUTE.equals(s)) _category = s;
+            s = beanAnnotation.image();
+            if (s != null && !COMPUTE.equals(s)) _imageName = s;
+        }
+
+        // Step 2a: If the _displayName, _shortDescription, or _category is
+        //          prefixed by % then lookup the new value from bundle
+        if (_displayName.startsWith("%")) _displayName = bundle.get(_displayName, _displayName);
+        if (_shortDescription.startsWith("%")) _shortDescription = bundle.get(_shortDescription, _shortDescription);
+        if (_category.startsWith("%")) _category = bundle.get(_category, _category);
+        if (_imageName.startsWith("%")) _imageName = bundle.get(_imageName, _imageName);
+
+        // Step 2b: Update the BeanMetaData with these final values
+        configure(_name, _displayName, _shortDescription, _category);
+
+        // Step 2c: Lookup the images
+        if (!"".equals(_imageName)) {
+            for (ImageSize size : ImageSize.values()) {
+                String fileName = _imageName + size.getExtension();
+                InputStream jpg = beanClass.getResourceAsStream(fileName + ".jpg");
+                InputStream png = beanClass.getResourceAsStream(fileName + ".png");
+
+                if (png != null) {
+                    images.put(size, new Image(png));
+                } else if (jpg != null) {
+                    images.put(size, new Image(jpg));
+                }
+            }
+        }
+
+        // Step 3: Find all properties, callbacks, and events. Because immutable
+        //         properties only have a "getter" and no property method, and
+        //         because we don't support properties which have a setter but
+        //         no getter, we use the getter as the authoritative way to
+        //         identify a property. If a property has a return type of
+        //         Callback, then we have a Callback. Otherwise If the property
+        //         name (as derived from the getter) starts with "on", then we
+        //         have an event and create an EventMetaData. Otherwise we
+        //         create a PropertyMetaData. While iterating, locate the
+        //         property which matches the DefaultProperty annotation
+        // Step 2d: Lookup the DefaultProperty
+        final DefaultProperty defaultPropertyAnnotation =
+                beanClass.getAnnotation(DefaultProperty.class);
+        final String defaultPropertyName = defaultPropertyAnnotation == null ?
+                "" : defaultPropertyAnnotation.value();
+        Method[] methods = beanClass.getMethods();
+        List<PropertyMetaData> p = new ArrayList<PropertyMetaData>();
+        List<EventMetaData> e = new ArrayList<EventMetaData>();
+        List<CallbackMetaData> c = new ArrayList<CallbackMetaData>();
+        for (Method m : methods) {
+            if (Modifier.isPublic(m.getModifiers()) &&
+                    !Modifier.isStatic(m.getModifiers())) {
+                final String mname = m.getName();
+                final int paramCount = m.getParameterTypes().length;
+                final Class<?> ret = m.getReturnType();
+                if (mname.startsWith("get") && paramCount == 0) {
+                    if (javafx.util.Callback.class.isAssignableFrom(ret)) {
+                        c.add(new CallbackMetaData(beanClass, m, bundle));
+                    } else if (mname.startsWith("getOn")) {
+                        e.add(new EventMetaData(beanClass, m, bundle));
+                    } else {
+                        PropertyMetaData prop = new PropertyMetaData(beanClass, m, bundle);
+                        p.add(prop);
+                        if (defaultProperty == null &&
+                                prop.getName().equals(defaultPropertyName)) {
+                            defaultProperty = prop;
+                        }
+                    }
+                } else if (mname.startsWith("is") && paramCount == 0 &&
+                        (ret == boolean.class || ret == Boolean.class)) {
+                    PropertyMetaData prop = new PropertyMetaData(beanClass, m, bundle);
+                    p.add(prop);
+                    if (defaultProperty == null &&
+                            prop.getName().equals(defaultPropertyName)) {
+                        defaultProperty = prop;
+                    }
+                }
+            }
+        }
+
+        properties = Collections.unmodifiableList(p);
+        events = Collections.unmodifiableList(e);
+        callbacks = Collections.unmodifiableList(c);
+
+        // Step 4: Find all other methods. These methods may be useful for
+        //         various event handlers. As such it is useful to locate these
+        //         methods. In all cases (for properties, events, and methods)
+        //         we only find those API members which are public, such that
+        //         we are not circumventing any security protocol.
+
+        // TODO If we find this is really necessary
+    }
+
+    /**
+     * Gets a reference to an unmodifiable list of PropertyMetaData, one for
+     * each public property defined on the bean.
+     *
+     * @return an unmodifiable List of properties
+     */
+    public final List<PropertyMetaData> getProperties() {
+        return properties;
+    }
+
+    /**
+     * Gets a reference to an unmodifiable list of EventMetaData, one for
+     * each public event defined on the bean.
+     *
+     * @return an unmodifiable List of events
+     */
+    public final List<EventMetaData> getEvents() {
+        return events;
+    }
+
+    /**
+     * Gets a reference to an unmodifiable list of CallbackMetaData, one for
+     * each public callback defined on the bean.
+     *
+     * @return an unmodifiable List of callback
+     */
+    public final List<CallbackMetaData> getCallbacks() {
+        return callbacks;
+    }
+
+    /**
+     * Gets the class of the Builder, if any, which is associated with this
+     * JavaFX Bean. If there is a builder, you should use it when constructing
+     * an instance of this bean, rather than using the bean itself.
+     *
+     * @return The class of the Builder for this bean, or null if there isn't
+     *         one
+     */
+    public final Class<? extends Builder> getBuilder() {
+        return builderClass;
+    }
+
+    /**
+     * Looks for the next-closest image to the one requested in this
+     * BeanMetaData. The returned image may not match the given dimensions,
+     * so the caller may want to ensure the requested dimensions are met
+     * by specifying them on the ImageView which will display the returned
+     * Image. If there is no Image equal to or larger than the requested
+     * dimensions, then the next closest <em>smaller</em> sized image will
+     * be returned. If there simply is no image available, then null is
+     * returned.
+     *
+     * @param width The requested width of the image to look up
+     * @param height The requested height of the image to look up
+     * @return An image that most correctly matches the given width and
+     *         height. First any larger image is found if an exact match
+     *         cannot be, and then any smaller image is found. Null is
+     *         ultimately returned if no image exists.
+     */
+    public final Image findImage(int width, int height) {
+        // We might as well just get right to it. If there are no images,
+        // then null is always returned.
+        if (images.isEmpty()) return null;
+
+        // Look for the image associated with a specific size which
+        // is greater than or equal to the requested width and height.
+        // We simply iterate over all ImageSize values and check the
+        // map for any value that is greater than or equal to the
+        // requested width and height.
+        final ImageSize[] imageSizes = ImageSize.values();
+        for (ImageSize imageSize : imageSizes) {
+            final int size = imageSize.getSize();
+            if (size >= width && size >= height) {
+                // We found the best match, so just return it
+                Image image = images.get(imageSize);
+                if (image != null) return image;
+            }
+        }
+
+        // Well, we didn't find an image bigger than the requested size, so we
+        // now have to find the next closest smaller one.
+        for (int i=imageSizes.length-1; i>=0; i--) {
+            final ImageSize imageSize = imageSizes[i];
+            final int size = imageSize.getSize();
+            if (size <= width && size <= height) {
+                // We found the best match, so just return it
+                Image image = images.get(imageSize);
+                if (image != null) return image;
+            }
+        }
+
+        throw new AssertionError("This code should be unreachable");
+    }
+
+    /**
+     * Finds the PropertyMetaData matching the property with the given name.
+     *
+     * @param name The name of the property to find. Cannot be null.
+     * @return The property of the given name, or null if there isn't one.
+     */
+    public final PropertyMetaData findProperty(String name) {
+        if (name == null) throw new NullPointerException("name cannot be null");
+        for (PropertyMetaData md : getProperties()) {
+            if (md.getName().equals(name)) {
+                return md;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Gets the PropertyMetaData corresponding to the property which was
+     * identified via the DefaultProperty annotation used on the JavaFX Bean.
+     * If no DefaultProperty annotation was used or the value identified
+     * a non-existent property, then null is returned.
+     *
+     * @return The PropertyMetaData of the default property, or null if there
+     *         isn't one.
+     */
+    public final PropertyMetaData getDefaultProperty() {
+        return defaultProperty;
+    }
+
+    /**
+     * Gets the class type for which this BeanMetaData represents.
+     *
+     * @return A non-null reference to the bean type
+     */
+    public final Class<T> getType() {
+        return type;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/Callback.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ *
+ * @author Richard
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Callback {
+    /**
+     * A constant unlikely to be used in actual practice which is used to
+     * indicate to the meta-data loading system that the value for the
+     * Bean annotation value so specified should be computed with a reasonable
+     * default value.
+     */
+    public static final String COMPUTE = "^^^^^COMPUTE^^^^^";
+
+    /**
+     * The displayName of the JavaFX Bean. If prefixed with %,
+     * the name will be looked up via a resource bundle. The resource bundle
+     * must either be named "resources" and located in the same package as the
+     * JavaFX Bean, or it must be named after the JavaFX Bean with "Resources"
+     * as the suffix.
+     * <p>
+     * If the displayName is set to <code>COMPUTE</code>, then the displayName
+     * will be computed. First, any resource bundles defined for this JavaFX
+     * Bean will be queried for an entry by first looking in the most specific
+     * resource bundle ([BeanName]Resources) for an entry called "displayName",
+     * and then looking in the generic "resources" bundle for an entry titled
+     * "[BeanName]-displayName". Otherwise, the name will be computed
+     * based on the name of the class.
+     */
+    String displayName() default COMPUTE;
+
+    /**
+     * A short description of the JavaFX Bean. If prefixed with %,
+     * the short description will be looked up via a resource bundle. The
+     * resource bundle must either be named "resources" and located in the same
+     * package as the JavaFX Bean, or it must be named after the JavaFX Bean
+     * with "Resources" as the suffix.
+     * <p>
+     * If the shortDescription is set to <code>COMPUTE</code>, then the
+     * shortDescription will be computed. First, any resource bundles defined
+     * for this JavaFX Bean will be queried for an entry by first looking in the
+     * most specific resource bundle ([BeanName]Resources) for an entry called
+     * "shortDescription", and then looking in the generic "resources" bundle
+     * for an entry titled "[BeanName]-shortDescription". Otherwise, the
+     * shortDescription will be computed and may be empty.
+     */
+    String shortDescription() default COMPUTE;
+
+    /**
+     * The category for this JavaFX Bean. Categories help to organize beans
+     * within a tool palette or other system. This can be any String value.
+     * If the category is set to <code>COMPUTE</code> then any resource bundles
+     * defined for this JavaFX Bean will be queried for an entry by first
+     * looking in the most specific resource bundle ([BeanName]Resources) for an
+     * entry called "category", and then looking in the generic "resources"
+     * bundle for an entry titled "[BeanName]-category". Otherwise, the category
+     * will be set to some default value, which may be the same as the empty
+     * string.
+     */
+    String category() default COMPUTE;
+
+    /**
+     * Allows the bean author to specify in the annotation what the type of the
+     * parameter will be which is passed to the Callback. Because of type
+     * erasure, it is not possible for a framework reflecting on a JavaBean
+     * to understand what this type would be, without some means of specifying
+     * it. This annotation allows you to thus specify the type.
+     *
+     * @return The type of the parameter
+     */
+    Class<?> paramType() default Object.class;
+
+    /**
+     * Allows the bean author to specify in the annotation what the type of the
+     * object returned from the {@link java.util.Callback} will be. Because of
+     * type erasure, it is not possible for a framework reflecting on a JavaBean
+     * to understand what this type would be, without some means of specifying
+     * it. This annotation allows you to thus specify the type.
+     *
+     * @return The type of the return value of the callback method
+     */
+    Class<?> returnType() default Object.class;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/CallbackMetaData.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import java.lang.reflect.Method;
+
+/**
+ * A CallbackMetaData is a specialization of a PropertyMetaData. All callbacks
+ * in JavaFX are simply a special type of property. Although named differently,
+ * they all have a data type of {@link javafx.util.Callback}.
+ *
+ * @author Richard
+ */
+public class CallbackMetaData extends PropertyMetaData {
+    /**
+     * This is the type of the param passed to the Callback's call method.
+     */
+    private Class<?> paramType;
+
+    /**
+     * This is the return type of the Callback's call method.
+     */
+    private Class<?> returnType;
+
+    /**
+     * Creates a new CallbackMetaData based on the given beanClass and getter.
+     * Both the beanClass and getter must be specified or a NullPointerException
+     * will be thrown. The getter must be a method on the specified beanClass,
+     * and it must have a return type of {@link javafx.util.Callback}, or an
+     * IllegalArgumentException will be thrown.
+     *
+     * @param beanClass The bean class, cannot be null
+     * @param getter The getter on the bean class of the property,
+     *        cannot be null and must have a return type of
+     *        {@link javafx.util.Callback}
+     */
+    public CallbackMetaData(Class<?> beanClass, Method getter) {
+        super(beanClass, getter);
+        init(getter);
+    }
+
+    /**
+     * A constructor used by BeanMetaData to create a CallbackMetaData without
+     * having to do redundant checks and redundant resource bundle lookup.
+     *
+     * @param beanClass The bean class, cannot be null
+     * @param getter The getter, cannot be null
+     * @param bundle The bundle, cannot be null
+     */
+    CallbackMetaData(Class<?> beanClass, Method getter, Resources bundle) {
+        super(beanClass, getter, bundle);
+        init(getter);
+    }
+
+    /**
+     * @InheritDoc
+     */
+    @Override MetaDataAnnotation getMetaDataAnnotation(Method getter) {
+        final Callback a = getter.getAnnotation(Callback.class);
+        if (a == null) return null;
+        return new MetaDataAnnotation() {
+            @Override public String displayName() {
+                return a.displayName();
+            }
+
+            @Override public String shortDescription() {
+                return a.shortDescription();
+            }
+
+            @Override public String category() {
+                return a.category();
+            }
+        };
+    }
+
+    /**
+     * Extracts annotation information from the Callback annotation specific to
+     * the Callback.
+     *
+     * @param getter The getter on the bean class of the property
+     */
+    private void init(Method getter) {
+        // Get the annotations on this method. Look for the event specific
+        // "paramType" and "returnType" annotations and use them if specified
+        Callback callbackAnnotation = getter.getAnnotation(Callback.class);
+        paramType = callbackAnnotation == null ?
+                Object.class :
+                callbackAnnotation.paramType();
+        returnType = callbackAnnotation == null ?
+                Object.class :
+                callbackAnnotation.returnType();
+    }
+
+    /**
+     * Gets the type of the parameter will be which is passed to the
+     * {@link javafx.util.Callback}'s call method.
+     *
+     * @return The type of the parameter
+     */
+    public final Class<?> getParamType() {
+        return paramType;
+    }
+
+    /**
+     * Gets the return type of the {@link javafx.util.Callback}'s call method.
+     *
+     * @return The return type
+     */
+    public final Class<?> getReturnType() {
+        return returnType;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/Event.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ *
+ * @author Richard
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Event {
+    /**
+     * A constant unlikely to be used in actual practice which is used to
+     * indicate to the meta-data loading system that the value for the
+     * Bean annotation value so specified should be computed with a reasonable
+     * default value.
+     */
+    public static final String COMPUTE = "^^^^^COMPUTE^^^^^";
+
+    /**
+     * The displayName of the JavaFX Bean. If prefixed with %,
+     * the name will be looked up via a resource bundle. The resource bundle
+     * must either be named "resources" and located in the same package as the
+     * JavaFX Bean, or it must be named after the JavaFX Bean with "Resources"
+     * as the suffix.
+     * <p>
+     * If the displayName is set to <code>COMPUTE</code>, then the displayName
+     * will be computed. First, any resource bundles defined for this JavaFX
+     * Bean will be queried for an entry by first looking in the most specific
+     * resource bundle ([BeanName]Resources) for an entry called "displayName",
+     * and then looking in the generic "resources" bundle for an entry titled
+     * "[BeanName]-displayName". Otherwise, the name will be computed
+     * based on the name of the class.
+     */
+    String displayName() default COMPUTE;
+
+    /**
+     * A short description of the JavaFX Bean. If prefixed with %,
+     * the short description will be looked up via a resource bundle. The
+     * resource bundle must either be named "resources" and located in the same
+     * package as the JavaFX Bean, or it must be named after the JavaFX Bean
+     * with "Resources" as the suffix.
+     * <p>
+     * If the shortDescription is set to <code>COMPUTE</code>, then the
+     * shortDescription will be computed. First, any resource bundles defined
+     * for this JavaFX Bean will be queried for an entry by first looking in the
+     * most specific resource bundle ([BeanName]Resources) for an entry called
+     * "shortDescription", and then looking in the generic "resources" bundle
+     * for an entry titled "[BeanName]-shortDescription". Otherwise, the
+     * shortDescription will be computed and may be empty.
+     */
+    String shortDescription() default COMPUTE;
+
+    /**
+     * The category for this JavaFX Bean. Categories help to organize beans
+     * within a tool palette or other system. This can be any String value.
+     * If the category is set to <code>COMPUTE</code> then any resource bundles
+     * defined for this JavaFX Bean will be queried for an entry by first
+     * looking in the most specific resource bundle ([BeanName]Resources) for an
+     * entry called "category", and then looking in the generic "resources"
+     * bundle for an entry titled "[BeanName]-category". Otherwise, the category
+     * will be set to some default value, which may be the same as the empty
+     * string.
+     */
+    String category() default COMPUTE;
+
+    /**
+     * Allows the bean author to specify in the annotation what the type of the
+     * event is passed to the annotated event handler property. Because of type
+     * erasure, it is not possible for a framework reflecting on a JavaBean
+     * to understand what this type would be, without some means of specifying
+     * it. This annotation allows you to thus specify the type.
+     *
+     * @return The type of the event
+     */
+    Class<? extends javafx.event.Event> eventType() default javafx.event.Event.class;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/EventMetaData.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import java.lang.reflect.Method;
+
+/**
+ * An EventMetaData is a specialization of a PropertyMetaData. All events in
+ * JavaFX are simply a special type of property. They all are prefixed with
+ * "on" in their name, and all have a data type of EventHandler. They also
+ * usually have some specialized {@link javafx.event.Event} they must be used
+ * with. This EventMetaData will return what this type of Event is. Since this
+ * information is not available via reflection due to type erasure, the
+ * bean author must specify this information by using the Event annotation
+ * on each getter for events.
+ *
+ * @author Richard
+ */
+public class EventMetaData extends PropertyMetaData {
+    /**
+     * The type of the javafx.event.Event used with the EventHandler for this
+     * Event. This must be specified via the com.sun.javafx.beans.metadata.Event
+     * annotation on the getter for the event.
+     */
+    private Class<? extends javafx.event.Event> type;
+
+    /**
+     * Creates a new EventMetaData based on the given beanClass and getter.
+     * Both the beanClass and getter must be specified or a NullPointerException
+     * will be thrown. The getter must be a method on the specified beanClass,
+     * and it must have a return type of EventHandler, or an
+     * IllegalArgumentException will be thrown.
+     *
+     * @param beanClass The bean class, cannot be null
+     * @param getter The getter on the bean class of the property,
+     *        cannot be null and must have a return type of EventHandler
+     */
+    public EventMetaData(Class<?> beanClass, Method getter) {
+        super(beanClass, getter);
+        init(getter);
+    }
+
+    /**
+     * A constructor used by BeanMetaData to create an EventMetaData without
+     * having to do redundant checks and redundant resource bundle lookup.
+     *
+     * @param beanClass The bean class, cannot be null
+     * @param getter The getter, cannot be null
+     * @param bundle The bundle, cannot be null
+     */
+    EventMetaData(Class<?> beanClass, Method getter, Resources bundle) {
+        super(beanClass, getter, bundle);
+        init(getter);
+    }
+
+    /**
+     * @InheritDoc
+     */
+    @Override MetaDataAnnotation getMetaDataAnnotation(Method getter) {
+        final Event a = getter.getAnnotation(Event.class);
+        if (a == null) return null;
+        return new MetaDataAnnotation() {
+            @Override public String displayName() {
+                return a.displayName();
+            }
+
+            @Override public String shortDescription() {
+                return a.shortDescription();
+            }
+
+            @Override public String category() {
+                return a.category();
+            }
+        };
+    }
+
+    /**
+     * Extracts annotation information from the Event annotation specific to
+     * the Event.
+     * 
+     * @param getter The getter on the bean class of the property,
+     *        cannot be null and must have a return type of EventHandler
+     */
+    private void init(Method getter) {
+        // Get the annotations on this method. Look for the event specific
+        // "eventType" annotation and use that as the event type
+        Event eventAnnotation = getter.getAnnotation(Event.class);
+        type = eventAnnotation == null ?
+                javafx.event.Event.class :
+                eventAnnotation.eventType();
+
+    }
+
+    /**
+     * Gets the type of the javafx.event.Event used with the EventHandler for
+     * this Event. This must be specified via the
+     * com.sun.javafx.beans.metadata.Event annotation on the getter for the
+     * event.
+     *
+     * @return The event type
+     */
+    public final Class<? extends javafx.event.Event> getEventType() {
+        return type;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/MetaData.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * The base class for all meta-data used for describing JavaBeans, properties,
+ * and events.
+ *
+ * @author Richard
+ */
+public abstract class MetaData {
+    /**
+     * A special category name which is used to indicate that this particular
+     * JavaBean, Property, or Event is only intended for expert usage. An IDE
+     * might group these specially, defaulting them to hidden for example.
+     */
+    public static final String EXPERT = "Expert";
+
+    /**
+     * A special category name which is used to indicate that this particular
+     * JavaBean, Property, or Event should be hidden from the user and not
+     * exposed via the visual tool.
+     */
+    public static final String HIDDEN = "Hidden";
+
+    /**
+     * A special category name which is used to indicate that this particular
+     * JavaBean, Property, or Event is preferred, and should in some way
+     * be more prominent.
+     */
+    public static final String PREFERRED = "Preferred";
+
+    /**
+     * The name associated with this JavaBean, Property, or Event. This
+     * name is immutable, and <strong>must</strong> be exactly the same
+     * as the source file name. This value can only be set by the introspector,
+     * and cannot be customized via annotation.
+     */
+    private String name;
+
+    /**
+     * The displayName of the JavaBean, Property, or Event. If prefixed with %,
+     * the name will be looked up via a resource bundle.
+     * TODO how to spec this? You can have Java based resource bundles, or you
+     * can have .properties based resource bundles, or even XML based resource
+     * bundles. So the displayName itself might not be useful except with a
+     * DesignInfo. Really all this meta-data is design-time related, maybe it
+     * should be moved to the design.author package?
+     */
+    private String displayName;
+
+    /**
+     * A short description of the JavaBean, Property, or Event. If prefixed with
+     * %, the name will be looked up via a resource bundle.
+     */
+    private String shortDescription;
+
+    /**
+     * The category for this meta-data. This can be any value, including null.
+     */
+    private String category;
+
+    /**
+     * Do not permit anybody outside this package from extending MetaData
+     */
+    MetaData() { }
+
+    // TODO some additional things from 273: categoryDescription(?),
+    // expandByDefault(?). The problem with these is, how to reconcile
+    // differences if one property is annotated one way and another property
+    // with the same "category" is annotated in another way?
+
+    public final String getName() { return name; }
+    public final String getDisplayName() { return displayName; }
+    public final String getShortDescription() { return shortDescription; }
+    public final String getCategory() { return category; }
+
+    void configure(String name, String displayName,
+            String shortDescription, String category) {
+        this.name = name;
+        this.displayName = displayName;
+        this.shortDescription = shortDescription;
+        this.category = category;
+    }
+
+    /**
+     * Utility method to take a string and convert it to normal Java variable
+     * name capitalization.  This normally means converting the first
+     * character from upper case to lower case, but in the (unusual) special
+     * case when there is more than one character and both the first and
+     * second characters are upper case, we leave it alone.
+     * <p>
+     * Thus "FooBah" becomes "fooBah" and "X" becomes "x", but "URL" stays
+     * as "URL".
+     *
+     * @param name The string to be decapitalized. If null, then null is
+     *        returned.
+     * @return The decapitalized version of the string.
+     */
+    static String decapitalize(String name) {
+	if (name == null) return name;
+        name = name.trim();
+        if (name.length() == 0) return name;
+	if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
+			Character.isUpperCase(name.charAt(0))){
+	    return name;
+	}
+	char chars[] = name.toCharArray();
+	chars[0] = Character.toLowerCase(chars[0]);
+	return new String(chars);
+    }
+
+    /**
+     * Takes the given name and formats it for display. Given a camel-case
+     * name, it will split the name at each of the upper-case letters, unless
+     * multiple uppercase letters are in a series, in which case it treats them
+     * as a single name. The initial lower-case letter is upper cased. So a
+     * name like "translateX" becomes "Translate X" and a name like "halign"
+     * becomes "Halign".
+     * <p>
+     * Numbers are treated the same as if they were capital letters, such that
+     * "MyClass3" would become "My Class 3" and "MyClass23" would become
+     * "My Class 23".
+     * <p>
+     * Underscores are converted to spaces, with the first letter following
+     * the underscore converted to upper case. Multiple underscores in a row
+     * are treated only as a single space, and any leading or trailing
+     * underscores are skipped.
+     *
+     * @param name
+     * @return
+     */
+    static String toDisplayName(String name) {
+	if (name == null) return name;
+        // Replace all underscores with empty spaces
+        name = name.replace("_", " ");
+        // Trim out any leading or trailing space (which also effectively
+        // removes any underscores that were leading or trailing, since the
+        // above line had converted them all to spaces).
+        name = name.trim();
+        // If the resulting name is empty, return an empty string
+        if (name.length() == 0) return name;
+        // There are now potentially spaces already in the name. If, while
+        // iterating over all of the characters in the name we encounter a
+        // space, then we will simply step past the space and capitalize the
+        // following character.
+        name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
+        StringBuilder builder = new StringBuilder();
+        char ch = name.charAt(0);
+        builder.append(ch);
+        boolean previousWasDigit = Character.isDigit(ch);
+        boolean previousWasCapital = !previousWasDigit;
+        for (int i=1; i<name.length(); i++) {
+            ch = name.charAt(i);
+            if ((Character.isUpperCase(ch) && !previousWasCapital) ||
+                    (Character.isUpperCase(ch) && previousWasDigit)) {
+                builder.append(" ");
+                builder.append(ch);
+                previousWasCapital = true;
+                previousWasDigit = false;
+            } else if ((Character.isDigit(ch) && !previousWasDigit) ||
+                    (Character.isDigit(ch) && previousWasCapital)) {
+                builder.append(" ");
+                builder.append(ch);
+                previousWasCapital = false;
+                previousWasDigit = true;
+            } else if (Character.isUpperCase(ch) || Character.isDigit(ch)) {
+                builder.append(ch);
+            } else if (Character.isWhitespace(ch)) {
+                builder.append(" ");
+                // There might have been multiple underscores in a row, so
+                // we might now have multiple whitespace in a row. Search ahead
+                // to the first non-whitespace character.
+                ch = name.charAt(++i);
+                while (Character.isWhitespace(ch)) {
+                    // Note that because we trim the String, it should be
+                    // impossible to have trailing whitespace, and thus we
+                    // don't have to worry about the ArrayIndexOutOfBounds
+                    // condition here.
+                    ch = name.charAt(++i);
+                }
+                builder.append(Character.toUpperCase(ch));
+                previousWasDigit = Character.isDigit(ch);
+                previousWasCapital = !previousWasDigit;
+            } else {
+                previousWasCapital = false;
+                previousWasDigit = false;
+                builder.append(ch);
+            }
+        }
+        return builder.toString();
+    }
+
+    /**
+     * A utility class which makes it nicer to interact with ResourceBundles.
+     * This particular implementation handles looking up resources in the
+     * "primary" delegate bundle and then the "secondary" delegate bundle
+     * if it didn't find there resource in the primary.
+     */
+    static final class Resources {
+        private ResourceBundle primary;
+        private ResourceBundle secondary;
+        private String prefix;
+
+        Resources(final Class<?> beanClass) {
+            // TODO probably need to make sure these resource bundles NEVER
+            // EVER EVER cache their results
+
+            // TODO Need to make sure these resource bundles use the classloader
+            // of the beanClass, otherwise things might not be looked up right
+            try {
+                secondary = ResourceBundle.getBundle(
+                        beanClass.getPackage().getName() + ".resources");
+            } catch (MissingResourceException ex) { }
+
+            try {
+                primary = ResourceBundle.getBundle(
+                        beanClass.getCanonicalName() + "Resources");
+            } catch (MissingResourceException ex) { }
+
+            prefix = beanClass.getSimpleName() + "_";
+        }
+
+        public String get(String key, String defaultValue) {
+            // Add some smarts to deal with a leading % correctly
+            // If there is a leading %, then we need to strip it off
+            // and perform the search differently than otherwise.
+
+            boolean directLookup = key.startsWith("%");
+            String k = directLookup ? key.substring(1) : key;
+
+            if (primary != null) {
+                try {
+                    Object obj = primary.getObject(k);
+                    if (obj != null) return obj.toString();
+                } catch (MissingResourceException ex) { }
+            }
+
+            if (secondary != null) {
+                try {
+                    Object obj = secondary.getObject(directLookup ? k : prefix + k);
+                    return obj.toString();
+                } catch (MissingResourceException ex) { }
+            }
+
+            return defaultValue;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/MetaDataAnnotation.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+/**
+ * This is a helper interface that defines the common methods on the Event,
+ * Bean, Property, and Callback annotations. This way we can have some
+ * common code that does the resource bundle lookup and so forth for those
+ * common properties. The problem is that annotations cannot extend from
+ * other annotations, and as such, there is no opportunity for code reuse
+ * based on inheritance.
+ * 
+ * @author Richard
+ */
+interface MetaDataAnnotation {
+    String displayName();
+    String shortDescription();
+    String category();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/Property.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ *
+ * @author Richard
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Property {
+    /**
+     * A constant unlikely to be used in actual practice which is used to
+     * indicate to the meta-data loading system that the value for the
+     * Bean annotation value so specified should be computed with a reasonable
+     * default value.
+     */
+    public static final String COMPUTE = "^^^^^COMPUTE^^^^^";
+
+    /**
+     * The displayName of the JavaFX Bean. If prefixed with %,
+     * the name will be looked up via a resource bundle. The resource bundle
+     * must either be named "resources" and located in the same package as the
+     * JavaFX Bean, or it must be named after the JavaFX Bean with "Resources"
+     * as the suffix.
+     * <p>
+     * If the displayName is set to <code>COMPUTE</code>, then the displayName
+     * will be computed. First, any resource bundles defined for this JavaFX
+     * Bean will be queried for an entry by first looking in the most specific
+     * resource bundle ([BeanName]Resources) for an entry called "displayName",
+     * and then looking in the generic "resources" bundle for an entry titled
+     * "[BeanName]-displayName". Otherwise, the name will be computed
+     * based on the name of the class.
+     */
+    String displayName() default COMPUTE;
+
+    /**
+     * A short description of the JavaFX Bean. If prefixed with %,
+     * the short description will be looked up via a resource bundle. The
+     * resource bundle must either be named "resources" and located in the same
+     * package as the JavaFX Bean, or it must be named after the JavaFX Bean
+     * with "Resources" as the suffix.
+     * <p>
+     * If the shortDescription is set to <code>COMPUTE</code>, then the
+     * shortDescription will be computed. First, any resource bundles defined
+     * for this JavaFX Bean will be queried for an entry by first looking in the
+     * most specific resource bundle ([BeanName]Resources) for an entry called
+     * "shortDescription", and then looking in the generic "resources" bundle
+     * for an entry titled "[BeanName]-shortDescription". Otherwise, the
+     * shortDescription will be computed and may be empty.
+     */
+    String shortDescription() default COMPUTE;
+
+    /**
+     * The category for this JavaFX Bean. Categories help to organize beans
+     * within a tool palette or other system. This can be any String value.
+     * If the category is set to <code>COMPUTE</code> then any resource bundles
+     * defined for this JavaFX Bean will be queried for an entry by first
+     * looking in the most specific resource bundle ([BeanName]Resources) for an
+     * entry called "category", and then looking in the generic "resources"
+     * bundle for an entry titled "[BeanName]-category". Otherwise, the category
+     * will be set to some default value, which may be the same as the empty
+     * string. In the case of the property "class", it is by default added to
+     * the "Hidden" category.
+     */
+    String category() default COMPUTE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/PropertyMetaData.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import static com.sun.javafx.beans.metadata.Bean.COMPUTE;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+/**
+ * Represents the meta-data for a JavaFX Bean property. A PropertyMetaData is
+ * created by invoking one of the constructors. These constructors reflect on a
+ * Class representing a JavaFX Bean and the Method that represents the public
+ * instance getter and extracts and/or generates the meta-data for that
+ * property. Some information, such as the actual name of the property, are
+ * determined reflectively and cannot be customized. Most information however
+ * can be customized either through the use of the {@link Property} annotation,
+ * or through the use of one or more {@link java.util.ResourceBundle}s.
+ * <p>
+ * During the reflective process, this class will look first for a resource
+ * bundle named after the bean, and then for a generic "resources"
+ * ResourceBundle located in the same package as the bean, the same as with
+ * the BeanMetaData. When looking up the displayName of a property in the
+ * specific "[MyBean]Resources" bundle, we will look for
+ * "[propertyName]-displayName", and when looking up a value in the package
+ * level "resources" bundle, we will look for
+ * "[MyBean].[propertyName]-displayName".
+ * <p>
+ * Likewise, for other attributes, we follow the same lookup scheme but instead
+ * of MyBean-displayName we look for MyBean-shortDescription, and so on.
+ * <p>
+ * From the PropertyMetaData it is possible to get a reference to the getter,
+ * setter, and property methods of the property. If a property is readonly,
+ * the setter will be null. If a property is immutable, the setter and the
+ * property method will both be null. The getter is never null, as only those
+ * properties that have a public getter can have a PropertyMetaData created
+ * for them.
+ *
+ * @author Richard
+ */
+public class PropertyMetaData extends MetaData {
+    // TODO need to add the ability to reference a custom PropertyEditor!
+
+    /**
+     * Defines the mutability of a property, which can either be immutable,
+     * read-only, or writable.
+     */
+    public enum Mutability {
+        IMMUTABLE,
+        READ_ONLY,
+        WRITABLE
+    }
+
+    /**
+     * A reference to the getter for this property. This must not be null.
+     */
+    private Method getter;
+    
+    /**
+     * A reference to the setter for this property. If this is set, then there
+     * is a public setter, otherwise it is null. If null, the property is
+     * considered read-only.
+     */
+    private Method setter;
+
+    /**
+     * A reference to the property method for this property. This should never
+     * be null when setter is not null, and vice versa. The property method will
+     * return a property (either ReadOnlyProperty or Property) object when
+     * invoked of the appropriate type.
+     */
+    private Method property;
+
+    /**
+     * The reflectively determined type of the property. This is essentially
+     * the return type of the getter method.
+     */
+    private Class<?> type;
+
+    /**
+     * The mutability of the property.
+     */
+    private Mutability mutability;
+
+    /**
+     * Create a new PropertyMetaData. Both the beanClass and getter must be
+     * specified or a NullPointerException will be thrown. The getter must
+     * be a method on the specified beanClass, or an IllegalArgumentException
+     * will be thrown.
+     *
+     * @param beanClass The bean class, cannot be null
+     * @param getter The getter on the bean class of the property,
+     *        cannot be null
+     */
+    public PropertyMetaData(Class<?> beanClass, Method getter) {
+        // If either the bean class or getter are null, throw an exception
+        if (beanClass == null || getter == null) {
+            throw new NullPointerException(
+                    "Both the beanClass and getter cannot be null");
+        }
+
+        // Step 0: Parameter verification. If the getter is not a method on the
+        //         beanClass, throw an exception. If the getter is not a proper
+        //         getter, then throw an IllegalArgumentException
+        if (!getter.getDeclaringClass().isAssignableFrom(beanClass)) {
+            throw new IllegalArgumentException(
+                    "The getter must be a method on the specified beanClass");
+        }
+
+        // Step 0a: Look for and load the resource bundles associated with
+        //          this bean. Look for a "resources" bundle in the same
+        //          package as the class, and a "FooResources" bundle also
+        //          in the same package as the class. The FooResources takes
+        //          precedence over "resources" in the case of lookup
+        Resources bundle = new Resources(beanClass);
+
+        init(beanClass, getter, bundle);
+    }
+
+    /**
+     * Package private constructor which reuses the bundle and omits some checks
+     * for the sake of performance efficiency.
+     * 
+     * @param beanClass The bean class, cannot be null
+     * @param getter The getter, cannot be null
+     * @param bundle The bundle, cannot be null
+     */
+    PropertyMetaData(Class<?> beanClass, Method getter, Resources bundle) {
+        // If either the bean class or getter are null, throw an exception
+        if (beanClass == null || getter == null) {
+            throw new NullPointerException(
+                    "Both the beanClass and getter cannot be null");
+        }
+
+        init(beanClass, getter, bundle);
+    }
+
+    MetaDataAnnotation getMetaDataAnnotation(Method getter) {
+        final Property propertyAnnotation = getter.getAnnotation(Property.class);
+        if (propertyAnnotation == null) return null;
+        return new MetaDataAnnotation() {
+            @Override public String displayName() {
+                return propertyAnnotation.displayName();
+            }
+
+            @Override public String shortDescription() {
+                return propertyAnnotation.shortDescription();
+            }
+
+            @Override public String category() {
+                return propertyAnnotation.category();
+            }
+        };
+    }
+
+    /**
+     * Initializes the class, called only from one of the above constructors.
+     *
+     * @param beanClass The bean class, cannot be null
+     * @param getter The getter, cannot be null
+     * @param bundle The bundle, cannot be null
+     */
+    private void init(Class<?> beanClass, Method getter, Resources bundle) {
+
+        // Step 1: Discover the name of the property. Assign this name to the
+        //         name property. Create a proper display name based on it.
+        //         Let the short description be an empty string. Default the
+        //         category to an empty string.
+
+        final String getterName = getter.getName();
+        final String capitalizedName = getterName.startsWith("get") ?
+                getterName.substring(3) :
+                getterName.substring(2);
+        final String _name = decapitalize(capitalizedName);
+        String _displayName = bundle.get("displayName", toDisplayName(_name));
+        String _shortDescription = bundle.get("shortDescription", "");
+        String _category = bundle.get("category", "");
+
+        // Step 2: Discover the type of the property. This is simply the return
+        //         type of the getter method.
+        type = getter.getReturnType();
+
+        // Step 3: Look for the @Bean annotation on the getter. If it exists,
+        //         then use the information defined there to override the
+        //         information previously computed.
+        MetaDataAnnotation propertyAnnotation = getMetaDataAnnotation(getter);
+        if (propertyAnnotation != null) {
+            String s = propertyAnnotation.displayName();
+            if (s != null && !COMPUTE.equals(s)) _displayName = s;
+            s = propertyAnnotation.shortDescription();
+            if (s != null && !COMPUTE.equals(s)) _shortDescription = s;
+            s = propertyAnnotation.category();
+            if (s != null && !COMPUTE.equals(s)) _category = s;
+        }
+
+        // Step 2a: If the _displayName, _shortDescription, or _category is
+        //          prefixed by % then lookup the new value from bundle
+        if (_displayName.startsWith("%")) _displayName = bundle.get(_displayName, _displayName);
+        if (_shortDescription.startsWith("%")) _shortDescription = bundle.get(_shortDescription, _shortDescription);
+        if (_category.startsWith("%")) _category = bundle.get(_category, _category);
+
+        // Step 2b: Make sure the category is Hidden by default for the
+        //          "class" property
+        if ("".equals(_category) && "class".equals(_name)) {
+            _category = "Hidden";
+        }
+
+        // Step 2c: Update the BeanMetaData with these final values
+        configure(_name, _displayName, _shortDescription, _category);
+
+        // Step 4: Discover the setter and property methods.
+        this.getter = getter;
+        final String setterName = "set" + capitalizedName;
+        try {
+            this.setter = beanClass.getMethod(setterName, type);
+            int mods = this.setter.getModifiers();
+            // TODO I couldn't figure out how to use Void.class to ensure
+            // that the setter has a void return type. So right now I will
+            // accept as the setter methods that don't have a void return type.
+            if (Modifier.isStatic(mods) || !Modifier.isPublic(mods)) {
+                this.setter = null;
+            }
+        } catch (NoSuchMethodException ex) { }
+
+        final String propertyName = _name + "Property";
+        try {
+            this.property = beanClass.getMethod(propertyName);
+            int mods = this.property.getModifiers();
+            if (Modifier.isStatic(mods) || !Modifier.isPublic(mods)) {
+                this.setter = null;
+            } else {
+                // Check the return type to make sure it is assignable from
+                // the ReadOnlyPropertyClass, or Property class, as
+                // appropriate.
+                Class<?> returnType = this.property.getReturnType();
+                Class<javafx.beans.property.ReadOnlyProperty> readOnlyProperty =
+                        javafx.beans.property.ReadOnlyProperty.class;
+                Class<javafx.beans.property.Property> writableProperty =
+                        javafx.beans.property.Property.class;
+
+                if ((!readOnlyProperty.isAssignableFrom(returnType) || this.setter != null) &&
+                        (!writableProperty.isAssignableFrom(returnType) || this.setter == null)) {
+                    this.property = null;
+                }
+            }
+        } catch (NoSuchMethodException ex) { }
+
+        // Step 5: Establish mutability
+        if (property == null) {
+            mutability = Mutability.IMMUTABLE;
+        } else if (setter == null) {
+            mutability = Mutability.READ_ONLY;
+        } else {
+            mutability = Mutability.WRITABLE;
+        }
+    }
+
+    /**
+     * Gets the data type for this property. This is simply the return type
+     * of the getter method for the property, and should match the setter type
+     * and the type housed within the property returned by the property method.
+     *
+     * @return the data type for this property
+     */
+    public final Class<?> getType() { return type; }
+
+    /**
+     * Gets the getter method for this property. This will never be null.
+     *
+     * @return The getter
+     */
+    public final Method getGetterMethod() { return getter; }
+
+    /**
+     * Gets the setter method for this property. If there is not a publicly
+     * visible instance setter, then this method will return null.
+     *
+     * @return The setter method, or null
+     */
+    public final Method getSetterMethod() { return setter; }
+
+    /**
+     * Gets the property method for this property. This is the method which
+     * returns the Property object for the property. If the property is
+     * immutable, this method will return null. Otherwise, this will return
+     * a method.
+     *
+     * @return The property method for this property, or null if the property
+     *         is immutable.
+     */
+    public final Method getPropertyMethod() { return property; }
+
+    /**
+     * Gets the mutability of this property, which can either be IMMUTABLE,
+     * READ_ONLY, or WRITABLE.
+     *
+     * @return The mutability of this property. This is never null.
+     */
+    public final Mutability getMutability() {
+        return mutability;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/src/com/sun/javafx/beans/metadata/package.html	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,59 @@
+<!--
+ Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation.  Oracle designates this
+ particular file as subject to the "Classpath" exception as provided
+ by Oracle in the LICENSE file that accompanied this code.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ or visit www.oracle.com if you need additional information or have any
+ questions.
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <title></title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    </head>
+    <body>
+        <div>This package contains meta data for describing JavaFX Beans.
+        The set of available meta data can be used to describe both visual,
+        and non-visual beans. Any bean may have properties and events.</div>
+
+        <div>The meta-data comes in two parts. A DesignInfo is a side-car
+        file which is ultimately what is used by tools to understand the
+        structure, default values, and other meta information about a bean.
+        This DesignInfo can be created by hand, or it can be automatically
+        generated using annotations and an annotation processor.</div>
+
+        <div>Although a Bean can have any arbitrary methods, in general we
+        support only Beans with default constructors <strong>or</strong>
+        a builder. We are happy to construct immutable objects or complicated
+        objects by deferring to a builder rather than attempting to
+        construct the object directly. In such a case, the only methods of
+        constructed supported on the builder are those that directly relate
+        to properties defined on the object.</div>
+
+        <div>Any bean may have zero or more Properties. A Property may be
+        a simple property (such as "visible" on Node), or complex (such as
+        "font" or "clip"), or an event (such as "onMouseMoved"). But they are
+        all just properties (even events are just properties, as are
+        callbacks). Both Event properties and Callback properties are handled
+        specially since they take code blocks rather than normal objects.</div>
+
+        <div></div>
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/BeanMetaDataTest.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import com.sun.javafx.beans.metadata.widgets.Widget3;
+import com.sun.javafx.beans.metadata.widgets.Widget2;
+import com.sun.javafx.beans.metadata.widgets.MultiWordWidget;
+import com.sun.javafx.beans.metadata.widgets.MultiWordWidget2;
+import com.sun.javafx.beans.metadata.widgets.Widget;
+import com.sun.javafx.beans.metadata.widgets.displayname.Apple;
+import com.sun.javafx.beans.metadata.widgets.displayname.Carrot;
+import com.sun.javafx.beans.metadata.widgets.displayname.Orange;
+import com.sun.javafx.beans.metadata.widgets.displayname.Pear;
+import com.sun.javafx.beans.metadata.widgets.displayname.Radish;
+import java.util.List;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+/**
+ *
+ * @author Richard
+ */
+public class BeanMetaDataTest {
+
+    public BeanMetaDataTest() {
+    }
+
+    private PropertyMetaData findProperty(BeanMetaData md, String name) {
+        List<PropertyMetaData> list = md.getProperties();
+        for (PropertyMetaData pmd : list) {
+            if (name.equals(pmd.getName())) {
+                return pmd;
+            }
+        }
+        return null;
+    }
+
+    private PropertyMetaData findEvent(BeanMetaData md, String name) {
+        List<EventMetaData> list = md.getEvents();
+        for (EventMetaData pmd : list) {
+            if (name.equals(pmd.getName())) {
+                return pmd;
+            }
+        }
+        return null;
+    }
+
+    /**************************************************************************
+     *
+     *      Tests for the "name" of a BeanMetaData
+     *
+     *************************************************************************/
+
+    /**
+     * This is a plain Widget (no annotations, just a short single word name)
+     */
+    @Test public void nameOnBeanWithNoAnnotationIsSameAsClassName() {
+        BeanMetaData<Widget> metaData = new BeanMetaData<Widget>(Widget.class);
+        assertEquals("Widget", metaData.getName());
+    }
+
+    /**
+     * This is a plain Widget but with a multi-word name
+     */
+    @Test public void nameOnBeanWithNoAnnotationIsSameAsClassName2() {
+        BeanMetaData<MultiWordWidget> metaData = new BeanMetaData<MultiWordWidget>(MultiWordWidget.class);
+        assertEquals("MultiWordWidget", metaData.getName());
+    }
+
+    /**
+     * This is a Widget with a single-word name, but with an annotation
+     */
+    @Test public void nameOnBeanWithAnnotationIsSameAsClassName() {
+        BeanMetaData<Widget2> metaData = new BeanMetaData<Widget2>(Widget2.class);
+        assertEquals("Widget2", metaData.getName());
+    }
+
+    /**
+     * This is a Widget with a multi-word name, but with an annotation
+     */
+    @Test public void nameOnBeanWithAnnotationIsSameAsClassName2() {
+        BeanMetaData<MultiWordWidget2> metaData = new BeanMetaData<MultiWordWidget2>(MultiWordWidget2.class);
+        assertEquals("MultiWordWidget2", metaData.getName());
+    }
+
+    /**************************************************************************
+     *
+     *      Tests for the "displayName" of a BeanMetaData
+     *          - Not Annotated
+     *              -- No Resource Bundle Entries
+     *              -- "resources" resource bundle entry
+     *              -- "WidgetResources" resource bundle entry
+     *          - Annotated
+     *              -- No %
+     *              -- % and "resources" entry
+     *              -- % and "WidgetResources" entry
+     *              -- % and no resource bundle entry
+     *
+     *************************************************************************/
+
+    @Test public void displayNameOnBeanWithNoAnnotationIsSpaceSeparatedClassName() {
+        BeanMetaData<Widget> metaData = new BeanMetaData<Widget>(Widget.class);
+        assertEquals("Widget", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithNoAnnotationIsSpaceSeparatedClassName2() {
+        BeanMetaData<MultiWordWidget> metaData = new BeanMetaData<MultiWordWidget>(MultiWordWidget.class);
+        assertEquals("Multi Word Widget", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithNoAnnotationBut_resources_entryMatchesTheEntry() {
+        BeanMetaData<Apple> metaData = new BeanMetaData<Apple>(Apple.class);
+        assertEquals("Golden Delicious", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithNoAnnotationBut_OrangeResources_entryMatchesTheEntry() {
+        BeanMetaData<Orange> metaData = new BeanMetaData<Orange>(Orange.class);
+        assertEquals("Florida Orange", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithNoAnnotationBut_bothResources_entryMatchesThePearResourcesEntry() {
+        BeanMetaData<Pear> metaData = new BeanMetaData<Pear>(Pear.class);
+        assertEquals("Juicy Pear", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithAnnotationIsSameAsAnnotation() {
+        BeanMetaData<Widget2> metaData = new BeanMetaData<Widget2>(Widget2.class);
+        assertEquals("Fun Widget", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithAnnotationWithLeadingPercentResultsInResourceBundleLookup() {
+        BeanMetaData<Radish> metaData = new BeanMetaData<Radish>(Radish.class);
+        assertEquals("Raspberry", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithAnnotationWithLeadingPercentResultsInResourceBundleLookup2() {
+        BeanMetaData<Carrot> metaData = new BeanMetaData<Carrot>(Carrot.class);
+        assertEquals("Fruit", metaData.getDisplayName());
+    }
+
+    @Test public void displayNameOnBeanWithAnnotationSetToEmptyStringIsEmptyString() {
+        BeanMetaData<Widget3> metaData = new BeanMetaData<Widget3>(Widget3.class);
+        assertEquals("", metaData.getDisplayName());
+    }
+
+    /**************************************************************************
+     *
+     *      Tests for the "shortDescription" of a BeanMetaData
+     *
+     *************************************************************************/
+
+    @Test public void shortDescriptionOnBeanWithNoAnnotationIsEmpty() {
+        BeanMetaData<Widget> metaData = new BeanMetaData<Widget>(Widget.class);
+        assertEquals("", metaData.getShortDescription());
+    }
+
+    @Test public void shortDescriptionOnBeanWithAnnotationIsSameAsAnnotation() {
+        BeanMetaData<Widget2> metaData = new BeanMetaData<Widget2>(Widget2.class);
+        assertEquals("This will be fun!", metaData.getShortDescription());
+    }
+
+    @Test public void shortDescriptionOnBeanWithAnnotationButNoShortDescriptionIsComputed() {
+        BeanMetaData<Widget3> metaData = new BeanMetaData<Widget3>(Widget3.class);
+        assertEquals("", metaData.getShortDescription());
+    }
+
+    /**************************************************************************
+     *
+     *      Tests for the "category" of a BeanMetaData
+     *
+     *************************************************************************/
+
+    @Test public void categoryOnBeanWithNoAnnotationIsEmpty() {
+        BeanMetaData<Widget> metaData = new BeanMetaData<Widget>(Widget.class);
+        assertEquals("", metaData.getCategory());
+    }
+
+    @Test public void categoryOnBeanWithAnnotationIsSameAsAnnotation() {
+        BeanMetaData<Widget2> metaData = new BeanMetaData<Widget2>(Widget2.class);
+        assertEquals("Fun", metaData.getCategory());
+    }
+
+    @Test public void categoryOnBeanWithAnnotationIsSameAsAnnotation2() {
+        BeanMetaData<Widget3> metaData = new BeanMetaData<Widget3>(Widget3.class);
+        assertEquals("Fun", metaData.getCategory());
+    }
+
+    /**************************************************************************
+     *
+     *      Tests for the "image" of a BeanMetaData
+     *
+     *************************************************************************/
+
+    /**************************************************************************
+     *
+     *      Tests that all properties, events, and callbacks were found
+     *      and categorized correctly
+     *
+     *************************************************************************/
+
+    @Test public void allPropertiesFound() {
+        BeanMetaData<Widget> metaData = new BeanMetaData<Widget>(Widget.class);
+        assertNotNull(findProperty(metaData, "name"));
+        assertNotNull(findProperty(metaData, "colorized"));
+        assertNotNull(findProperty(metaData, "widgetValue"));
+        assertNull(findProperty(metaData, "onAction"));
+    }
+
+    @Test public void allEventsFound() {
+        BeanMetaData<Widget> metaData = new BeanMetaData<Widget>(Widget.class);
+        assertNull(findEvent(metaData, "name"));
+        assertNull(findEvent(metaData, "colorized"));
+        assertNull(findEvent(metaData, "widgetValue"));
+        assertNotNull(findEvent(metaData, "onAction"));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/MetaDataTest.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import org.junit.Test;
+
+/**
+ *
+ * @author Richard
+ */
+public class MetaDataTest {
+
+    public MetaDataTest() {
+    }
+
+    @Test public void testDecapitalize_null() {
+        assertNull(MetaData.decapitalize(null));
+    }
+
+    @Test public void testDecapitalize_emptyString() {
+        assertEquals("", MetaData.decapitalize(""));
+    }
+
+    @Test public void testDecapitalize_emptySpaces() {
+        assertEquals("", MetaData.decapitalize("  "));
+    }
+
+    @Test public void testDecapitalize_leadingSpaces() {
+        assertEquals("someProperty", MetaData.decapitalize("  SomeProperty"));
+    }
+
+    @Test public void testDecapitalize_trailingSpaces() {
+        assertEquals("someProperty", MetaData.decapitalize("SomeProperty   "));
+    }
+
+    @Test public void testDecapitalize_allCaps() {
+        assertEquals("URL", MetaData.decapitalize("URL"));
+    }
+
+    @Test public void testDecapitalize_MixedCase() {
+        assertEquals("someProperty", MetaData.decapitalize("SomeProperty"));
+    }
+
+    @Test public void testDecapitalize_MixedCase2() {
+        assertEquals("someURL", MetaData.decapitalize("SomeURL"));
+    }
+
+    @Test public void testToDisplayName_null() {
+        assertNull(MetaData.toDisplayName(null));
+    }
+
+    @Test public void testToDisplayName_emptyString() {
+        assertEquals("", MetaData.toDisplayName(""));
+    }
+
+    @Test public void testToDisplayName_emptySpaces() {
+        assertEquals("", MetaData.toDisplayName("  "));
+    }
+
+    @Test public void testToDisplayName_leadingSpaces() {
+        assertEquals("Some Property", MetaData.toDisplayName("  SomeProperty"));
+    }
+
+    @Test public void testToDisplayName_trailingSpaces() {
+        assertEquals("Some Property", MetaData.toDisplayName("SomeProperty   "));
+    }
+
+    @Test public void testToDisplayName_allCaps() {
+        assertEquals("URL", MetaData.toDisplayName("URL"));
+    }
+
+    @Test public void testToDisplayName_MixedCase() {
+        assertEquals("Some Property", MetaData.toDisplayName("SomeProperty"));
+    }
+
+    @Test public void testToDisplayName_MixedCase2() {
+        assertEquals("Some URL", MetaData.toDisplayName("SomeURL"));
+    }
+
+    @Test public void testToDisplayName_TrailingNumbers() {
+        assertEquals("Widget 3", MetaData.toDisplayName("widget3"));
+    }
+
+    @Test public void testToDisplayName_TrailingNumbers2() {
+        assertEquals("Widget 3", MetaData.toDisplayName("Widget3"));
+    }
+
+    @Test public void testToDisplayName_TrailingNumbers3() {
+        assertEquals("Some Widget 3", MetaData.toDisplayName("SomeWidget3"));
+    }
+
+    @Test public void testToDisplayName_UnderscoresToSpaces() {
+        assertEquals("Some Property", MetaData.toDisplayName("some_property"));
+    }
+
+    @Test public void testToDisplayName_UnderscoresToSpaces2() {
+        assertEquals("Some Property", MetaData.toDisplayName("Some__Property"));
+    }
+
+    @Test public void testToDisplayName_UnderscoresToSpaces3() {
+        assertEquals("Some Property", MetaData.toDisplayName("_Some_Property"));
+    }
+
+    @Test public void testToDisplayName_UnderscoresToSpaces4() {
+        assertEquals("Some Property", MetaData.toDisplayName("SomeProperty_"));
+    }
+
+    @Test public void testToDisplayName_UnderscoresToSpaces5() {
+        assertEquals("Some 3 Property", MetaData.toDisplayName("Some_3Property"));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/PropertyMetaDataTest.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata;
+
+import com.sun.javafx.beans.metadata.widgets.Widget;
+import java.util.List;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author Richard
+ */
+public class PropertyMetaDataTest {
+
+    private PropertyMetaData findProperty(BeanMetaData md, String name) {
+        List<PropertyMetaData> list = md.getProperties();
+        for (PropertyMetaData pmd : list) {
+            if (name.equals(pmd.getName())) {
+                return pmd;
+            }
+        }
+        return null;
+    }
+
+    @Test public void testIntrospectedBeanMetaData_nameProperty() throws Exception {
+        BeanMetaData<Widget> md = new BeanMetaData<Widget>(Widget.class);
+        PropertyMetaData metaData = findProperty(md, "name");
+        assertEquals("name", metaData.getName());
+        assertEquals("Name", metaData.getDisplayName());
+        assertEquals("", metaData.getShortDescription());
+        assertEquals("", metaData.getCategory());
+        assertEquals(String.class, metaData.getType());
+
+        Widget widget = new Widget();
+        widget.setName("Richard");
+        assertEquals("Richard", metaData.getGetterMethod().invoke(widget));
+        metaData.getSetterMethod().invoke(widget, "John");
+        assertEquals("John", widget.getName());
+        assertSame(widget.nameProperty(), metaData.getPropertyMethod().invoke(widget));
+    }
+
+    @Test public void testIntrospectedBeanMetaData_colorizedProperty() throws Exception {
+        BeanMetaData<Widget> md = new BeanMetaData<Widget>(Widget.class);
+        PropertyMetaData metaData = findProperty(md, "colorized");
+        assertEquals("colorized", metaData.getName());
+        assertEquals("Psychodelic", metaData.getDisplayName());
+        assertEquals("Colorize me!", metaData.getShortDescription());
+        assertEquals("Special", metaData.getCategory());
+        assertEquals(boolean.class, metaData.getType());
+    }
+
+    @Test public void testIntrospectedBeanMetaData_widgetValueProperty() throws Exception {
+        BeanMetaData<Widget> md = new BeanMetaData<Widget>(Widget.class);
+        PropertyMetaData metaData = findProperty(md, "widgetValue");
+        assertEquals("widgetValue", metaData.getName());
+        assertEquals("Widget Value", metaData.getDisplayName());
+        assertEquals("", metaData.getShortDescription());
+        assertEquals("", metaData.getCategory());
+        assertEquals(int.class, metaData.getType());
+        assertNull(metaData.getSetterMethod());
+
+        Widget widget = new Widget();
+        widget.increment();
+        assertEquals(101, metaData.getGetterMethod().invoke(widget));
+        assertSame(widget.widgetValueProperty(), metaData.getPropertyMethod().invoke(widget));
+    }
+
+//    @Test public void readOnlyPropertyShouldHaveGetterAndPropertyMethodButNoSetter() {
+//
+//    }
+//
+//    @Test public void writablePropertyShouldHaveGetterAndSetterAndPropertyMethod() {
+//
+//    }
+//
+//    @Test public void immutablePropertyShouldHaveGetterOnly() {
+//
+//    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/MultiWordWidget.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets;
+
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+/**
+ * This is a simple Widget which has multiple name parts and no annotation.
+ * 
+ * @author Richard
+ */
+public class MultiWordWidget {
+    private StringProperty name = new SimpleStringProperty(this, "name", "");
+
+    public final String getName() { return name.get(); }
+    public final void setName(String value) { name.set(value); }
+    public final StringProperty nameProperty() { return name; }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/MultiWordWidget2.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets;
+
+import com.sun.javafx.beans.metadata.Bean;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+/**
+ * This is a Widget which has multiple word name and an annotation
+ * 
+ * @author Richard
+ */
+@Bean(category="Fun",
+      displayName="Really Fun Widget",
+      shortDescription="More fun than a human being should be allowed to have")
+public class MultiWordWidget2 {
+    private StringProperty name = new SimpleStringProperty(this, "name", "");
+
+    public final String getName() { return name.get(); }
+    public final void setName(String value) { name.set(value); }
+    public final StringProperty nameProperty() { return name; }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/Widget.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets;
+
+import com.sun.javafx.beans.metadata.Property;
+import java.util.Date;
+import javafx.beans.property.BooleanProperty;
+import javafx.beans.property.ObjectProperty;
+import javafx.beans.property.ReadOnlyIntegerProperty;
+import javafx.beans.property.ReadOnlyIntegerWrapper;
+import javafx.beans.property.SimpleBooleanProperty;
+import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+
+/**
+ *
+ * @author Richard
+ */
+public class Widget {
+    private StringProperty name = new SimpleStringProperty(this, "name", "");
+    private BooleanProperty colorized = new SimpleBooleanProperty(this, "colorized", true);
+    private ReadOnlyIntegerWrapper widgetValue = new ReadOnlyIntegerWrapper(this, "widgetValue", 100);
+    private ObjectProperty<javafx.util.Callback<Date,String>> dateConverter =
+            new SimpleObjectProperty<javafx.util.Callback<Date,String>>(this, "dateConverter");
+
+    private ObjectProperty<EventHandler<ActionEvent>> onAction =
+            new SimpleObjectProperty<EventHandler<ActionEvent>>(this, "onAction");
+
+    public final String getName() { return name.get(); }
+    public final void setName(String value) { name.set(value); }
+    public final StringProperty nameProperty() { return name; }
+
+    @Property(category="Special", displayName="Psychodelic", shortDescription="Colorize me!")
+    public final boolean isColorized() { return colorized.get(); }
+    public final void setColorized(boolean value) { colorized.set(value); }
+    public final BooleanProperty colorizedProperty() { return colorized; }
+
+    public final int getWidgetValue() { return widgetValue.get(); }
+    public final ReadOnlyIntegerProperty widgetValueProperty() { return widgetValue.getReadOnlyProperty(); }
+    public void increment() {
+        widgetValue.set(widgetValue.get() + 1);
+    }
+
+    public final EventHandler<ActionEvent> getOnAction() { return onAction.get(); }
+    public final void setOnAction(EventHandler<ActionEvent> value) { onAction.set(value); }
+    public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty() { return onAction; }
+
+    public final javafx.util.Callback<Date,String> getDateConverter() { return dateConverter.get(); }
+    public final void setDateConverter(javafx.util.Callback<Date,String> value) { dateConverter.set(value); }
+    public final ObjectProperty<javafx.util.Callback<Date,String>> dateConverterProperty() {
+        return dateConverter;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/Widget2.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets;
+
+import com.sun.javafx.beans.metadata.Bean;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+/**
+ *
+ * @author Richard
+ */
+@Bean(category="Fun", displayName="Fun Widget", shortDescription="This will be fun!")
+public class Widget2 {
+    private StringProperty name = new SimpleStringProperty(this, "name", "");
+
+    public final String getName() { return name.get(); }
+    public final void setName(String value) { name.set(value); }
+    public final StringProperty nameProperty() { return name; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/Widget3.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets;
+
+import com.sun.javafx.beans.metadata.Bean;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+/**
+ *
+ * @author Richard
+ */
+@Bean(category="Fun", displayName="")
+public class Widget3 {
+    private StringProperty name = new SimpleStringProperty(this, "name", "");
+
+    public final String getName() { return name.get(); }
+    public final void setName(String value) { name.set(value); }
+    public final StringProperty nameProperty() { return name; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/Apple.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets.displayname;
+
+/**
+ *
+ * @author Richard
+ */
+public class Apple {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/Carrot.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets.displayname;
+
+import com.sun.javafx.beans.metadata.Bean;
+
+/**
+ *
+ * @author Richard
+ */
+@Bean (displayName="%Wannabe")
+public class Carrot {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/CarrotResources.properties	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,4 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+Wannabe = Fruit
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/Orange.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets.displayname;
+
+/**
+ *
+ * @author Richard
+ */
+public class Orange {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/OrangeResources.properties	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,4 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+displayName = Florida Orange
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/Pear.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets.displayname;
+
+/**
+ *
+ * @author Richard
+ */
+public class Pear {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/PearResources.properties	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,4 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+displayName = Juicy Pear
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/Radish.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.metadata.widgets.displayname;
+
+import com.sun.javafx.beans.metadata.Bean;
+
+/**
+ *
+ * @author Richard
+ */
+@Bean (displayName="%imposter")
+public class Radish {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-beans-dt/test/com/sun/javafx/beans/metadata/widgets/displayname/resources.properties	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,7 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+Apple_displayName = Golden Delicious
+Pear_displayName = Dried Pear
+imposter = Raspberry
+Wannabe = Root
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/build-closed.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="javafx-designtime" default="jar" basedir=".">
+    <description>Builds, tests, and jars the closed version of the javafx-designtime project.</description>
+    
+    <property name="runtime.dist.root.dir" value="../../rt-closed" />    
+    <path id="javac.closed.classpath.path" path="
+        ${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar:
+        ${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar:
+        ${runtime.dist.root.dir}/../rt/javafx-ui-controls/dist/javafx-ui-controls.jar:
+        ${runtime.dist.root.dir}/../rt/javafx-beans-dt/dist/javafx-beans-dt.jar:
+        ${runtime.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar" />
+    <property name="javac.classpath" refid="javac.closed.classpath.path"/>
+    
+    <import file="../build-defs.xml"/>
+    <import file="build-common.xml"/>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/build-common.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="javafx-ui-controls-common" default="jar" basedir=".">
+
+    <target name="check-binary-css">
+        <uptodate property="binaryCssUpToDate" targetfile="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss">
+            <srcfiles dir="${src.dir}/com/sun/javafx/scene/control/skin/caspian" includes="caspian.css"/>
+        </uptodate>
+    </target> 
+
+    <target name="-pre-init" depends="check-binary-css" unless="binaryCssUpToDate">
+        <mkdir dir="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian"/>
+        <java classname="com.sun.javafx.css.parser.Css2Bin" fork="true" failonerror="true">
+          <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>
+          <classpath> 
+            <pathelement location="${runtime.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-anim/dist/javafx-anim.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar"/>
+            <pathelement location="${runtime.dist.root.dir}/javafx-logging/dist/javafx-logging.jar"/>
+          </classpath> 
+          <arg value="${src.dir}/com/sun/javafx/scene/control/skin/caspian/caspian.css"/>
+          <arg value="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss"/>
+        </java>
+    </target>
+
+    <target name="debug-test-file" depends="jar">
+        <echo message="${run.test.classpath}" />
+        <debug-selected-file-in-test/>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/build.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="javafx-designtime" default="jar" basedir=".">
+  <description>Builds, tests, and runs the project javafx-designtime.</description>
+
+  <import file="../build-defs.xml"/>
+
+  <target name="debug-test-file" depends="jar">
+      <debug-selected-file-in-test/>
+  </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/jar.jardesc	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<jardesc>
+    <jar path="javafx-designtime/dist/javafx-designtime.jar"/>
+    <options buildIfNeeded="true" compress="true" descriptionLocation="/javafx-designtime/jar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
+    <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
+    <selectedProjects/>
+    <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
+        <sealing sealJar="false">
+            <packagesToSeal/>
+            <packagesToUnSeal/>
+        </sealing>
+    </manifest>
+    <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
+        <javaElement handleIdentifier="=javafx-designtime/src"/>
+    </selectedElements>
+</jardesc>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/nbproject/project.xml	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>javafx-designtime</name>
+            <properties>
+                <property-file>../base.properties</property-file>
+                <property-file>project.properties</property-file>
+                <property-file>../common.properties</property-file>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>${src.dir}</location>
+                </source-folder>
+                <source-folder>
+                    <label>Test Packages</label>
+                    <type>java</type>
+                    <location>${test.dir}</location>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>jar</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="test">
+                    <target>test</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>jar</target>
+                </action>
+                <action name="run.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="test.single">
+                    <target>test-single</target>
+                    <context>
+                        <property>run.file</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>relative-path</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="debug.test.single">
+                    <script>build.xml</script>
+                    <target>debug-test-file</target>
+                    <context>
+                        <property>debug.class</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>java-name</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+                <action name="debug.single">
+                    <target>debug-test-file</target>
+                    <context>
+                        <property>debug.class</property>
+                        <folder>${test.dir}</folder>
+                        <pattern>\.java$</pattern>
+                        <format>java-name</format>
+                        <arity>
+                            <one-file-only/>
+                        </arity>
+                    </context>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>dist/javafx-designtime.jar</location>
+                <build-target>jar</build-target>
+            </export>
+            <export>
+                <type>folder</type>
+                <location>${build.test.classes.dir}</location>
+                <build-target>jar</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>${src.dir}</location>
+                    </source-folder>
+                    <source-folder style="packages">
+                        <label>Test Packages</label>
+                        <location>${test.dir}</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                    <source-file>
+                        <location>project.properties</location>
+                    </source-file>
+                    <source-file>
+                        <location>nbproject/project.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="test"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
+            <compilation-unit>
+                <package-root>${src.dir}</package-root>
+                <classpath mode="compile">${javac.classpath}</classpath>
+                <built-to>dist/javafx-designtime.jar</built-to>
+                <source-level>1.6</source-level>
+            </compilation-unit>
+            <compilation-unit>
+                <package-root>${test.dir}</package-root>
+                <unit-tests/>
+                <classpath mode="compile">${javac.test.classpath}</classpath>
+                <built-to>${build.test.classes.dir}</built-to>
+                <source-level>1.6</source-level>
+            </compilation-unit>
+        </java-data>
+        <spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
+            <word>callbacks</word>
+        </spellchecker-wordlist>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/project.properties	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,12 @@
+JFXRT_HOME=\
+    ${runtime.dist.root.dir}/../artifacts/sdk/rt/lib
+javac.classpath=\
+    ${JFXRT_HOME}/jfxrt.jar
+disable-lombok=true
+javac.classpath=\
+    ${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar:\
+    ../javafx-beans-dt/dist/javafx-beans-dt.jar:\
+    ${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar:\
+    ${runtime.dist.root.dir}/../rt/javafx-ui-controls/dist/javafx-ui-controls.jar:\
+    ${runtime.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/src/com/sun/javafx/beans/design/author/AbstractDesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.javafx.beans.design.author;
+
+import com.sun.javafx.beans.design.author.DesignInfo;
+import com.sun.javafx.beans.metadata.BeanMetaData;
+
+/**
+ *
+ * @author Richard
+ */
+public abstract class AbstractDesignInfo<T> implements DesignInfo<T> {
+    private Class<T> type;
+    private BeanMetaData metaData;
+
+    protected AbstractDesignInfo(Class<T> type) {
+        this.type = type;
+        metaData = new BeanMetaData(type);
+    }
+
+    @Override
+    public Class<T> getBeanClass() {
+        return type;
+    }
+
+    protected final BeanMetaData getMetaData() {
+        return metaData;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/src/javafx/scene/ParentDesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package javafx.scene;
+
+import com.sun.javafx.beans.design.author.DisplayAction;
+import com.sun.javafx.beans.design.author.Result;
+import com.sun.javafx.beans.design.tool.DesignBean;
+import com.sun.javafx.beans.design.tool.DesignEvent;
+import com.sun.javafx.beans.design.tool.DesignProperty;
+import com.sun.javafx.beans.metadata.PropertyMetaData;
+import java.util.Arrays;
+import java.util.List;
+import com.sun.javafx.beans.design.author.AbstractDesignInfo;
+
+/**
+ *
+ * @author Richard
+ */
+public class ParentDesignInfo extends AbstractDesignInfo {
+
+    public ParentDesignInfo() {
+        super(Parent.class);
+    }
+
+    protected ParentDesignInfo(Class<? extends Parent> type) {
+        super(type);
+    }
+
+    @Override
+    public boolean acceptParent(DesignBean parentBean, DesignBean childBean, Class childClass) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean acceptChild(DesignBean parentBean, DesignBean childBean, Class childClass) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Result beanCreatedSetup(DesignBean designBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Result beanPastedSetup(DesignBean designBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Result beanDeletedCleanup(DesignBean designBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public DisplayAction[] getContextItems(DesignBean designBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean acceptLink(DesignBean targetBean, DesignBean sourceBean, Class sourceClass) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Result linkBeans(DesignBean targetBean, DesignBean sourceBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override public List<PropertyMetaData> getChildrenProperties() {
+        return Arrays.asList(getMetaData().findProperty("childrenUnmodifiable"));
+    }
+
+    @Override
+    public void beanContextActivated(DesignBean designBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void beanContextDeactivated(DesignBean designBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void instanceNameChanged(DesignBean designBean, String oldInstanceName) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void beanChanged(DesignBean designBean) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void propertyChanged(DesignProperty prop, Object oldValue) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void eventChanged(DesignEvent event) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/src/javafx/scene/control/ControlDesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package javafx.scene.control;
+
+import com.sun.javafx.beans.metadata.PropertyMetaData;
+import java.util.ArrayList;
+import java.util.List;
+import javafx.scene.ParentDesignInfo;
+
+/**
+ *
+ * @author Richard
+ */
+public class ControlDesignInfo extends ParentDesignInfo {
+
+    public ControlDesignInfo() {
+        super(Control.class);
+    }
+
+    protected ControlDesignInfo(Class<? extends Control> type) {
+        super(type);
+    }
+
+    @Override
+    public List<PropertyMetaData> getChildrenProperties() {
+        List<PropertyMetaData> results = new ArrayList<PropertyMetaData>();
+        results.add(getMetaData().findProperty("tooltip"));
+        results.add(getMetaData().findProperty("contextMenu"));
+        return results;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/src/javafx/scene/control/SplitPaneDesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package javafx.scene.control;
+
+import com.sun.javafx.beans.metadata.PropertyMetaData;
+import java.util.List;
+
+/**
+ *
+ * @author Richard
+ */
+public class SplitPaneDesignInfo extends ControlDesignInfo {
+
+    public SplitPaneDesignInfo() {
+        super(SplitPane.class);
+    }
+
+    protected SplitPaneDesignInfo(Class<? extends Control> type) {
+        super(type);
+    }
+
+    @Override public List<PropertyMetaData> getChildrenProperties() {
+        List<PropertyMetaData> results = super.getChildrenProperties();
+        results.add(getMetaData().findProperty("items"));
+        return results;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/src/javafx/scene/control/resources.properties	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,4 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+Button_shortDescription = A simple button control with text and/or a graphic
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/src/javafx/scene/layout/GridPaneDesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javafx.scene.layout;
+
+import javafx.geometry.BoundingBox;
+import javafx.geometry.Bounds;
+import javafx.scene.Node;
+
+public class GridPaneDesignInfo extends PaneDesignInfo {
+    public GridPaneDesignInfo() {
+        super(GridPane.class);
+    }
+
+    protected GridPaneDesignInfo(Class type) {
+        super(type);
+    }
+
+    public int getRowCount(GridPane pane) {
+        int numRows = pane.getRowConstraints().size();
+        for (int i = 0; i < pane.getChildren().size(); i++) {
+            Node child = pane.getChildren().get(i);
+            if (child.isManaged()) {
+                int rowIndex = GridPane.getNodeRowIndex(child);
+                int rowEnd = GridPane.getNodeRowEnd(child);
+                numRows = Math.max(numRows, (rowEnd != GridPane.REMAINING? rowEnd : rowIndex) + 1);
+            }
+        }
+        return numRows;
+    }
+
+    public int getColumnCount(GridPane pane) {
+        int numColumns = pane.getColumnConstraints().size();
+        for (int i = 0; i < pane.getChildren().size(); i++) {
+            Node child = pane.getChildren().get(i);
+            if (child.isManaged()) {
+                int columnIndex = GridPane.getNodeColumnIndex(child);
+                int columnEnd = GridPane.getNodeColumnEnd(child);
+                numColumns = Math.max(numColumns, (columnEnd != GridPane.REMAINING? columnEnd : columnIndex) + 1);
+            }
+        }
+        return numColumns;
+    }
+
+    public Bounds getCellBounds(GridPane pane, int columnIndex, int rowIndex) {
+        final double snaphgap = pane.snapSpace(pane.getHgap());
+        final double snapvgap = pane.snapSpace(pane.getVgap());
+        final double top = pane.snapSpace(pane.getInsets().getTop());
+        final double left = pane.snapSpace(pane.getInsets().getLeft());
+
+        // Compute row height
+        double[] rowHeights = pane.getRowHeights();
+        double minY = top;
+        double height = rowHeights[rowIndex];
+
+        for (int j = 0; j < rowIndex; j++) {
+            minY += rowHeights[j] + snapvgap;
+        }
+
+        // Compute column width
+        double[] columnWidths = pane.getColumnWidths();
+        double minX = left;
+        double width = columnWidths[columnIndex];
+
+        for (int j = 0; j < columnIndex; j++) {
+            minX += columnWidths[j] + snaphgap;
+        }
+
+        return new BoundingBox(minX, minY, width, height);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/src/javafx/scene/layout/PaneDesignInfo.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package javafx.scene.layout;
+
+import com.sun.javafx.beans.design.author.LayoutDesignInfo;
+import com.sun.javafx.beans.metadata.PropertyMetaData;
+import java.util.Arrays;
+import java.util.List;
+import javafx.scene.Parent;
+import javafx.scene.ParentDesignInfo;
+
+/**
+ *
+ * @author Richard
+ */
+public class PaneDesignInfo extends ParentDesignInfo implements LayoutDesignInfo {
+    public PaneDesignInfo() {
+        super(Pane.class);
+    }
+
+    protected PaneDesignInfo(Class<? extends Parent> type) {
+        super(type);
+    }
+
+    @Override
+    public List<PropertyMetaData> getChildrenProperties() {
+        return Arrays.asList(getMetaData().findProperty("children"));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/test/javafx/scene/layout/GridPaneDesignInfoTest.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,92 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package javafx.scene.layout;
+
+import static org.junit.Assert.assertEquals;
+import javafx.geometry.BoundingBox;
+import javafx.geometry.HPos;
+import javafx.geometry.VPos;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class GridPaneDesignInfoTest {
+    GridPane gridpane;
+    GridPaneDesignInfo designInfo;
+
+    @Before public void setUp() {
+        this.designInfo = new GridPaneDesignInfo();
+        this.gridpane = new GridPane();
+    }
+    
+    @Test public void testGridPaneGetRowCount() {
+        MockResizable child1 = new MockResizable(100,100);
+        MockResizable child2 = new MockResizable(100,100);
+        MockResizable child3 = new MockResizable(100,100);
+
+        gridpane.addRow(0, child1,child2,child3);
+
+        assertEquals(1, designInfo.getRowCount(gridpane));
+        assertEquals(3, designInfo.getColumnCount(gridpane));
+    }
+
+    @Test public void testGridPaneGetColumnCount() {
+        MockResizable child1 = new MockResizable(100,100);
+        MockResizable child2 = new MockResizable(100,100);
+        MockResizable child3 = new MockResizable(100,100);
+
+        gridpane.addColumn(0, child1,child2,child3);
+
+        assertEquals(1, designInfo.getColumnCount(gridpane));
+        assertEquals(3, designInfo.getRowCount(gridpane));
+    }
+
+    @Test public void testGridPaneGetCellBounds() {
+        MockResizable child1 = new MockResizable(75, 50, 75, 50, 75, 50);
+        MockResizable child2 = new MockResizable(90, 50, 90, 50, 90, 50);
+        MockResizable child3 = new MockResizable(115, 100, 115, 100, 115, 100);
+        MockResizable child4 = new MockResizable(75, 60, 75, 60, 75, 60);
+        MockResizable child5 = new MockResizable(75, 40, 75, 40, 75, 40);
+        MockResizable child6 = new MockResizable(110, 60, 110, 60, 110, 60);
+
+        gridpane.addColumn(0, child1, child2, child3, child4, child5, child6);
+
+        GridPane.setConstraints(child1, 0, 0);
+        GridPane.setConstraints(child2, 2, 0);
+        GridPane.setConstraints(child3, 1, 1);
+        GridPane.setConstraints(child4, 3, 1);
+        GridPane.setConstraints(child5, 4, 1);
+        GridPane.setConstraints(child6, 3, 2);
+        GridPane.setHalignment(child3, HPos.LEFT);
+        GridPane.setValignment(child3, VPos.TOP);
+
+        GridPane.setRowSpan(child3, 2);
+        GridPane.setColumnSpan(child3, 2);
+        gridpane.setHgap(5);
+        gridpane.setVgap(2);
+
+        ColumnConstraints column1 = new ColumnConstraints(75);
+        ColumnConstraints column2 = new ColumnConstraints(25);
+        ColumnConstraints column3 = new ColumnConstraints(90);
+        ColumnConstraints column4 = new ColumnConstraints(75);
+        ColumnConstraints column5 = new ColumnConstraints(110);
+        gridpane.getColumnConstraints().addAll(column1, column2, column3, column4, column5);
+
+        RowConstraints row1 = new RowConstraints(50);
+        RowConstraints row2 = new RowConstraints(60);
+        RowConstraints row3 = new RowConstraints(40);
+        RowConstraints row4 = new RowConstraints(50);
+        gridpane.getRowConstraints().addAll(row1, row2, row3, row4);
+        gridpane.layout();
+
+        assertEquals(new BoundingBox(0, 0, 75, 50), designInfo.getCellBounds(gridpane, 0, 0));
+        assertEquals(new BoundingBox(110, 0, 90, 50), designInfo.getCellBounds(gridpane, 2, 0));
+        assertEquals(new BoundingBox(80, 52, 25, 60), designInfo.getCellBounds(gridpane, 1, 1));
+        assertEquals(new BoundingBox(205, 52, 75, 60), designInfo.getCellBounds(gridpane, 3, 1));
+        assertEquals(new BoundingBox(205, 114, 75, 40), designInfo.getCellBounds(gridpane, 3, 2));
+        assertEquals(new BoundingBox(285, 52, 110, 60), designInfo.getCellBounds(gridpane, 4, 1));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javafx-designtime/test/javafx/scene/layout/MockResizable.java	Tue Dec 13 10:11:05 2011 -0500
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ */
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package javafx.scene.layout;
+
+import javafx.geometry.BoundingBox;
+import javafx.geometry.Bounds;
+import javafx.scene.Parent;
+
+import com.sun.javafx.scene.DirtyBits;
+
+/**
+ *
+ * @author aim
+ */
+class MockResizable extends Parent {
+    private double minWidth = 0;
+    private double minHeight = 0;
+    private double prefWidth;
+    private double prefHeight;
+    private double maxWidth = 500;
+    private double maxHeight = 500;
+    private double width;
+    private double height;
+
+    public MockResizable(double prefWidth, double prefHeight) {
+        this.prefWidth = prefWidth;
+        this.prefHeight = prefHeight;
+    }
+    public MockResizable(double minWidth, double minHeight, double prefWidth, double prefHeight, double maxWidth, double maxHeight) {
+        this.minWidth = minWidth;
+        this.minHeight = minHeight;
+        this.prefWidth = prefWidth;
+        this.prefHeight = prefHeight;
+        this.maxWidth = maxWidth;
+        this.maxHeight = maxHeight;
+    }
+    @Override public boolean isResizable() {
+        return true;
+    }
+    public double getWidth() {
+        return width;
+    }
+    public double getHeight() {
+        return height;
+    }
+    @Override public void resize(double width, double height) {
+        this.width = width;
+        this.height = height;
+        impl_layoutBoundsChanged();
+        impl_geomChanged();
+        impl_markDirty(DirtyBits.NODE_GEOMETRY);
+        requestLayout();
+    }
+    @Override public double getBaselineOffset() {
+        return Math.max(0, prefHeight - 10);
+    }
+    /**
+     * The layout bounds of this region: {@code 0, 0  width x height}
+     */
+    @Override protected Bounds impl_computeLayoutBounds() {
+        return new BoundingBox(0, 0, 0, width, height, 0);
+    }
+    /**
+     * @treatasprivate implementation detail
+     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+     */
+    @Deprecated
+    @Override protected void impl_notifyLayoutBoundsChanged() {
+        // change in geometric bounds does not necessarily change layoutBounds
+    }
+    @Override public double minWidth(double height) {
+        return minWidth;
+    }
+    @Override public double minHeight(double width) {
+        return minHeight;
+    }
+    @Override public double prefWidth(double height) {
+        return prefWidth;
+    }
+    @Override public double prefHeight(double width) {
+        return prefHeight;
+    }
+    @Override public double maxWidth(double height) {
+        return maxWidth;
+    }
+    @Override public double maxHeight(double width) {
+        return maxHeight;
+    }
+}
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ListViewBehavior.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ListViewBehavior.java	Tue Dec 13 10:11:05 2011 -0500
@@ -523,8 +523,10 @@
         MultipleSelectionModel sm = getControl().getSelectionModel();
         if (sm == null) return;
         
+        selectionChanging = true;
         sm.clearSelection();
         sm.selectRange(leadSelectedIndex, leadIndex + 1);
+        selectionChanging = false;
     }
     
     private void selectAllPageDown() {
@@ -542,8 +544,10 @@
         MultipleSelectionModel sm = getControl().getSelectionModel();
         if (sm == null) return;
         
+        selectionChanging = true;
         sm.clearSelection();
         sm.selectRange(leadIndex, leadSelectedIndex + 1);
+        selectionChanging = false;
     }
 
     private void selectAllToFirstRow() {
@@ -559,7 +563,9 @@
 
         sm.clearSelection();
         sm.selectRange(0, leadIndex + 1);
-//        getControl().getFocusModel().focus(0);
+        
+        // RT-18413: Focus must go to first row
+        getControl().getFocusModel().focus(0);
 
         if (onMoveToFirstCell != null) onMoveToFirstCell.run();
     }
@@ -576,7 +582,7 @@
         }
         
         sm.clearSelection();
-        sm.selectRange(leadIndex, getRowCount() - 1);
+        sm.selectRange(leadIndex, getRowCount());
 
         if (onMoveToLastCell != null) onMoveToLastCell.run();
     }
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TableCellBehavior.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TableCellBehavior.java	Tue Dec 13 10:11:05 2011 -0500
@@ -151,10 +151,14 @@
                 sm.clearSelection();
 
                 // and then perform the selection
-                for (int _row = minRow; _row <= maxRow; _row++) {
-                    for (int _col = minColumn; _col <= maxColumn; _col++) {
-                        sm.select(_row, tableView.getVisibleLeafColumn(_col));
+                if (sm.isCellSelectionEnabled()) {
+                    for (int _row = minRow; _row <= maxRow; _row++) {
+                        for (int _col = minColumn; _col <= maxColumn; _col++) {
+                            sm.select(_row, tableView.getVisibleLeafColumn(_col));
+                        }
                     }
+                } else {
+                    sm.selectRange(minRow, maxRow + 1);
                 }
 
                 // return selection back to the focus owner
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TableViewBehavior.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TableViewBehavior.java	Tue Dec 13 10:11:05 2011 -0500
@@ -503,8 +503,17 @@
             TablePosition focusedCell = fm.getFocusedCell();
             if (isShiftDown && sm.isSelected(focusedCell.getRow() - 1, focusedCell.getTableColumn())) {
                 int newFocusOwner = focusedCell.getRow() - 1;
-                sm.clearSelection(fm.getFocusedIndex(), focusedCell.getTableColumn());
+                sm.clearSelection(newFocusOwner, focusedCell.getTableColumn());
                 fm.focus(newFocusOwner, focusedCell.getTableColumn());
+            } else if (isShiftDown && getAnchor() != null) {
+                int newRow = fm.getFocusedIndex() - 1;
+                
+                int start = Math.min(getAnchor().getRow(), newRow);
+                int end = Math.max(getAnchor().getRow(), newRow);
+                for (int _row = start; _row <= end; _row++) {
+                    sm.select(_row, focusedCell.getTableColumn());
+                }
+                fm.focus(newRow, focusedCell.getTableColumn());
             } else {
                 if (! sm.isSelected(focusIndex, focusedCell.getTableColumn())) {
                     sm.select(focusIndex, focusedCell.getTableColumn());
@@ -541,8 +550,17 @@
             TablePosition focusedCell = fm.getFocusedCell();
             if (isShiftDown && sm.isSelected(focusedCell.getRow() + 1, focusedCell.getTableColumn())) {
                 int newFocusOwner = focusedCell.getRow() + 1;
-                sm.clearSelection(fm.getFocusedIndex(), focusedCell.getTableColumn());
+                sm.clearSelection(newFocusOwner, focusedCell.getTableColumn());
                 fm.focus(newFocusOwner, focusedCell.getTableColumn());
+            } else if (isShiftDown && getAnchor() != null) {
+                int newRow = fm.getFocusedIndex() + 1;
+                
+                int start = Math.min(getAnchor().getRow(), newRow);
+                int end = Math.max(getAnchor().getRow(), newRow);
+                for (int _row = start; _row <= end; _row++) {
+                    sm.select(_row, focusedCell.getTableColumn());
+                }
+                fm.focus(newRow, focusedCell.getTableColumn());
             } else {
                 sm.selectBelowCell();
             }
@@ -599,7 +617,7 @@
         if (isShiftDown && getAnchor() != null && 
             sm.isSelected(fc.getRow(), leftColumn) &&
             ! (fc.getRow() == getAnchor().getRow() && fc.getTableColumn().equals(leftColumn))) {
-                sm.clearSelection(fc.getRow(), fc.getTableColumn());
+                sm.clearSelection(fc.getRow(), leftColumn);
                 fm.focus(fc.getRow(), leftColumn);
         } else {
             sm.selectLeftCell();
@@ -622,7 +640,7 @@
         if (isShiftDown && getAnchor() != null && 
             sm.isSelected(fc.getRow(), rightColumn) &&
             ! (fc.getRow() == getAnchor().getRow() && fc.getTableColumn().equals(rightColumn))) {
-                sm.clearSelection(fc.getRow(), fc.getTableColumn());
+                sm.clearSelection(fc.getRow(), rightColumn);
                 fm.focus(fc.getRow(), rightColumn);
         } else {
             sm.selectRightCell();
@@ -836,8 +854,10 @@
         TableView.TableViewSelectionModel sm = getControl().getSelectionModel();
         if (sm == null) return;
         
+        selectionChanging = true;
         sm.clearSelection();
         sm.selectRange(leadSelectedIndex, leadIndex + 1);
+        selectionChanging = false;
     }
     
     private void selectAllPageDown() {
@@ -855,8 +875,10 @@
         TableView.TableViewSelectionModel sm = getControl().getSelectionModel();
         if (sm == null) return;
         
+        selectionChanging = true;
         sm.clearSelection();
         sm.selectRange(leadIndex, leadSelectedIndex + 1);
+        selectionChanging = false;
     }
     
     private void toggleFocusOwnerSelection() {
@@ -870,6 +892,7 @@
         
         if (sm.isSelected(focusedCell.getRow(), focusedCell.getTableColumn())) {
             sm.clearSelection(focusedCell.getRow(), focusedCell.getTableColumn());
+            fm.focus(focusedCell.getRow(), focusedCell.getTableColumn());
         } else {
             sm.select(focusedCell.getRow(), focusedCell.getTableColumn());
         }
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextAreaBehavior.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextAreaBehavior.java	Tue Dec 13 10:11:05 2011 -0500
@@ -76,19 +76,29 @@
             TEXT_AREA_BINDINGS.add(new KeyBinding(KP_LEFT, KEY_PRESSED, "LineStart").meta()); // changed
             TEXT_AREA_BINDINGS.add(new KeyBinding(RIGHT, KEY_PRESSED, "LineEnd").meta()); // changed
             TEXT_AREA_BINDINGS.add(new KeyBinding(KP_RIGHT, KEY_PRESSED, "LineEnd").meta()); // changed
-            TEXT_AREA_BINDINGS.add(new KeyBinding(LEFT, KEY_PRESSED, "SelectLineStart").shift().meta()); // changed
-            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_LEFT, KEY_PRESSED, "SelectLineStart").shift().meta()); // changed
-            TEXT_AREA_BINDINGS.add(new KeyBinding(RIGHT, KEY_PRESSED, "SelectLineEnd").shift().meta()); // changed
-            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_RIGHT, KEY_PRESSED, "SelectLineEnd").shift().meta()); // changed
+            TEXT_AREA_BINDINGS.add(new KeyBinding(UP, KEY_PRESSED, "Home").meta());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED, "Home").meta());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(DOWN, KEY_PRESSED, "End").meta());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_DOWN, KEY_PRESSED, "End").meta());
 
-            TEXT_AREA_BINDINGS.add(new KeyBinding(UP, KEY_PRESSED, "ParagraphStart").meta());
-            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED, "ParagraphStart").meta());
-            TEXT_AREA_BINDINGS.add(new KeyBinding(DOWN, KEY_PRESSED, "ParagraphEnd").meta());
-            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_DOWN, KEY_PRESSED, "ParagraphEnd").meta());
-            TEXT_AREA_BINDINGS.add(new KeyBinding(UP, KEY_PRESSED, "SelectParagraphStart").meta().shift());
-            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED, "SelectParagraphStart").meta().shift());
-            TEXT_AREA_BINDINGS.add(new KeyBinding(DOWN, KEY_PRESSED, "SelectParagraphEnd").meta().shift());
-            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_DOWN, KEY_PRESSED, "SelectParagraphEnd").meta().shift());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(LEFT, KEY_PRESSED, "SelectLineStartExtend").shift().meta()); // changed
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_LEFT, KEY_PRESSED, "SelectLineStartExtend").shift().meta()); // changed
+            TEXT_AREA_BINDINGS.add(new KeyBinding(RIGHT, KEY_PRESSED, "SelectLineEndExtend").shift().meta()); // changed
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_RIGHT, KEY_PRESSED, "SelectLineEndExtend").shift().meta()); // changed
+            TEXT_AREA_BINDINGS.add(new KeyBinding(UP, KEY_PRESSED, "SelectHomeExtend").meta().shift());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED, "SelectHomeExtend").meta().shift());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(DOWN, KEY_PRESSED, "SelectEndExtend").meta().shift());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_DOWN, KEY_PRESSED, "SelectEndExtend").meta().shift());
+
+            TEXT_AREA_BINDINGS.add(new KeyBinding(UP, KEY_PRESSED, "ParagraphStart").alt());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED, "ParagraphStart").alt());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(DOWN, KEY_PRESSED, "ParagraphEnd").alt());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_DOWN, KEY_PRESSED, "ParagraphEnd").alt());
+
+            TEXT_AREA_BINDINGS.add(new KeyBinding(UP, KEY_PRESSED, "SelectParagraphStart").alt().shift());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED, "SelectParagraphStart").alt().shift());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(DOWN, KEY_PRESSED, "SelectParagraphEnd").alt().shift());
+            TEXT_AREA_BINDINGS.add(new KeyBinding(KP_DOWN, KEY_PRESSED, "SelectParagraphEnd").alt().shift());
         } else {
             TEXT_AREA_BINDINGS.add(new KeyBinding(UP, KEY_PRESSED, "ParagraphStart").ctrl());
             TEXT_AREA_BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED, "ParagraphStart").ctrl());
@@ -152,10 +162,12 @@
         if (textInputControl.isEditable()) {
 //            fnCaretAnim(false);
 //            setCaretOpacity(1.0);
-            if ("LineStart".equals(name)) skin.lineStart(false);
-            else if ("LineEnd".equals(name)) skin.lineEnd(false);
-            else if ("SelectLineStart".equals(name)) skin.lineStart(true);
-            else if ("SelectLineEnd".equals(name)) skin.lineEnd(true);
+            if ("LineStart".equals(name)) skin.lineStart(false, false);
+            else if ("LineEnd".equals(name)) skin.lineEnd(false, false);
+            else if ("SelectLineStart".equals(name)) skin.lineStart(true, false);
+            else if ("SelectLineStartExtend".equals(name)) skin.lineStart(true, true);
+            else if ("SelectLineEnd".equals(name)) skin.lineEnd(true, false);
+            else if ("SelectLineEndExtend".equals(name)) skin.lineEnd(true, true);
             else if ("PreviousLine".equals(name)) skin.previousLine(false);
             else if ("NextLine".equals(name)) skin.nextLine(false);
             else if ("SelectPreviousLine".equals(name)) skin.previousLine(true);
@@ -257,7 +269,7 @@
                     // to indicate the text can be dragged, etc.
                 } else if (!(e.isControlDown() || e.isAltDown() || e.isShiftDown() || e.isMetaDown())) {
                     switch (e.getClickCount()) {
-                      case 1: skin.positionCaret(hit, false); break;
+                      case 1: skin.positionCaret(hit, false, false); break;
                       case 2: mouseDoubleClick(hit); break;
                       case 3: mouseTripleClick(hit); break;
                     }
@@ -273,7 +285,7 @@
                     if(macOS) {
                         textArea.extendSelection(i);
                     } else {
-                        skin.positionCaret(hit, true);
+                        skin.positionCaret(hit, true, false);
                     }
                 }
 //                 skin.setForwardBias(hit.isLeading());
@@ -290,7 +302,7 @@
         if (!textArea.isDisabled() && !deferClick) {
             if (e.getButton() == MouseButton.PRIMARY && !(e.isMiddleButtonDown() || e.isSecondaryButtonDown())) {
                 if (!(e.isControlDown() || e.isAltDown() || e.isShiftDown() || e.isMetaDown())) {
-                    skin.positionCaret(skin.getIndex(e), true);
+                    skin.positionCaret(skin.getIndex(e), true, false);
                 }
             }
         }
@@ -305,7 +317,7 @@
             setCaretAnimating(false);
             if (deferClick) {
                 deferClick = false;
-                skin.positionCaret(skin.getIndex(e), shiftDown);
+                skin.positionCaret(skin.getIndex(e), shiftDown, false);
                 shiftDown = false;
             }
             setCaretAnimating(true);
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Tue Dec 13 10:11:05 2011 -0500
@@ -134,6 +134,8 @@
             else if ("Unselect".equals(name)) textInputControl.deselect();
             else if ("SelectHome".equals(name)) selectHome();
             else if ("SelectEnd".equals(name)) selectEnd();
+            else if ("SelectHomeExtend".equals(name)) selectHomeExtend();
+            else if ("SelectEndExtend".equals(name)) selectEndExtend();
             else super.callAction(name);
             setCaretAnimating(true);
         } else if ("Copy".equals(name)) {
@@ -226,20 +228,19 @@
     protected void fire(KeyEvent event) { } // TODO move to TextFieldBehavior
 
     private void selectHome() {
-        TextInputControl textInputControl = getControl();
-        if (macOS) {
-            textInputControl.extendSelection(0);
-        } else {
-            textInputControl.selectHome();
-        }
+        getControl().selectHome();
     }
 
     private void selectEnd() {
+        getControl().selectEnd();
+    }
+
+    private void selectHomeExtend() {
+        getControl().extendSelection(0);
+    }
+
+    private void selectEndExtend() {
         TextInputControl textInputControl = getControl();
-        if (macOS) {
-            textInputControl.extendSelection(textInputControl.getLength());
-        } else {
-            textInputControl.selectEnd();
-        }
+        textInputControl.extendSelection(textInputControl.getLength());
     }
 }
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextInputControlBindings.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextInputControlBindings.java	Tue Dec 13 10:11:05 2011 -0500
@@ -51,7 +51,6 @@
         BINDINGS.add(new KeyBinding(ENTER, KEY_PRESSED,       "Fire"));
         // deletion
         BINDINGS.add(new KeyBinding(BACK_SPACE, KEY_PRESSED,  "DeletePreviousChar"));
-        BINDINGS.add(new KeyBinding(BACK_SPACE, KEY_PRESSED,  "DeletePreviousChar").shift());
         BINDINGS.add(new KeyBinding(DELETE, KEY_PRESSED,      "DeleteNextChar"));
         // cut/copy/paste
         BINDINGS.add(new KeyBinding(CUT, KEY_PRESSED,         "Cut"));
@@ -66,13 +65,17 @@
         BINDINGS.add(new KeyBinding(KP_LEFT, KEY_PRESSED,     "SelectBackward").shift());
         BINDINGS.add(new KeyBinding(UP, KEY_PRESSED,          "SelectHome").shift());
         BINDINGS.add(new KeyBinding(KP_UP, KEY_PRESSED,       "SelectHome").shift());
-        BINDINGS.add(new KeyBinding(HOME, KEY_PRESSED,        "SelectHome").shift());
         BINDINGS.add(new KeyBinding(DOWN, KEY_PRESSED,        "SelectEnd").shift());
         BINDINGS.add(new KeyBinding(KP_DOWN, KEY_PRESSED,     "SelectEnd").shift());
-        BINDINGS.add(new KeyBinding(END, KEY_PRESSED,         "SelectEnd").shift());
+
+        BINDINGS.add(new KeyBinding(BACK_SPACE, KEY_PRESSED,  "DeletePreviousChar").shift());
+        BINDINGS.add(new KeyBinding(DELETE, KEY_PRESSED,      "DeleteNextChar").shift());
 
         // platform specific settings
         if (PlatformUtil.isMac()) {
+            BINDINGS.add(new KeyBinding(HOME, KEY_PRESSED,       "SelectHomeExtend").shift());
+            BINDINGS.add(new KeyBinding(END, KEY_PRESSED,        "SelectEndExtend").shift());
+
             BINDINGS.add(new KeyBinding(HOME, KEY_PRESSED,       "Home").meta());
             BINDINGS.add(new KeyBinding(END, KEY_PRESSED,        "End").meta());
             BINDINGS.add(new KeyBinding(LEFT, KEY_PRESSED,       "Home").meta());
@@ -89,17 +92,19 @@
             BINDINGS.add(new KeyBinding(V, KEY_PRESSED,          "Paste").meta());
             BINDINGS.add(new KeyBinding(HOME, KEY_PRESSED,       "SelectHome").shift().meta());
             BINDINGS.add(new KeyBinding(END, KEY_PRESSED,        "SelectEnd").shift().meta());
-            BINDINGS.add(new KeyBinding(LEFT, KEY_PRESSED,       "SelectHome").shift().meta());
-            BINDINGS.add(new KeyBinding(KP_LEFT, KEY_PRESSED,    "SelectHome").shift().meta());
-            BINDINGS.add(new KeyBinding(RIGHT, KEY_PRESSED,      "SelectEnd").shift().meta());
-            BINDINGS.add(new KeyBinding(KP_RIGHT, KEY_PRESSED,   "SelectEnd").shift().meta());
+            BINDINGS.add(new KeyBinding(LEFT, KEY_PRESSED,       "SelectHomeExtend").shift().meta());
+            BINDINGS.add(new KeyBinding(KP_LEFT, KEY_PRESSED,    "SelectHomeExtend").shift().meta());
+            BINDINGS.add(new KeyBinding(RIGHT, KEY_PRESSED,      "SelectEndExtend").shift().meta());
+            BINDINGS.add(new KeyBinding(KP_RIGHT, KEY_PRESSED,   "SelectEndExtend").shift().meta());
             BINDINGS.add(new KeyBinding(A, KEY_PRESSED,          "SelectAll").meta());
-            BINDINGS.add(new KeyBinding(BACK_SLASH, KEY_PRESSED, "UnSelect").meta());
             BINDINGS.add(new KeyBinding(LEFT, KEY_PRESSED,       "SelectPreviousWord").shift().alt());
             BINDINGS.add(new KeyBinding(KP_LEFT, KEY_PRESSED,    "SelectPreviousWord").shift().alt());
             BINDINGS.add(new KeyBinding(RIGHT, KEY_PRESSED,      "SelectNextWord").shift().alt());
             BINDINGS.add(new KeyBinding(KP_RIGHT, KEY_PRESSED,   "SelectNextWord").shift().alt());
         } else {
+            BINDINGS.add(new KeyBinding(HOME, KEY_PRESSED,       "SelectHome").shift());
+            BINDINGS.add(new KeyBinding(END, KEY_PRESSED,        "SelectEnd").shift());
+
             BINDINGS.add(new KeyBinding(HOME, KEY_PRESSED,       "Home").ctrl());
             BINDINGS.add(new KeyBinding(END, KEY_PRESSED,        "End").ctrl());
             BINDINGS.add(new KeyBinding(LEFT, KEY_PRESSED,       "PreviousWord").ctrl());
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Tue Dec 13 10:11:05 2011 -0500
@@ -503,8 +503,10 @@
         MultipleSelectionModel sm = getControl().getSelectionModel();
         if (sm == null) return;
         
+        selectionChanging = true;
         sm.clearSelection();
         sm.selectRange(leadSelectedIndex, leadIndex + 1);
+        selectionChanging = false;
     }
     
     private void selectAllPageDown() {
@@ -522,8 +524,10 @@
         MultipleSelectionModel sm = getControl().getSelectionModel();
         if (sm == null) return;
         
+        selectionChanging = true;
         sm.clearSelection();
         sm.selectRange(leadIndex, leadSelectedIndex + 1);
+        selectionChanging = false;
     }
     
     private void selectAllToFocus() {
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/CellSkinBase.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/CellSkinBase.java	Tue Dec 13 10:11:05 2011 -0500
@@ -48,7 +48,7 @@
      * this is the height, for a horizontal ListView this is the width. This
      * is settable from CSS
      */
-    @Styleable(property="-fx-cell-size", initial="15", converter="com.sun.javafx.css.converters.SizeConverter")
+    @Styleable(property="-fx-cell-size", initial="24", converter="com.sun.javafx.css.converters.SizeConverter")
     private ReadOnlyDoubleWrapper cellSize;
 
     private void setCellSize(double value) {
@@ -89,7 +89,7 @@
      *                                                                         *
      **************************************************************************/
 
-    private static final int DEFAULT_CELL_SIZE = 15;
+    static final int DEFAULT_CELL_SIZE = 24;
 
      /**
       * Super-lazy instantiation pattern from Bill Pugh.
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ChoiceBoxSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ChoiceBoxSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -78,6 +78,7 @@
 
     private final ToggleGroup toggleGroup = new ToggleGroup();
 
+    private boolean firstShow = false;
     /*
      * Watch for if the user changes the selected index, and if so, we toggle
      * the selection in the toggle group (so the check shows in the right place)
@@ -144,6 +145,9 @@
                 }
             }
         });
+        if (popup.getScene().getRoot() != null) {
+            popup.getScene().getRoot().getStyleClass().addAll(((ChoiceBox)getSkinnable()).getStyleClass());
+        }
         // TODO remove this id once bug RT-7542 is fixed.
         popup.setId("choice-box-popup-menu");
 //        popup.getItems().clear();
@@ -233,6 +237,7 @@
                 // TODO will need to do this, but for now, if I do this, then the
                 // choice box changes size when the popup is shown
                 // popup.setWidth(getWidth());
+                
                 popup.show(getSkinnable(), Side.BOTTOM, 0, y);
             } else {
                 popup.hide();
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -135,6 +135,9 @@
                     if (c == null) return;
                     T value = c.fromString(textField.getText());
                     comboBox.setValue(value);
+                } else if (t.getCode() == KeyCode.F4) {
+                    if (comboBox.isShowing()) comboBox.hide();
+                    else comboBox.show();
                 }
             }
         });
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ListViewSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ListViewSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -37,7 +37,6 @@
 import javafx.scene.control.SelectionModel;
 import javafx.scene.input.MouseEvent;
 
-import com.sun.javafx.runnable.Runnable0;
 import com.sun.javafx.scene.control.WeakListChangeListener;
 import com.sun.javafx.scene.control.behavior.ListViewBehavior;
 import javafx.util.Callback;
@@ -59,8 +58,8 @@
         flow.setPannable(false);
         flow.setVertical(getSkinnable().getOrientation() == Orientation.VERTICAL);
         flow.setFocusTraversable(getSkinnable().isFocusTraversable());
-        flow.setCreateCell(new Runnable0<ListCell>() {
-            @Override public ListCell run() {
+        flow.setCreateCell(new Callback<VirtualFlow, ListCell>() {
+            @Override public ListCell call(VirtualFlow flow) {
                 return ListViewSkin.this.createCell();
             }
         });
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/PositionMapper.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/PositionMapper.java	Tue Dec 13 10:11:05 2011 -0500
@@ -26,13 +26,13 @@
 package com.sun.javafx.scene.control.skin;
 
 import com.sun.javafx.Utils;
-import com.sun.javafx.runnable.Runnable1;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.IntegerProperty;
 import javafx.beans.property.ReadOnlyDoubleProperty;
 import javafx.beans.property.ReadOnlyDoubleWrapper;
 import javafx.beans.property.SimpleDoubleProperty;
 import javafx.beans.property.SimpleIntegerProperty;
+import javafx.util.Callback;
 
 /**
  * Base implementation of a helper class used by virtualized Controls such as
@@ -121,9 +121,9 @@
      * item size would be the height of the cell, whereas in a horizontal
      * list the item size would be the width of the cell.
      */
-    private Runnable1<Double, Integer> itemSize;
-    private Runnable1<Double, Integer> getItemSize() { return itemSize; }
-    public void setGetItemSize(Runnable1<Double, Integer> itemSize) {
+    private Callback<Integer, Double> itemSize;
+    private Callback<Integer, Double> getItemSize() { return itemSize; }
+    public void setGetItemSize(Callback<Integer, Double> itemSize) {
         this.itemSize = itemSize;
     }
 
@@ -140,7 +140,7 @@
         double fractionalPosition = p * count;
         int cellIndex = (int) fractionalPosition;
         double fraction = fractionalPosition - cellIndex;
-        double cellSize = getItemSize().run(cellIndex);
+        double cellSize = getItemSize().call(cellIndex);
         double pixelOffset = cellSize * fraction;
         double viewportOffset = getViewportSize() * p;
         return pixelOffset - viewportOffset;
@@ -191,7 +191,7 @@
         double fractionalPosition = getPosition() * count;
         int cellIndex = (int) fractionalPosition;
         if (forward && cellIndex == count) return;
-        double cellSize = getItemSize().run(cellIndex);
+        double cellSize = getItemSize().call(cellIndex);
         double fraction = fractionalPosition - cellIndex;
         double pixelOffset = cellSize * fraction;
 
@@ -225,7 +225,7 @@
         while (n > remaining && ((forward && cellIndex < count - 1) || (! forward && cellIndex > 0))) {
             if (forward) cellIndex++; else cellIndex--;
             n -= remaining;
-            cellSize = getItemSize().run(cellIndex);
+            cellSize = getItemSize().call(cellIndex);
             start = computeOffsetForCell(cellIndex);
             end = cellSize + computeOffsetForCell(cellIndex + 1);
             remaining = end - start;
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ProgressIndicatorSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -325,8 +325,22 @@
             tick.setLayoutY(indicator.getLayoutY() + (indicator.getHeight() / 2) - (tick.getHeight() / 2));
             tick.setVisible(control.getProgress() >= 1);
 
-            text.setLayoutY(y + indicator.getHeight() + textGap);
-            text.setLayoutX(indicator.getLayoutX() + (indicator.getWidth() - text.getLayoutBounds().getWidth()) / 2);
+            /*
+            ** if the % text can't fit anywhere in the bounds then don't display it
+            */
+            if (control.getWidth() >= com.sun.javafx.scene.control.skin.Utils.computeTextWidth(font, text.getText(), 0.0) &&
+                control.getHeight() >= com.sun.javafx.scene.control.skin.Utils.computeTextHeight(font, text.getText(), 0.0)) {
+                if (!text.isVisible()) {
+                    text.setVisible(true);
+                }
+                text.setLayoutY(y + indicator.getHeight() + textGap);
+                text.setLayoutX(indicator.getLayoutX() + (indicator.getWidth() - text.getLayoutBounds().getWidth()) / 2);
+            }
+            else {
+                if (text.isVisible()) {
+                    text.setVisible(false);
+                }
+            }
         }
 
         @Override protected double computePrefWidth(double height) {
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -685,27 +685,27 @@
                 ScrollPane control = getSkinnable();
                 Orientation bias = scrollNode.getContentBias();
                 if (bias == null) {
-                    nodeWidth = boundedSize(control.isFitToWidth()? contentWidth : scrollNode.prefWidth(-1),
-                                            scrollNode.minWidth(-1),scrollNode.maxWidth(-1));
-                    nodeHeight = boundedSize(control.isFitToHeight()? contentHeight : scrollNode.prefHeight(-1),
-                                             scrollNode.minHeight(-1), scrollNode.maxHeight(-1));
+                    nodeWidth = snapPosition(boundedSize(control.isFitToWidth()? contentWidth : scrollNode.prefWidth(-1),
+                                                         scrollNode.minWidth(-1),scrollNode.maxWidth(-1)));
+                    nodeHeight = snapPosition(boundedSize(control.isFitToHeight()? contentHeight : scrollNode.prefHeight(-1),
+                                                          scrollNode.minHeight(-1), scrollNode.maxHeight(-1)));
 
                 } else if (bias == Orientation.HORIZONTAL) {
-                    nodeWidth = boundedSize(control.isFitToWidth()? contentWidth : scrollNode.prefWidth(-1),
-                                            scrollNode.minWidth(-1),scrollNode.maxWidth(-1));
-                    nodeHeight = boundedSize(control.isFitToHeight()? contentHeight : scrollNode.prefHeight(nodeWidth),
-                                            scrollNode.minHeight(nodeWidth),scrollNode.maxHeight(nodeWidth));
+                    nodeWidth = snapPosition(boundedSize(control.isFitToWidth()? contentWidth : scrollNode.prefWidth(-1),
+                                                         scrollNode.minWidth(-1),scrollNode.maxWidth(-1)));
+                    nodeHeight = snapPosition(boundedSize(control.isFitToHeight()? contentHeight : scrollNode.prefHeight(nodeWidth),
+                                                          scrollNode.minHeight(nodeWidth),scrollNode.maxHeight(nodeWidth)));
 
                 } else { // bias == VERTICAL
-                    nodeHeight = boundedSize(control.isFitToHeight()? contentHeight : scrollNode.prefHeight(-1),
-                                             scrollNode.minHeight(-1), scrollNode.maxHeight(-1));
-                    nodeWidth = boundedSize(control.isFitToWidth()? contentWidth : scrollNode.prefWidth(nodeHeight),
-                                             scrollNode.minWidth(nodeHeight),scrollNode.maxWidth(nodeHeight));
+                    nodeHeight = snapPosition(boundedSize(control.isFitToHeight()? contentHeight : scrollNode.prefHeight(-1),
+                                                          scrollNode.minHeight(-1), scrollNode.maxHeight(-1)));
+                    nodeWidth = snapPosition(boundedSize(control.isFitToWidth()? contentWidth : scrollNode.prefWidth(nodeHeight),
+                                                         scrollNode.minWidth(nodeHeight),scrollNode.maxWidth(nodeHeight)));
                 }
 
             } else {
-                nodeWidth = scrollNode.getLayoutBounds().getWidth();
-                nodeHeight = scrollNode.getLayoutBounds().getHeight();
+                nodeWidth = snapPosition(scrollNode.getLayoutBounds().getWidth());
+                nodeHeight = snapPosition(scrollNode.getLayoutBounds().getHeight());
             }
         }
     }
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableRowSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableRowSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -293,6 +293,14 @@
         doUpdateCheck();
         
         if (showColumns) {
+            // Support for RT-18467: making it easier to specify a height for
+            // cells via CSS, where the desired height is less than the height
+            // of the TableCells. Essentially, -fx-cell-size is given higher
+            // precedence now
+            if (getCellSize() < CellSkinBase.DEFAULT_CELL_SIZE) {
+                return getCellSize();
+            }
+            
             // FIXME according to profiling, this method is slow and should
             // be optimised
             double prefHeight = 0.0f;
@@ -306,4 +314,5 @@
             return super.computePrefHeight(width);
         }
     }
+    
 }
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableViewSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableViewSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -37,7 +37,6 @@
 import javafx.event.EventHandler;
 import javafx.geometry.Insets;
 import javafx.scene.Node;
-import javafx.scene.control.IndexedCell;
 import javafx.scene.control.Label;
 import javafx.scene.control.SelectionModel;
 import javafx.scene.control.TableColumn;
@@ -49,7 +48,6 @@
 import javafx.scene.layout.StackPane;
 import javafx.util.Callback;
 
-import com.sun.javafx.runnable.Runnable0;
 import com.sun.javafx.scene.control.behavior.TableViewBehavior;
 import com.sun.javafx.scene.control.WeakListChangeListener;
 import com.sun.javafx.scene.control.skin.resources.ControlResources;
@@ -65,8 +63,8 @@
         flow = new VirtualFlow();
         flow.setPannable(false);
         flow.setFocusTraversable(getSkinnable().isFocusTraversable());
-        flow.setCreateCell(new Runnable0<TableRow>() {
-            @Override public TableRow run() {
+        flow.setCreateCell(new Callback<VirtualFlow, TableRow>() {
+            @Override public TableRow call(VirtualFlow flow) {
                 return TableViewSkin.this.createCell();
             }
         });
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -593,7 +593,7 @@
         return index;
     }
 
-    public void positionCaret(HitInfo hit, boolean select) {
+    public void positionCaret(HitInfo hit, boolean select, boolean extendSelection) {
         int pos = hit.getInsertionIndex();
         boolean isNewLine =
                (pos > 0 &&
@@ -607,7 +607,11 @@
         }
 
         if (select) {
-            getSkinnable().selectPositionCaret(pos);
+            if (extendSelection) {
+                getSkinnable().extendSelection(pos);
+            } else {
+                getSkinnable().selectPositionCaret(pos);
+            }
         } else {
             getSkinnable().positionCaret(pos);
         }
@@ -845,7 +849,7 @@
      */
     double targetCaretX = -1;
 
-    protected void downLines(int nLines, boolean select) {
+    protected void downLines(int nLines, boolean select, boolean extendSelection) {
         Text textNode = getTextNode();
         Bounds caretBounds = caretPath.getLayoutBounds();
         double midY = (caretBounds.getMinY() + caretBounds.getMaxY()) / 2 + nLines * fontMetrics.get().getLineHeight();
@@ -862,36 +866,38 @@
                 hit.setCharIndex(pos - 1);
             }
         }
-        positionCaret(hit, select);
+        positionCaret(hit, select, extendSelection);
         targetCaretX = x;
     }
 
     public void previousLine(boolean select) {
-        downLines(-1, select);
+        downLines(-1, select, false);
     }
 
     public void nextLine(boolean select) {
-        downLines(1, select);
+        downLines(1, select, false);
     }
 
     public void previousPage(boolean select) {
-        downLines(-(int)(scrollPane.getViewportBounds().getHeight() / fontMetrics.get().getLineHeight()), select);
+        downLines(-(int)(scrollPane.getViewportBounds().getHeight() / fontMetrics.get().getLineHeight()),
+                  select, false);
     }
 
     public void nextPage(boolean select) {
-        downLines((int)(scrollPane.getViewportBounds().getHeight() / fontMetrics.get().getLineHeight()), select);
+        downLines((int)(scrollPane.getViewportBounds().getHeight() / fontMetrics.get().getLineHeight()),
+                  select, false);
     }
 
-    public void lineStart(boolean select) {
+    public void lineStart(boolean select, boolean extendSelection) {
         Bounds caretBounds = caretPath.getLayoutBounds();
         double midY = (caretBounds.getMinY() + caretBounds.getMaxY()) / 2;
         HitInfo hit = getTextNode().impl_hitTestChar(translateCaretPosition(new Point2D(getTextLeft(), midY)));
-        positionCaret(hit, select);
+        positionCaret(hit, select, extendSelection);
     }
 
-    public void lineEnd(boolean select) {
+    public void lineEnd(boolean select, boolean extendSelection) {
         targetCaretX = Double.MAX_VALUE;
-        downLines(0, select);
+        downLines(0, select, extendSelection);
         targetCaretX = -1;
     }
 
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextFieldSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextFieldSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -283,9 +283,9 @@
         });
         // updated by listener on caretPosition to ensure order
         textNode.impl_caretPositionProperty().set(textField.getCaretPosition());
-        textField.selectionProperty().addListener(new ChangeListener<IndexRange>() {
-            @Override
-            public void changed(ObservableValue<? extends IndexRange> observable, IndexRange oldValue, IndexRange newValue) {
+        textField.selectionProperty().addListener(new InvalidationListener() {
+            @Override public void invalidated(Observable observable) {
+                IndexRange newValue = getSkinnable().getSelection();
                 if (newValue == null || newValue.getLength() == 0) {
                     textNode.impl_selectionStartProperty().set(-1);
                     textNode.impl_selectionEndProperty().set(-1);
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TreeViewSkin.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TreeViewSkin.java	Tue Dec 13 10:11:05 2011 -0500
@@ -26,11 +26,8 @@
 package com.sun.javafx.scene.control.skin;
 
 import javafx.event.EventHandler;
-import javafx.geometry.Pos;
 import javafx.scene.Node;
 import javafx.scene.control.IndexedCell;
-import javafx.scene.control.Label;
-import javafx.scene.control.SelectionModel;
 import javafx.scene.control.TreeCell;
 import javafx.scene.control.TreeItem;
 import javafx.scene.control.TreeItem.TreeModificationEvent;
@@ -39,8 +36,6 @@
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.StackPane;
 
-import com.sun.javafx.runnable.Runnable0;
-import com.sun.javafx.runnable.Runnable1;
 import com.sun.javafx.scene.control.WeakEventHandler;
 import com.sun.javafx.scene.control.behavior.TreeViewBehavior;
 import java.lang.ref.WeakReference;
@@ -56,8 +51,8 @@
         flow = new VirtualFlow();
         flow.setPannable(false);
         flow.setFocusTraversable(getSkinnable().isFocusTraversable());
-        flow.setCreateCell(new Runnable0<TreeCell>() {
-            @Override public TreeCell run() {
+        flow.setCreateCell(new Callback<VirtualFlow, TreeCell>() {
+            @Override public TreeCell call(VirtualFlow flow) {
                 return TreeViewSkin.this.createCell();
             }
         });
@@ -209,12 +204,19 @@
             ((TreeCell)flow.cells.get(i)).updateTreeView(null);
         }
         
-        flow.setCellCount(getItemCount());
-
-        // This needs to be recreateCells here (rather than reconfigureCells)
-        // otherwise issues appear when expanding/collapsing branches. For example,
-        // see RT-14013.
-        flow.recreateCells();
+        int oldCount = flow.getCellCount();
+        int newCount = getItemCount();
+        
+        // if this is not called even when the count is the same, we get a 
+        // memory leak in VirtualFlow.sheet.children. This can probably be 
+        // optimised in the future when time permits.
+        flow.setCellCount(newCount);
+        
+        if (newCount != oldCount) {
+            flow.recreateCells();
+        } else {
+            flow.reconfigureCells();
+        }
     }
 
     @Override public TreeCell<T> createCell() {
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Tue Dec 13 10:11:05 2011 -0500
@@ -49,8 +49,7 @@
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.Rectangle;
 
-import com.sun.javafx.runnable.Runnable0;
-import com.sun.javafx.runnable.Runnable1;
+import javafx.util.Callback;
 
 /**
  * Implementation of a virtualized container using a cell based mechanism.
@@ -266,9 +265,9 @@
      * IndexedCell. The VirtualFlow attempts to reuse cells whenever possible
      * and only creates the minimal number of cells necessary.
      */
-    private Runnable0<? extends IndexedCell> createCell;
-    public Runnable0<? extends IndexedCell> getCreateCell() { return createCell; }
-    protected void setCreateCell(Runnable0<? extends IndexedCell> cc) {
+    private Callback<VirtualFlow, ? extends IndexedCell> createCell;
+    public Callback<VirtualFlow, ? extends IndexedCell> getCreateCell() { return createCell; }
+    protected void setCreateCell(Callback<VirtualFlow, ? extends IndexedCell> cc) {
         this.createCell = cc;
 
         if (createCell != null) {
@@ -471,8 +470,8 @@
 
     public VirtualFlow() {
         mapper = new PositionMapper();
-        mapper.setGetItemSize(new Runnable1<Double, Integer>() {
-            @Override public Double run(Integer itemIndex) {
+        mapper.setGetItemSize(new Callback<Integer, Double>() {
+            @Override public Double call(Integer itemIndex) {
                 return getCellLength(itemIndex);
             }
         });
@@ -1147,12 +1146,14 @@
 
     @Override protected void setWidth(double value) {
         super.setWidth(value);
-        layoutChildren();
+        setNeedsLayout(true);
+        requestLayout();
     }
     
     @Override protected void setHeight(double value) {
         super.setHeight(value);
-        layoutChildren();
+        setNeedsLayout(true);
+        requestLayout();
     }
 
     private void updateScrollBarsAndViewport(double lastViewportLength) {
@@ -1362,7 +1363,7 @@
 
         // We need to use the accumCell and return that
         if (accumCell == null && getCreateCell() != null) {
-            accumCell = getCreateCell().run();
+            accumCell = getCreateCell().call(this);
             accumCellParent.getChildren().add(accumCell);
         }
         setCellIndex(accumCell, index);
@@ -1495,7 +1496,7 @@
             if (pile.size() > 0) {
                 cell = pile.removeFirst();
             } else {
-                cell = createCell.run();
+                cell = createCell.call(this);
             }
         }
         
--- a/javafx-ui-controls/src/javafx/scene/control/ListView.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/ListView.java	Tue Dec 13 10:11:05 2011 -0500
@@ -665,7 +665,8 @@
      **************************************************************************/
 
     /**
-     * Instructs the ListView to begin editing the item in the given index. Once
+     * Instructs the ListView to begin editing the item in the given index, if 
+     * the ListView is {@link #editableProperty() editable}. Once
      * this method is called, if the current {@link #cellFactoryProperty()} is
      * set up to support editing, the Cell will switch its visual state to enable
      * for user input to take place.
@@ -674,6 +675,7 @@
      *     edited.
      */
     public void edit(int itemIndex) {
+        if (!isEditable()) return;
         setEditingIndex(itemIndex);
     }
 
--- a/javafx-ui-controls/src/javafx/scene/control/TableCell.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TableCell.java	Tue Dec 13 10:11:05 2011 -0500
@@ -103,8 +103,7 @@
     };
     
     @Override void indexChanged() {
-        itemDirty = true;
-        requestLayout();
+        updateItem();
     }
 
     /*
--- a/javafx-ui-controls/src/javafx/scene/control/TableColumn.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TableColumn.java	Tue Dec 13 10:11:05 2011 -0500
@@ -380,7 +380,9 @@
     // Contains any children columns that should be nested within this column
     private final ObservableList<TableColumn<S,?>> columns = FXCollections.<TableColumn<S,?>>observableArrayList();
     
-    private final EventHandlerManager eventHandlerManager = new EventHandlerManager(this);
+    // Made static based on findings of RT-18344 - EventHandlerManager is an
+    // expensive class and should be reused amongst classes if at all possible.
+    private static final EventHandlerManager eventHandlerManager = new EventHandlerManager(TableColumn.class);
     
     
     
--- a/javafx-ui-controls/src/javafx/scene/control/TableView.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TableView.java	Tue Dec 13 10:11:05 2011 -0500
@@ -1180,9 +1180,11 @@
 
     /**
      * Causes the cell at the given row/column view indexes to switch into
-     * its editing state, if it is not already in it.
+     * its editing state, if it is not already in it, and assuming that the 
+     * TableView and column are also editable.
      */
     public void edit(int row, TableColumn<S,?> column) {
+        if (!isEditable() || (column != null && ! column.isEditable())) return;
         setEditingCell(new TablePosition(this, row, column));
     }
     
@@ -1843,12 +1845,11 @@
                     if (position < 0) return;
                     
                     List<TablePosition> newIndices = new ArrayList<TablePosition>(selectedCells.size());
-                    int m = Math.min(position, selectedCells.size());
-                    newIndices.addAll(selectedCells.subList(0, m));
         
                     for (int i = 0; i < selectedCells.size(); i++) {
                         TablePosition old = selectedCells.get(i);
-                        newIndices.add(new TablePosition(getTableView(), old.getRow() + shift, old.getTableColumn()));
+                        int newRow = old.getRow() < position ? old.getRow() : old.getRow() + shift;
+                        newIndices.add(new TablePosition(getTableView(), newRow, old.getTableColumn()));
                     }
                     
                     quietClearSelection();
@@ -1935,6 +1936,7 @@
 //            if (! isCellSelectionEnabled() && column != null) return;
 
             TablePosition pos = new TablePosition(getTableView(), row, column);
+            
             if (getSelectionMode() == SelectionMode.SINGLE) {
                 quietClearSelection();
             }
@@ -2012,7 +2014,7 @@
                 int lastIndex = -1;
                 List<TablePosition> positions = new ArrayList<TablePosition>();
 
-                if (row > 0 && row < rowCount) {
+                if (row >= 0 && row < rowCount) {
                     positions.add(new TablePosition(getTableView(), row, null));
                     lastIndex = row;
                 }
--- a/javafx-ui-controls/src/javafx/scene/control/TextArea.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TextArea.java	Tue Dec 13 10:11:05 2011 -0500
@@ -115,7 +115,7 @@
 
         @Override
         @SuppressWarnings("unchecked")
-        public void insert(int index, String text) {
+        public void insert(int index, String text, boolean notifyListeners) {
             if (index < 0
                 || index > contentLength) {
                 throw new IndexOutOfBoundsException();
@@ -188,11 +188,13 @@
 
                 // Update content length
                 contentLength += length;
-                ExpressionHelper.fireValueChangedEvent(helper);
+                if (notifyListeners) {
+                    ExpressionHelper.fireValueChangedEvent(helper);
+                }
             }
         }
 
-        @Override public void delete(int start, int end) {
+        @Override public void delete(int start, int end, boolean notifyListeners) {
             if (start > end) {
                 throw new IllegalArgumentException();
             }
@@ -270,7 +272,9 @@
 
                 // Update content length
                 contentLength -= length;
-                ExpressionHelper.fireValueChangedEvent(helper);
+                if (notifyListeners) {
+                    ExpressionHelper.fireValueChangedEvent(helper);
+                }
             }
         }
 
--- a/javafx-ui-controls/src/javafx/scene/control/TextField.java	Wed Dec 07 09:53:32 2011 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TextField.java	Tue Dec 13 10:11:05 2011 -0500
@@ -64,15 +64,19 @@
             return characters.substring(start, end);
         }
 
-        @Override public void insert(int index, String text) {
+        @Override public void insert(int index, String text, boolean notifyListeners) {
             text = TextInputControl.filterInput(text, true, true);
             characters.insert(index, text);
-            ExpressionHelper.fireValueChangedEvent(helper);
+            if (notifyListeners) {
+                ExpressionHelper.fireValueChangedEvent(helper);
+            }
         }
 
-        @Override public void delete(int start, int end) {
+        @Override public vo