You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/10/28 20:04:33 UTC

svn commit: r1028406 - in /pivot/trunk: tutorials/src/org/apache/pivot/tutorials/layout/ tutorials/src/org/apache/pivot/tutorials/stocktracker/ tutorials/www/ tutorials/xsl/ wtk/src/org/apache/pivot/wtk/

Author: gbrown
Date: Thu Oct 28 18:04:31 2010
New Revision: 1028406

URL: http://svn.apache.org/viewvc?rev=1028406&view=rev
Log:
Continue updating tutorials for Pivot 2.0 release.

Modified:
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/panels.bxml
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTrackerWindow.java
    pivot/trunk/tutorials/www/bxml-primer.xml
    pivot/trunk/tutorials/www/data-binding.xml
    pivot/trunk/tutorials/www/expanders.xml
    pivot/trunk/tutorials/www/file-browsing.xml
    pivot/trunk/tutorials/www/localization.xml
    pivot/trunk/tutorials/www/menu-bars.xml
    pivot/trunk/tutorials/www/meters.xml
    pivot/trunk/tutorials/www/panels.xml
    pivot/trunk/tutorials/www/platform-overview.xml
    pivot/trunk/tutorials/www/property-binding.xml
    pivot/trunk/tutorials/www/repeatable-list-buttons.xml
    pivot/trunk/tutorials/www/rollups.xml
    pivot/trunk/tutorials/www/scroll-bars.xml
    pivot/trunk/tutorials/www/split-panes.xml
    pivot/trunk/tutorials/www/stock-tracker.data-binding.xml
    pivot/trunk/tutorials/www/stock-tracker.events.xml
    pivot/trunk/tutorials/www/stock-tracker.localization.xml
    pivot/trunk/tutorials/www/stock-tracker.ui.xml
    pivot/trunk/tutorials/www/stock-tracker.web-queries.xml
    pivot/trunk/tutorials/www/stock-tracker.xml
    pivot/trunk/tutorials/www/tab-panes.xml
    pivot/trunk/tutorials/www/table-views.custom.xml
    pivot/trunk/tutorials/www/table-views.xml
    pivot/trunk/tutorials/xsl/tutorial.xsl
    pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java

Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/panels.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/panels.bxml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/panels.bxml (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/panels.bxml Thu Oct 28 18:04:31 2010
@@ -20,12 +20,14 @@ limitations under the License.
     xmlns:bxml="http://pivot.apache.org/bxml"
     xmlns:media="org.apache.pivot.wtk.media"
     xmlns="org.apache.pivot.wtk">
-    <Panel>
-        <PushButton buttonData="Button 1"
-            x="20" y="20" width="120" height="24"/>
-        <PushButton buttonData="Button 2"
-            x="40" y="50" width="120" height="24"/>
-        <PushButton buttonData="Button 3"
-            x="60" y="80" width="120" height="24"/>
-    </Panel>
+    <Border>
+        <Panel>
+            <PushButton buttonData="Button 1"
+                x="20" y="20" width="120" height="24"/>
+            <PushButton buttonData="Button 2"
+                x="40" y="50" width="120" height="24"/>
+            <PushButton buttonData="Button 3"
+                x="60" y="80" width="120" height="24"/>
+        </Panel>
+    </Border>
 </Window>

Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTrackerWindow.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTrackerWindow.java?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTrackerWindow.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/StockTrackerWindow.java Thu Oct 28 18:04:31 2010
@@ -285,13 +285,13 @@ public class StockTrackerWindow extends 
         if (symbols.getLength() > 0) {
             getQuery = new GetQuery(SERVICE_HOSTNAME, SERVICE_PATH);
 
-            StringBuilder symbolsArgumentBuilder = new StringBuilder();
+            StringBuilder symbolsParameterBuilder = new StringBuilder();
             for (int i = 0, n = symbols.getLength(); i < n; i++) {
                 if (i > 0) {
-                    symbolsArgumentBuilder.append(",");
+                    symbolsParameterBuilder.append(",");
                 }
 
-                symbolsArgumentBuilder.append(symbols.get(i));
+                symbolsParameterBuilder.append(symbols.get(i));
             }
 
             // Format:
@@ -303,8 +303,8 @@ public class StockTrackerWindow extends 
             // g - low value
             // c1 - change percentage
             // v - volume
-            String symbolsArgument = symbolsArgumentBuilder.toString();
-            getQuery.getParameters().put("s", symbolsArgument);
+            String symbolsParameter = symbolsParameterBuilder.toString();
+            getQuery.getParameters().put("s", symbolsParameter);
             getQuery.getParameters().put("f", "snl1ohgc1v");
 
             CSVSerializer quoteSerializer = new CSVSerializer(StockQuote.class);

Modified: pivot/trunk/tutorials/www/bxml-primer.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/bxml-primer.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/bxml-primer.xml (original)
+++ pivot/trunk/tutorials/www/bxml-primer.xml Thu Oct 28 18:04:31 2010
@@ -104,7 +104,7 @@ limitations under the License.
         <h4>Dictionary vs. BeanAdapter</h4>
 
         <p>
-            In general, uppercase elements in a WTKX file will represent instances of JavaBean
+            In general, uppercase elements in a WTKX file will represent instances of Java bean
             classes. Internally, the WTKX serializer uses an instance of
             <tt>org.apache.pivot.beans.BeanAdapter</tt> to wrap the instantiated class and
             invoke its setter methods. However, if the class name represents an object that already
@@ -129,7 +129,7 @@ limitations under the License.
         </p>
 
         <ul>
-            <li><p>A standard JavaBean property setter</p></li>
+            <li><p>A standard Java bean property setter</p></li>
             <li><p>A read-only sequence</p></li>
             <li><p>A read-only dictionary</p></li>
             <li><p>An event listener list</p></li>
@@ -140,9 +140,9 @@ limitations under the License.
             property so that it can process the element's contents correctly.
         </p>
 
-        <h4>JavaBean Property Setters</h4>
+        <h4>Java Bean Property Setters</h4>
         <p>
-            If the element represents a JavaBean property setter, the contents of the element
+            If the element represents a Java bean property setter, the contents of the element
             (which must be either a text node or a class instance element) are passed as the value
             to the setter for the property. For example, the following WTKX creates an instance of
             the <tt>Label</tt> class and sets the value of the label's "text" property to "Hello,
@@ -250,12 +250,12 @@ limitations under the License.
         </p>
 
         <ul>
-            <li><p>A standard JavaBean property setter</p></li>
+            <li><p>A standard Java bean property setter</p></li>
             <li><p>A "static" property setter (explained below)</p></li>
             <li><p>An event listener</p></li>
         </ul>
 
-        <h4>JavaBean Property Setters</h4>
+        <h4>Java Bean Property Setters</h4>
 
         <p>
             If an attribute represents a bean property setter, the attribute value is passed as the

Modified: pivot/trunk/tutorials/www/data-binding.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/data-binding.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/data-binding.xml (original)
+++ pivot/trunk/tutorials/www/data-binding.xml Thu Oct 28 18:04:31 2010
@@ -43,8 +43,8 @@ limitations under the License.
 
         <p>
             The following application demonstrates data binding. It allows the user to load a form
-            with address data either from a JSON file or from a JavaBean object, as well as clear
-            the form. Note that binding to a JavaBean is accomplished by wrapping the bean in an
+            with address data either from a JSON file or from a Java bean object, as well as clear
+            the form. Note that binding to a Java bean is accomplished by wrapping the bean in an
             instance of <tt>org.apache.pivot.beans.BeanAdapter</tt> before passing it to the
             <tt>load()</tt> method:
         </p>
@@ -225,7 +225,7 @@ limitations under the License.
         </source>
 
         <p>
-            The JavaBean version, which represents the same data, is composed of the following
+            The Java bean version, which represents the same data, is composed of the following
             classes:
         </p>
 

Modified: pivot/trunk/tutorials/www/expanders.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/expanders.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/expanders.xml (original)
+++ pivot/trunk/tutorials/www/expanders.xml Thu Oct 28 18:04:31 2010
@@ -39,18 +39,18 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>/org/apache/pivot/tutorials/navigation/expanders.wtkx</src>
+                <src>/org/apache/pivot/tutorials/navigation/expanders.bxml</src>
             </startup-properties>
         </application>
 
         <p>
-            The WTKX source for this example is as follows. It declares three expanders contained
+            The BXML source for this example is as follows. It declares three expanders contained
             in a vertical flow pane, which itself is contained in a scroll pane. The contents of
-            the expanders are defined in several external WTKX files that are included by the main
+            the expanders are defined in several external BXML files that are included by the main
             file:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/navigation/expanders.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/navigation/expanders.bxml">
             <![CDATA[
             <Window title="Expanders" maximized="true"
                 xmlns:bxml="http://pivot.apache.org/bxml"

Modified: pivot/trunk/tutorials/www/file-browsing.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/file-browsing.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/file-browsing.xml (original)
+++ pivot/trunk/tutorials/www/file-browsing.xml Thu Oct 28 18:04:31 2010
@@ -29,14 +29,14 @@ limitations under the License.
 
         <application class="org.apache.pivot.wtk.ScriptApplication"
             width="640" height="480">
-            <libraries>
+            <libraries signed="true">
                 <library>core</library>
                 <library>wtk</library>
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>/org/apache/pivot/tutorials/?</src>
+                <src>/org/apache/pivot/tutorials/filebrowsing/file_browsing.bxml</src>
             </startup-properties>
         </application>
 

Modified: pivot/trunk/tutorials/www/localization.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/localization.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/localization.xml (original)
+++ pivot/trunk/tutorials/www/localization.xml Thu Oct 28 18:04:31 2010
@@ -186,9 +186,8 @@ limitations under the License.
         </source>
 
         <p>
-            Note that the application accepts a startup property named "language" to allow a caller
-            to override the default locale. The following example shows the application loaded with
-            "language" value of "de" (the applet is signed to allow the code to set the locale):
+            The following example shows the application localized in German. Note that the applet
+            is signed to allow the code to set the "user.language" system property:
         </p>
 
         <application class="org.apache.pivot.tutorials.localization.Localization"
@@ -199,9 +198,9 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
-            <startup-properties>
-                <language>de</language>
-            </startup-properties>
+            <system-properties>
+                <user.language>de</user.language>
+            </system-properties>
         </application>
 
         <p>

Modified: pivot/trunk/tutorials/www/menu-bars.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/menu-bars.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/menu-bars.xml (original)
+++ pivot/trunk/tutorials/www/menu-bars.xml Thu Oct 28 18:04:31 2010
@@ -48,7 +48,7 @@ limitations under the License.
 
         <application class="org.apache.pivot.wtk.ScriptApplication"
             width="640" height="480">
-            <libraries>
+            <libraries signed="true">
                 <library>core</library>
                 <library>wtk</library>
                 <library>wtk-terra</library>

Modified: pivot/trunk/tutorials/www/meters.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/meters.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/meters.xml (original)
+++ pivot/trunk/tutorials/www/meters.xml Thu Oct 28 18:04:31 2010
@@ -78,12 +78,12 @@ limitations under the License.
 
         <p>
             The Java source is as follows. The main application class defines an inner class that
-            extends the <tt>pivot.util.concurrent.Task</tt> class to simulate a background
+            extends the <tt>org.apache.pivot.util.concurrent.Task</tt> class to simulate a background
             operation. This task simply sleeps for 100ms at a time and updates the meter when it
             wakes up to reflect the current count. Since all UI updates must be performed on the
             UI thread, the task queues a callback to set the meter's percent complete; a
-            <tt>pivot.wtk.TaskAdapter</tt> is used to process the task notifications for the same
-            reason:
+            <tt>org.apache.pivot.wtk.TaskAdapter</tt> is used to process the task notifications for
+            the same reason:
         </p>
 
         <source type="java" location="org/apache/pivot/tutorials/progress/Meters.java">

Modified: pivot/trunk/tutorials/www/panels.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/panels.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/panels.xml (original)
+++ pivot/trunk/tutorials/www/panels.xml Thu Oct 28 18:04:31 2010
@@ -62,14 +62,16 @@ limitations under the License.
                 xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns:media="org.apache.pivot.wtk.media"
                 xmlns="org.apache.pivot.wtk">
-                <Panel>
-                    <PushButton buttonData="Button 1"
-                        x="20" y="20" width="120" height="24"/>
-                    <PushButton buttonData="Button 2"
-                        x="40" y="50" width="120" height="24"/>
-                    <PushButton buttonData="Button 3"
-                        x="60" y="80" width="120" height="24"/>
-                </Panel>
+                <Border>
+                    <Panel>
+                        <PushButton buttonData="Button 1"
+                            x="20" y="20" width="120" height="24"/>
+                        <PushButton buttonData="Button 2"
+                            x="40" y="50" width="120" height="24"/>
+                        <PushButton buttonData="Button 3"
+                            x="60" y="80" width="120" height="24"/>
+                    </Panel>
+                </Border>
             </Window>
             ]]>
         </source>

Modified: pivot/trunk/tutorials/www/platform-overview.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/platform-overview.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/platform-overview.xml (original)
+++ pivot/trunk/tutorials/www/platform-overview.xml Thu Oct 28 18:04:31 2010
@@ -61,7 +61,7 @@ limitations under the License.
         <ul>
             <li>
                 <tt>org.apache.pivot.beans</tt> - Classes that facilitate and simplify programmatic
-                interaction with Java Bean types.
+                interaction with Java bean types.
             </li>
             <li>
                 <tt>org.apache.pivot.collections</tt> - A set of classes and interfaces that serve

Modified: pivot/trunk/tutorials/www/property-binding.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/property-binding.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/property-binding.xml (original)
+++ pivot/trunk/tutorials/www/property-binding.xml Thu Oct 28 18:04:31 2010
@@ -16,12 +16,9 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-<document>
+<document id="property-binding">
     <properties>
         <title>Property Binding</title>
-        <description>
-            Demonstrates dynamic property binding in Pivot.
-        </description>
     </properties>
 
     <body>
@@ -29,6 +26,7 @@ limitations under the License.
             This application demonstrates Pivot's ability to dynamically bind component properties
             to namespace values including script variables and other component properties.
         </p>
+
         <application class="org.apache.pivot.wtk.ScriptApplication" width="480" height="360">
             <libraries>
                 <library>core</library>

Modified: pivot/trunk/tutorials/www/repeatable-list-buttons.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/repeatable-list-buttons.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/repeatable-list-buttons.xml (original)
+++ pivot/trunk/tutorials/www/repeatable-list-buttons.xml Thu Oct 28 18:04:31 2010
@@ -33,7 +33,7 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>org/apache/pivot/tutorials/lists/repeatable_list_buttons.bxml</src>
+                <src>/org/apache/pivot/tutorials/lists/repeatable_list_buttons.bxml</src>
             </startup-properties>
         </application>
 

Modified: pivot/trunk/tutorials/www/rollups.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/rollups.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/rollups.xml (original)
+++ pivot/trunk/tutorials/www/rollups.xml Thu Oct 28 18:04:31 2010
@@ -37,7 +37,7 @@ limitations under the License.
         </p>
 
         <application class="org.apache.pivot.wtk.ScriptApplication"
-            width="480" height="360">
+            width="220" height="360">
             <libraries>
                 <library>core</library>
                 <library>wtk</library>

Modified: pivot/trunk/tutorials/www/scroll-bars.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/scroll-bars.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/scroll-bars.xml (original)
+++ pivot/trunk/tutorials/www/scroll-bars.xml Thu Oct 28 18:04:31 2010
@@ -68,7 +68,7 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>org/apache/pivot/tutorials/boundedrange/scroll_bars.bxml</src>
+                <src>/org/apache/pivot/tutorials/boundedrange/scroll_bars.bxml</src>
             </startup-properties>
         </application>
 

Modified: pivot/trunk/tutorials/www/split-panes.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/split-panes.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/split-panes.xml (original)
+++ pivot/trunk/tutorials/www/split-panes.xml Thu Oct 28 18:04:31 2010
@@ -70,15 +70,15 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>/org/apache/pivot/tutorials/layout/split_panes.wtkx</src>
+                <src>/org/apache/pivot/tutorials/layout/split_panes.bxml</src>
             </startup-properties>
         </application>
 
         <p>
-            The WTKX for this example is shown below:
+            The BXML for this example is shown below:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/layout/split_panes.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/layout/split_panes.bxml">
             <![CDATA[
             <Window title="Split Panes" maximized="true"
                 WindowStateListener.windowOpened="init();"
@@ -139,7 +139,7 @@ limitations under the License.
         </source>
 
         <p>
-            Since this example is written entirely in WTKX and script, there is no associated Java
+            Since this example is written entirely in BXML and script, there is no associated Java
             source.
         </p>
     </body>

Modified: pivot/trunk/tutorials/www/stock-tracker.data-binding.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/stock-tracker.data-binding.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/stock-tracker.data-binding.xml (original)
+++ pivot/trunk/tutorials/www/stock-tracker.data-binding.xml Thu Oct 28 18:04:31 2010
@@ -43,7 +43,7 @@ limitations under the License.
         <p>
             The <tt>Object</tt> value passed to these methods provides the "bind context". It
             may be either an implementation of the <tt>org.apache.pivot.collections.Dictionary</tt>
-            interface or a Java Bean value that can be wrapped in an instance of
+            interface or a Java bean value that can be wrapped in an instance of
             <tt>org.apache.pivot.beans.BeanAdapter</tt>, which implements <tt>Dictionary</tt>.
         </p>
 
@@ -83,34 +83,32 @@ limitations under the License.
             <![CDATA[
             <Form styles="{padding:0, fill:true, showFlagIcons:false, showFlagHighlight:false,
                 leftAlignLabels:true}">
-                <sections>
-                    <Form.Section>
-                        <wtkx:define>
-                            <stocktracker:ValueMapping wtkx:id="valueMapping"/>
-                            <stocktracker:ChangeMapping wtkx:id="changeMapping"/>
-                            <stocktracker:VolumeMapping wtkx:id="volumeMapping"/>
-                        </wtkx:define>
-
-                        <Label wtkx:id="valueLabel" Form.label="%value"
-                            textKey="value" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="changeLabel" Form.label="%change"
-                            textKey="change" textBindMapping="$changeMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="openingValueLabel" Form.label="%openingValue"
-                            textKey="openingValue" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="highValueLabel" Form.label="%highValue"
-                            textKey="highValue" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="lowValueLabel" Form.label="%lowValue"
-                            textKey="lowValue" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="volumeLabel" Form.label="%volume"
-                            textKey="volume" textBindMapping="$volumeMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                    </Form.Section>
-                </sections>
+                <Form.Section>
+                    <bxml:define>
+                        <stocktracker:ValueMapping bxml:id="valueMapping"/>
+                        <stocktracker:ChangeMapping bxml:id="changeMapping"/>
+                        <stocktracker:VolumeMapping bxml:id="volumeMapping"/>
+                    </bxml:define>
+
+                    <Label bxml:id="valueLabel" Form.label="%value"
+                        textKey="value" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="changeLabel" Form.label="%change"
+                        textKey="change" textBindMapping="$changeMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="openingValueLabel" Form.label="%openingValue"
+                        textKey="openingValue" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="highValueLabel" Form.label="%highValue"
+                        textKey="highValue" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="lowValueLabel" Form.label="%lowValue"
+                        textKey="lowValue" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="volumeLabel" Form.label="%volume"
+                        textKey="volume" textBindMapping="$volumeMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                </Form.Section>
             </Form>
             ]]>
         </source>
@@ -150,7 +148,7 @@ limitations under the License.
             Note that the <tt>load()</tt> method is actually called on the detail pane itself
             rather than on the parent container of the detail labels (an instance of <tt>Form</tt>).
             This is because the application also needs to bind to the label that contains the
-            company name, which is not a child of the <tt>Form</tt>.
+            company name, which is not a child of the <tt>Form</tt>:
         </p>
 
         <source type="xml">

Modified: pivot/trunk/tutorials/www/stock-tracker.events.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/stock-tracker.events.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/stock-tracker.events.xml (original)
+++ pivot/trunk/tutorials/www/stock-tracker.events.xml Thu Oct 28 18:04:31 2010
@@ -23,7 +23,7 @@ limitations under the License.
 
     <body>
         <p>
-            While WTKX is often used to declare the <i>structure</i> of an application, the
+            While BXML is often used to declare the <i>structure</i> of an application, the
             application's <i>behavior</i> is still defined in code (either Java or a JVM-compatible
             scripting language). Most application logic is executed in response to an "event"
             triggered by some external source, such as user input or the completion of an asynchronous
@@ -47,54 +47,22 @@ limitations under the License.
 
         <source type="java">
             <![CDATA[
-            String language = properties.get(LANGUAGE_PROPERTY_NAME);
-            if (language != null) {
-                Locale.setDefault(new Locale(language));
+            @Override
+            public void startup(Display display, Map<String, String> properties) throws Exception {
+                BXMLSerializer bxmlSerializer = new BXMLSerializer();
+                window = (StockTrackerWindow)bxmlSerializer.readObject(StockTrackerWindow.class,
+                    "stock_tracker_window.bxml", true);
+                window.open(display);
             }
-
-            Resources resources = new Resources(StockTrackerWindow.class.getName());
-            WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
-            window = (StockTrackerWindow)wtkxSerializer.readObject(this, "stock_tracker_window.wtkx");
-            window.open(display);
             ]]>
         </source>
 
         <p>
-            This code does the following:
+            This code creates an instance of <tt>BXMLSerializer</tt> and loads the BXML source for
+            the main window. It then opens the main window, causing the application to appear on
+            the screen.
         </p>
 
-        <ul>
-            <li>
-                <p>
-                    Retrieves the "langauge" argument that was provided to the application context
-                    when it was created - for desktop applications, this is a command-line
-                    argument; in the browser, it is passed via an applet parameter
-                </p>
-            </li>
-            <li>
-                <p>
-                    Sets the default locale to an instance corresponding to the language
-                    argument
-                </p>
-            </li>
-            <li>
-                <p>
-                    Loads the application resources
-                </p>
-            </li>
-            <li>
-                <p>
-                    Creates an instance of <tt>WTKXSerializer</tt> and loads the WTKX source for
-                    the main window
-                </p>
-            </li>
-            <li>
-                <p>
-                    Opens the main window, causing the application to appear on the screen
-                </p>
-            </li>
-        </ul>
-
         <h2>Adding Event Listeners</h2>
 
         <p>
@@ -117,7 +85,9 @@ limitations under the License.
         <source type="java">
             <![CDATA[
             @Override
-            public void initialize(Resources resources) {
+            public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
+                ...
+
                 stocksTableView.getTableViewSelectionListeners().add(new TableViewSelectionListener.Adapter() {
                     @Override
                     public void selectedRangesChanged(TableView tableView, Sequence<Span> previousSelectedRanges) {
@@ -154,7 +124,7 @@ limitations under the License.
             Note that, though these handlers are implemented as anonymous inner classes, this is
             not required - any class that implements the appropriate listener interface can
             register as a listener. It is also possible to define listeners in script within the
-            WTKX file itself; this is discussed in more detail in the
+            BXML file itself; this is discussed in more detail in the
             <a href="scripting.html">Scripting</a> section.
         </p>
 
@@ -173,7 +143,7 @@ limitations under the License.
             private Action addSymbolAction = new Action(false) {
                 @Override
                 @SuppressWarnings("unchecked")
-                public void perform() {
+                public void perform(Component source) {
                     ...
                 }
             };

Modified: pivot/trunk/tutorials/www/stock-tracker.localization.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/stock-tracker.localization.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/stock-tracker.localization.xml (original)
+++ pivot/trunk/tutorials/www/stock-tracker.localization.xml Thu Oct 28 18:04:31 2010
@@ -82,47 +82,45 @@ limitations under the License.
 
         <p>
             As noted in earlier sections, references to these string resources can be embedded
-            directly within a WTKX file:
+            directly within a BXML file:
         </p>
 
         <source type="xml">
             <![CDATA[
             <Form styles="{padding:0, fill:true, showFlagIcons:false, showFlagHighlight:false,
                 leftAlignLabels:true}">
-                <sections>
-                    <Form.Section>
-                        <wtkx:define>
-                            <stocktracker:ValueMapping wtkx:id="valueMapping"/>
-                            <stocktracker:ChangeMapping wtkx:id="changeMapping"/>
-                            <stocktracker:VolumeMapping wtkx:id="volumeMapping"/>
-                        </wtkx:define>
-
-                        <Label wtkx:id="valueLabel" Form.label="%value"
-                            textKey="value" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="changeLabel" Form.label="%change"
-                            textKey="change" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="openingValueLabel" Form.label="%openingValue"
-                            textKey="openingValue" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="highValueLabel" Form.label="%highValue"
-                            textKey="highValue" textBindMapping="$valueMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="lowValueLabel" Form.label="%lowValue"
-                            textKey="lowValue" textBindMapping="$changeMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                        <Label wtkx:id="volumeLabel" Form.label="%volume"
-                            textKey="volume" textBindMapping="$volumeMapping"
-                            styles="{horizontalAlignment:'right'}"/>
-                    </Form.Section>
-                </sections>
+                <Form.Section>
+                    <bxml:define>
+                        <stocktracker:ValueMapping bxml:id="valueMapping"/>
+                        <stocktracker:ChangeMapping bxml:id="changeMapping"/>
+                        <stocktracker:VolumeMapping bxml:id="volumeMapping"/>
+                    </bxml:define>
+
+                    <Label bxml:id="valueLabel" Form.label="%value"
+                        textKey="value" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="changeLabel" Form.label="%change"
+                        textKey="change" textBindMapping="$changeMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="openingValueLabel" Form.label="%openingValue"
+                        textKey="openingValue" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="highValueLabel" Form.label="%highValue"
+                        textKey="highValue" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="lowValueLabel" Form.label="%lowValue"
+                        textKey="lowValue" textBindMapping="$valueMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                    <Label bxml:id="volumeLabel" Form.label="%volume"
+                        textKey="volume" textBindMapping="$volumeMapping"
+                        styles="{horizontalAlignment:'right'}"/>
+                </Form.Section>
             </Form>
             ]]>
         </source>
 
         <p>
-            The application loads the resources for the appropriate locale at startup, and the WTKX
+            The application loads the resources for the appropriate locale at startup, and the BXML
             serializer handles the details of resource substitution so the developer doesn't have
             to worry about it. The following applet demonstrates the Stock Tracker application run
             using the "fr" locale. No code changes are required; the same JAR files are used to
@@ -138,13 +136,13 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
-            <startup-properties>
-                <language>fr</language>
-            </startup-properties>
+            <system-properties>
+                <user.language>fr</user.language>
+            </system-properties>
         </application>
 
         <p>
-            Not all localization requirements can be handled by WTKX alone, however. For example,
+            Not all localization requirements can be handled by BXML alone, however. For example,
             Stock Tracker needs to manually handle the localization of the "last updated" message:
         </p>
 
@@ -157,7 +155,7 @@ limitations under the License.
         </source>
 
         <p>
-            However, most static localization can be addressed in the WTKX source itself, making it
+            However, most static localization can be addressed in the BXML source itself, making it
             very easy to build internationalized applications in Pivot.
         </p>
 

Modified: pivot/trunk/tutorials/www/stock-tracker.ui.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/stock-tracker.ui.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/stock-tracker.ui.xml (original)
+++ pivot/trunk/tutorials/www/stock-tracker.ui.xml Thu Oct 28 18:04:31 2010
@@ -18,93 +18,88 @@ limitations under the License.
 
 <document id="stock-tracker.ui">
     <properties>
-        <title>UI Markup Using WTKX</title>
+        <title>UI Markup Using BXML</title>
     </properties>
 
     <body>
         <p>
             The user interface of a Pivot application is often defined using an XML markup language
-            called WTKX (the "WTK" in WTKX stands for "windowing toolkit" and is taken from the
-            name of the Pivot package that contains most of the user interface elements,
-            <tt>org.apache.pivot.wtk</tt>; the "X" comes from "XML"). WTKX is effectively a
-            shorthand for instantiating and configuring Java class instances. Though it can
-            be used to declaratively construct any type of Java object hierarchy, it is
-            most often used to define the structure of an application's user interface - the
-            hierarchical structure of an XML document closely parallels the structure of the
-            application's component hierarchy, which makes it easy to visualize the resulting
-            output.
+            called BXML ("Bean XML"). BXML is effectively a shorthand for instantiating and
+            configuring Java class instances. Though it can be used to declaratively construct any
+            type of Java object hierarchy, it is most often used to define the structure of an
+            application's user interface - the hierarchical structure of an XML document closely
+            parallels the structure of the application's component hierarchy, which makes it easy
+            to visualize the resulting output.
         </p>
 
         <p>
-            In general, XML elements in WTKX refer either to class instances or properties of class
+            In general, XML elements in BXML refer either to class instances or properties of class
             instances. Any element that begins with a capital letter represents a class instance,
             and elements beginning with lowercase letters represent properties. The exception is
-            elements that use the "wtkx" namespace prefix, which represent processing directives to
-            the WTKX serializer. Similarly, XML attributes generally represent properties, with the
-            exception of attributes that begin with a "wtkx" prefix, which contain processing
+            elements that use the "bxml" namespace prefix, which represent processing directives to
+            the BXML serializer. Similarly, XML attributes generally represent properties, with the
+            exception of attributes that begin with a "bxml" prefix, which contain processing
             information used by the serializer.
         </p>
 
         <h2>StockTrackerWindow</h2>
 
         <p>
-            The following is a snippet of code taken from <tt>stock_tracker_window.wtkx</tt>,
-            the WTKX file that defines the main window of the Stock Tracker application:
+            The following is a snippet of code taken from <tt>stock_tracker_window.bxml</tt>,
+            the BXML file that defines the main window of the Stock Tracker application:
         </p>
 
         <source type="xml">
             <![CDATA[
             <stocktracker:StockTrackerWindow title="%stockTracker" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+                xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns:content="org.apache.pivot.wtk.content"
                 xmlns:stocktracker="org.apache.pivot.tutorials.stocktracker"
                 xmlns="org.apache.pivot.wtk">
-                <content>
-                    <TablePane styles="{padding:8, horizontalSpacing:6, verticalSpacing:6}">
-                        <columns>
-                            <TablePane.Column width="1*" />
-                        </columns>
-
-                        <rows>
-                            ...
-
-                            <TablePane.Row height="1*">
-                                <SplitPane splitRatio="0.4">
-                                    <left>
-                                        ...
-                                    </left>
-                                    <right>
-                                        <Border styles="{padding:6, color:10}">
-                                            <content>
-                                                <wtkx:include wtkx:id="detailPane" src="detail_pane.wtkx"/>
-                                            </content>
-                                        </Border>
-                                    </right>
-                                </SplitPane>
-                            </TablePane.Row>
-
-                            <TablePane.Row height="-1">
-                                <BoxPane styles="{horizontalAlignment:'left', verticalAlignment:'center'}">
-                                    <Label text="%symbol" styles="{font:{bold:true}}" />
-                                    <TextInput wtkx:id="symbolTextInput" textSize="10"
-                                        maximumLength="8" />
-                                        ...
-                        </rows>
-                    </TablePane>
-                </content>
+                <TablePane styles="{padding:8, horizontalSpacing:6, verticalSpacing:6}">
+                    <columns>
+                        <TablePane.Column width="1*" />
+                    </columns>
+
+                    <TablePane.Row height="-1">
+                        <Label text="%stockTracker"
+                            styles="{font:{size:14, bold:true}, verticalAlignment:'center'}" />
+                    </TablePane.Row>
+
+                    <TablePane.Row height="1*">
+                        <SplitPane splitRatio="0.4">
+                            <left>
+                                ...
+                            </left>
+
+                            <right>
+                                <Border styles="{padding:6, color:10}">
+                                    <bxml:include bxml:id="detailPane" src="detail_pane.bxml"/>
+                                </Border>
+                            </right>
+                        </SplitPane>
+                    </TablePane.Row>
+
+                    <TablePane.Row height="-1">
+                        <BoxPane styles="{horizontalAlignment:'left', verticalAlignment:'center'}">
+                            <Label text="%symbol" styles="{font:{bold:true}}" />
+                            <TextInput bxml:id="symbolTextInput" textSize="10"
+                                maximumLength="8" />
+                                ...
+                </TablePane>
             </stocktracker:StockTrackerWindow>
             ]]>
         </source>
 
         <p>
-            The root node of <tt>stock_tracker_window.wtkx</tt> is a
+            The root node of <tt>stock_tracker_window.bxml</tt> is a
             <tt>stocktracker:StockTrackerWindow</tt> element. This element corresponds to an
             instance of <tt>org.apache.pivot.tutorials.stocktracker.StockTrackerWindow</tt>. In
-            WTKX, XML namespaces are used to associate a class element with a Java package. In this
+            BXML, XML namespaces are used to associate a class element with a Java package. In this
             case, "stocktracker" is mapped to <tt>org.apache.pivot.tutorials.stocktracker</tt>, and
             "content" is mapped to <tt>org.apache.pivot.wtk.content</tt>; the default namespace is
             mapped to <tt>org.apache.pivot.wtk</tt>, the Java package that contains most of Pivot's
-            common components. The file also declares the "wtkx", which is specific to the
+            common components. The file also declares the "bxml", which is specific to the
             serializer.
         </p>
 
@@ -120,26 +115,27 @@ limitations under the License.
 
         <h3>The Bindable Interface</h3>
         <p>
-            <tt>StockTrackerWindow</tt> implements the <tt>org.apache.pivot.wtkx.Bindable</tt>
+            <tt>StockTrackerWindow</tt> implements the <tt>org.apache.pivot.beans.Bindable</tt>
             interface. This interface allows developers to easily map elements declared with a
-            <tt>wtkx:id</tt> attribute to Java member variables. For example,
+            <tt>bxml:id</tt> attribute to Java member variables. For example,
             <tt>StockTrackerWindow</tt> declares the following member variables:
         </p>
 
         <source type="xml">
             <![CDATA[
-            @WTKX private TextInput symbolTextInput = null;
-            @WTKX private Button addSymbolButton = null;
-            @WTKX private Button removeSymbolsButton = null;
-            @WTKX private BoxPane detailPane = null;
-            @WTKX private Label lastUpdateLabel = null;
-            @WTKX private Button yahooFinanceButton = null;
+            @BXML private TableView stocksTableView = null;
+            @BXML private TextInput symbolTextInput = null;
+            @BXML private Button addSymbolButton = null;
+            @BXML private Button removeSymbolsButton = null;
+            @BXML private BoxPane detailPane = null;
+            @BXML private Label lastUpdateLabel = null;
+            @BXML private Button yahooFinanceButton = null;
             ]]>
         </source>
 
         <p>
             Because <tt>StockTrackerWindow</tt> implements <tt>Bindable</tt>, these member variables
-            are automatically populated with the corresponding values declared in the WTKX file.
+            are automatically populated with the corresponding values declared in the BXML file.
             <tt>Bindable</tt> defines a single method, <tt>initialize()</tt>, that is called when
             the root element has been fully loaded and the bound values have been processed. This
             allows the bound class to perform any required initialization (generally event
@@ -150,42 +146,42 @@ limitations under the License.
         <h3>Attribute Resolution and Includes</h3>
 
         <p>
-            The WTKX snippet above also illustrates a couple other important aspects of WTKX markup:
+            The BXML snippet above also illustrates a couple other important aspects of BXML markup:
             resource resolution and includes. Resource resolution allows a developer to insert
             "tags" in the markup that will be replaced at load time with a localized equivalent.
             This makes it very easy to build internationalized applications in Pivot. Any attribute
             value that begins with a "%" character is considered a resource key, and the value
-            for the attribute is obtained from a resource bundle associated with the WTKX file.
+            for the attribute is obtained from a resource bundle associated with the BXML file.
             This is discussed in more detail in the
             <a href="stock-tracker.localization.html">Localization</a> section.
         </p>
 
         <p>
-            WTKX also supports two other attribute resolution operators: "@" and "$". The "at" symbol
+            BXML also supports two other attribute resolution operators: "@" and "$". The "at" symbol
             is used to resolve URLs; any attribute value preceded by an "at" symbol is converted to an
-            instance of <tt>java.net.URL</tt> relative to the current WTKX file. This notation is
+            instance of <tt>java.net.URL</tt> relative to the current BXML file. This notation is
             very useful for loading images from a location relative to the current file.
         </p>
 
         <p>
             The dollar sign is a "variable dereference" operator. Though it isn't shown in this
-            example, it is possible to embed script code in a WTKX file using the
-            <tt>&lt;wtkx:script&gt;</tt> tag. Any JVM-capable scripting language is supported,
-            including JavaScript, Groovy, and Scala, among others. Any attribute value preceded by
+            example, it is possible to embed script code in a BXML file using the
+            <tt>&lt;bxml:script&gt;</tt> tag. Any JVM-capable scripting language is supported,
+            including JavaScript, Groovy, adnd Clojure, among others. Any attribute value preceded by
             a dollar sign is resolved to an instance of a script variable declared within the page.
             This allows developers to define variables in script and then easily use them as
             initialization paramters for class instances declared as elements. Script code can
-            also refer to any page elements identified via a <tt>wtkx:id</tt> attribute as globally
+            also refer to any page elements identified via a <tt>bxml:id</tt> attribute as globally
             scoped page level variables.
         </p>
 
         <p>
-            Includes allow a developer to embed content defined in an external WTKX file as if it
+            Includes allow a developer to embed content defined in an external BXML file as if it
             was defined in the source file itself. This is useful for partitioning content into
             manageable pieces (for example, when working on large applications or with multiple
             developers, or when defining reusable content templates). The detail pane in the
-            Stock Tracker application is defined in an include, <tt>detail_pane.wtkx</tt>. This file
-            is included into the main window via the <tt>&lt;wtkx:include&gt;</tt> tag.
+            Stock Tracker application is defined in an include, <tt>detail_pane.bxml</tt>. This file
+            is included into the main window via the <tt>&lt;bxml:include&gt;</tt> tag.
         </p>
     </body>
 </document>

Modified: pivot/trunk/tutorials/www/stock-tracker.web-queries.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/stock-tracker.web-queries.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/stock-tracker.web-queries.xml (original)
+++ pivot/trunk/tutorials/www/stock-tracker.web-queries.xml Thu Oct 28 18:04:31 2010
@@ -97,25 +97,33 @@ limitations under the License.
         </source>
 
         <p>
-            Then, the value of the "s" argument is constructed by joining the values in the symbol
+            Then, the value of the "s" parameter is constructed by joining the values in the symbol
             list with commas, and the query arguments are applied:
         </p>
 
         <source type="java">
             <![CDATA[
-            StringBuilder symbolsArgumentBuilder = new StringBuilder();
+            StringBuilder symbolsParameterBuilder = new StringBuilder();
             for (int i = 0, n = symbols.getLength(); i < n; i++) {
                 if (i > 0) {
-                    symbolsArgumentBuilder.append(",");
+                    symbolsParameterBuilder.append(",");
                 }
 
-                symbolsArgumentBuilder.append(symbols.get(i));
+                symbolsParameterBuilder.append(symbols.get(i));
             }
 
-            String symbolsArgument = symbolsArgumentBuilder.toString();
-
-            getQuery.getArguments().put("s", symbolsArgument);
-            getQuery.getArguments().put("f", "snl1ohgc1v");
+            // Format:
+            // s - symbol
+            // n - company name
+            // l1 - most recent value
+            // o - opening value
+            // h - high value
+            // g - low value
+            // c1 - change percentage
+            // v - volume
+            String symbolsParameter = symbolsParameterBuilder.toString();
+            getQuery.getParameters().put("s", symbolsParameter);
+            getQuery.getParameters().put("f", "snl1ohgc1v");
             ]]>
         </source>
 
@@ -133,15 +141,15 @@ limitations under the License.
 
         <source type="java">
             <![CDATA[
-            CSVSerializer quoteSerializer = new CSVSerializer();
-            quoteSerializer.getKeys().add("symbol");
-            quoteSerializer.getKeys().add("companyName");
-            quoteSerializer.getKeys().add("value");
-            quoteSerializer.getKeys().add("openingValue");
-            quoteSerializer.getKeys().add("highValue");
-            quoteSerializer.getKeys().add("lowValue");
-            quoteSerializer.getKeys().add("change");
-            quoteSerializer.getKeys().add("volume");
+            CSVSerializer quoteSerializer = new CSVSerializer(StockQuote.class);
+            quoteSerializer.setKeys("symbol",
+                "companyName",
+                "value",
+                "openingValue",
+                "highValue",
+                "lowValue",
+                "change",
+                "volume");
             ]]>
         </source>
 
@@ -155,26 +163,20 @@ limitations under the License.
         </p>
 
         <p>
-            <tt>CSVSerializer</tt> will, by default, create an instance of
+            By default, <tt>CSVSerializer</tt> will create an instance of
             <tt>org.apache.pivot.collections.HashMap&lt;String, Object&gt;</tt> for each row it
             encounters in the CSV stream. However, a caller can specify the name of a different
-            class using the <tt>setItemClass()</tt> method. This avoids the performance penalty of
-            traversing the data twice: once to read it from the CSV stream and again to convert it
-            to the appropriate type:
+            class as a constructor argument to <tt>CSVSerializer</tt>. This avoids the performance
+            penalty of traversing the data twice: once to read it from the CSV stream and again to
+            convert it to the appropriate type.
         </p>
 
-        <source type="java">
-            <![CDATA[
-            quoteSerializer.setItemClass(StockQuote.class);
-            ]]>
-        </source>
-
         <p>
-            If the item class implements the <tt>pivot.collections.Dictionary</tt> interface, the
-            parsed values are <tt>put()</tt> directly into the item instance; otherwise, the item
-            is wrapped in a <tt>pivot.beans.BeanAdapter</tt> into which the values are
-            <tt>put()</tt> (<tt>BeanAdapter</tt> is a handy class that allows a caller to treat
-            a JavaBean object as if it were a dictionary).
+            If the item class implements the <tt>org.apache.pivot.collections.Dictionary</tt>
+            interface, the parsed values are <tt>put()</tt> directly into the item instance;
+            otherwise, the item is wrapped in a <tt>org.apache.pivot.beans.BeanAdapter</tt> into
+            which the values are <tt>put()</tt> (<tt>BeanAdapter</tt> is a handy class that allows
+            a caller to treat a Java bean object as if it were a dictionary).
         </p>
 
         <p>
@@ -183,8 +185,6 @@ limitations under the License.
 
         <source type="java">
             <![CDATA[
-            package pivot.tutorials.stocktracker;
-
             public class StockQuote {
                 private String symbol = null;
                 private String companyName = null;
@@ -220,7 +220,11 @@ limitations under the License.
                 }
 
                 public void setValue(String value) {
-                    setValue(Float.parseFloat(value));
+                    try {
+                        setValue(Float.parseFloat(value));
+                    } catch(NumberFormatException exception) {
+                        setValue(Float.NaN);
+                    }
                 }
 
                 public float getOpeningValue() {
@@ -232,7 +236,11 @@ limitations under the License.
                 }
 
                 public void setOpeningValue(String openingValue) {
-                    setOpeningValue(Float.parseFloat(openingValue));
+                    try {
+                        setOpeningValue(Float.parseFloat(openingValue));
+                    } catch(NumberFormatException exception) {
+                        setOpeningValue(Float.NaN);
+                    }
                 }
 
                 public float getHighValue() {
@@ -244,7 +252,11 @@ limitations under the License.
                 }
 
                 public void setHighValue(String highValue) {
-                    setHighValue(Float.parseFloat(highValue));
+                    try {
+                        setHighValue(Float.parseFloat(highValue));
+                    } catch(NumberFormatException exception) {
+                        setHighValue(Float.NaN);
+                    }
                 }
 
                 public float getLowValue() {
@@ -256,7 +268,11 @@ limitations under the License.
                 }
 
                 public void setLowValue(String lowValue) {
-                    setLowValue(Float.parseFloat(lowValue));
+                    try {
+                        setLowValue(Float.parseFloat(lowValue));
+                    } catch(NumberFormatException exception) {
+                        setLowValue(Float.NaN);
+                    }
                 }
 
                 public float getChange() {
@@ -268,7 +284,11 @@ limitations under the License.
                 }
 
                 public void setChange(String change) {
-                    setChange(Float.parseFloat(change));
+                    try {
+                        setChange(Float.parseFloat(change));
+                    } catch(NumberFormatException exception) {
+                        setChange(Float.NaN);
+                    }
                 }
 
                 public float getVolume() {
@@ -280,14 +300,18 @@ limitations under the License.
                 }
 
                 public void setVolume(String volume) {
-                    setVolume(Float.parseFloat(volume));
+                    try {
+                        setVolume(Float.parseFloat(volume));
+                    } catch(NumberFormatException exception) {
+                        setVolume(Float.NaN);
+                    }
                 }
             }
             ]]>
         </source>
 
         <p>
-            The cell renderers assigned to the columns in the WTKX file ensure that the data
+            The cell renderers assigned to the columns in the BXML file ensure that the data
             represented by this class is formatted and presented correctly.
         </p>
 
@@ -308,9 +332,9 @@ limitations under the License.
         <p>
             The argument passed to the <tt>execute()</tt> method is a <tt>TaskAdapter</tt> wrapped
             around an anonymous inner class implementation of <tt>TaskListener&lt;Object&gt;</tt>.
-            <tt>TaskListener</tt> is an interface defined in the <tt>pivot.util.concurrent</tt>
+            <tt>TaskListener</tt> is an interface defined in the <tt>org.apache.pivot.util.concurrent</tt>
             package and serves as a callback handler for asynchronous operations implemented by the
-            <tt>pivot.util.concurrent.Task</tt> class, of which <tt>GetQuery</tt> is a subclass.
+            <tt>org.apache.pivot.util.concurrent.Task</tt> class, of which <tt>GetQuery</tt> is a subclass.
             <tt>TaskAdapter</tt> is defined in the <tt>pivot.wtk</tt> package and ensures that the
             callback occurs on the UI thread (otherwise, the listener is called in the context of
             the background thread, which can produce non-deterministic results).
@@ -337,51 +361,52 @@ limitations under the License.
 
         <source type="java">
             <![CDATA[
-            @Override
-            public void taskExecuted(Task<Object> task) {
-                if (task == getQuery) {
-                    List<Object> quotes = (List<Object>)task.getResult();
+                @Override
+                public void taskExecuted(Task<Object> task) {
+                    if (task == getQuery) {
+                        List<Object> quotes = (List<Object>)task.getResult();
+
+                        // Preserve any existing sort and selection
+                        Sequence<?> selectedStocks = stocksTableView.getSelectedRows();
+
+                        List<Object> tableData = (List<Object>)stocksTableView.getTableData();
+                        Comparator<Object> comparator = tableData.getComparator();
+                        quotes.setComparator(comparator);
+
+                        stocksTableView.setTableData(quotes);
+
+                        if (selectedStocks.getLength() > 0) {
+                            // Select current indexes of selected stocks
+                            for (int i = 0, n = selectedStocks.getLength(); i < n; i++) {
+                                Object selectedStock = selectedStocks.get(i);
+
+                                int index = 0;
+                                for (Object stock : stocksTableView.getTableData()) {
+                                    String symbol = JSON.get(stock, "symbol");
+                                    String selectedSymbol = JSON.get(selectedStock, "symbol");
+
+                                    if (symbol.equals(selectedSymbol)) {
+                                        stocksTableView.addSelectedIndex(index);
+                                        break;
+                                    }
 
-                    // Preserve any existing sort and selection
-                    Sequence<?> selectedStocks = stocksTableView.getSelectedRows();
-
-                    List<Object> tableData = (List<Object>)stocksTableView.getTableData();
-                    Comparator<Object> comparator = tableData.getComparator();
-                    quotes.setComparator(comparator);
-
-                    stocksTableView.setTableData(quotes);
-
-                    if (selectedStocks.getLength() > 0) {
-                        // Select current indexes of selected stocks
-                        for (int i = 0, n = selectedStocks.getLength(); i < n; i++) {
-                            Object selectedStock = selectedStocks.get(i);
-
-                            int index = 0;
-                            for (Object stock : stocksTableView.getTableData()) {
-                                String symbol = JSON.getString(stock, "symbol");
-                                String selectedSymbol = JSON.getString(selectedStock, "symbol");
-
-                                if (symbol.equals(selectedSymbol)) {
-                                    stocksTableView.addSelectedIndex(index);
-                                    break;
+                                    index++;
                                 }
-
-                                index++;
+                            }
+                        } else {
+                            if (quotes.getLength() > 0) {
+                                stocksTableView.setSelectedIndex(0);
                             }
                         }
-                    } else {
-                        if (quotes.getLength() > 0) {
-                            stocksTableView.setSelectedIndex(0);
-                        }
-                    }
 
-                    refreshDetail();
+                        refreshDetail();
 
-                    DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG,
-                        DateFormat.MEDIUM, Locale.getDefault());
-                    lastUpdateLabel.setText(dateFormat.format(new Date()));
+                        DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG,
+                            DateFormat.MEDIUM, Locale.getDefault());
+                        lastUpdateLabel.setText(dateFormat.format(new Date()));
 
-                    getQuery = null;
+                        getQuery = null;
+                    }
                 }
             }
             ]]>
@@ -429,6 +454,7 @@ limitations under the License.
 
         <source type="java">
             <![CDATA[
+            @Override
             public void executeFailed(Task<Object> task) {
                 if (task == getQuery) {
                     System.err.println(task.getFault());

Modified: pivot/trunk/tutorials/www/stock-tracker.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/stock-tracker.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/stock-tracker.xml (original)
+++ pivot/trunk/tutorials/www/stock-tracker.xml Thu Oct 28 18:04:31 2010
@@ -29,7 +29,7 @@ limitations under the License.
         </p>
 
         <ul>
-            <li>UI markup using WTKX</li>
+            <li>UI markup using BXML</li>
             <li>Event handling</li>
             <li>Web queries</li>
             <li>Data binding</li>

Modified: pivot/trunk/tutorials/www/tab-panes.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/tab-panes.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/tab-panes.xml (original)
+++ pivot/trunk/tutorials/www/tab-panes.xml Thu Oct 28 18:04:31 2010
@@ -39,7 +39,7 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>org/apache/pivot/tutorials/navigation/tab_panes.bxml</src>
+                <src>/org/apache/pivot/tutorials/navigation/tab_panes.bxml</src>
             </startup-properties>
         </application>
 

Modified: pivot/trunk/tutorials/www/table-views.custom.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/table-views.custom.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/table-views.custom.xml (original)
+++ pivot/trunk/tutorials/www/table-views.custom.xml Thu Oct 28 18:04:31 2010
@@ -26,7 +26,7 @@ limitations under the License.
             This example continues the theme of the previous two examples and presents the final
             standings of the top ten medal-winning countries in the 2008 Summer Olympics in a
             <tt>TableView</tt> component. However, rather than representing the data using simple
-            string-based hash maps or deserialized JSON values, this example uses a custom JavaBean
+            string-based hash maps or deserialized JSON values, this example uses a custom Java bean
             component to represent a table row. In addition to the "nation", "gold", "silver",
             "bronze", and "total" properties used in the previous examples, it also defines a
             "flag" property of type <tt>org.apache.pivot.wtk.media.Image</tt>, which is shown in

Modified: pivot/trunk/tutorials/www/table-views.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/table-views.xml?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/table-views.xml (original)
+++ pivot/trunk/tutorials/www/table-views.xml Thu Oct 28 18:04:31 2010
@@ -34,7 +34,7 @@ limitations under the License.
             the table) can be of any type, but are most often instances of
             <tt>Dictionary&lt;String, Object&gt;</tt>, which the default table view renders are
             capable of presenting (for example, <tt>Map&lt;String, Object&gt;</tt> values stored in
-            a JSON list or instances of JavaBean classes that can be wrapped in a
+            a JSON list or instances of Java bean classes that can be wrapped in a
             <tt>BeanAdapter</tt>).
         </p>
 

Modified: pivot/trunk/tutorials/xsl/tutorial.xsl
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/xsl/tutorial.xsl?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/tutorials/xsl/tutorial.xsl (original)
+++ pivot/trunk/tutorials/xsl/tutorial.xsl Thu Oct 28 18:04:31 2010
@@ -119,10 +119,21 @@ limitations under the License.
             <!-- Base parameters -->
             var parameters = {
                 codebase_lookup:false,
-                java_arguments:'-Dsun.awt.noerasebackground=true -Dsun.awt.erasebackgroundonresize=true',
                 application_class_name:'<xsl:value-of select="@class"/>'
             };
 
+            <!-- Java arguments -->
+            var javaArguments = ["-Dsun.awt.noerasebackground=true",
+                "-Dsun.awt.erasebackgroundonresize=true"];
+
+            <xsl:if test="java-arguments">
+                <xsl:for-each select="java-arguments/*">
+                    javaArguments.push("-D<xsl:value-of select="name(.)"/>=<xsl:apply-templates/>");
+                </xsl:for-each>
+            </xsl:if>
+            
+            parameters.java_arguments = javaArguments.join(" ");
+
             <!-- Startup properties -->
             <xsl:if test="startup-properties">
                 var startupProperties = [];
@@ -132,6 +143,15 @@ limitations under the License.
                 parameters.startup_properties = startupProperties.join("&amp;");
             </xsl:if>
 
+            <!-- System properties -->
+            <xsl:if test="system-properties">
+                var systemProperties = [];
+                <xsl:for-each select="system-properties/*">
+                    systemProperties.push("<xsl:value-of select="name(.)"/>=<xsl:apply-templates/>");
+                </xsl:for-each>
+                parameters.system_properties = systemProperties.join("&amp;");
+            </xsl:if>
+
             deployJava.runApplet(attributes, parameters, "1.6");
         </script>
     </xsl:template>

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java?rev=1028406&r1=1028405&r2=1028406&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java Thu Oct 28 18:04:31 2010
@@ -23,6 +23,7 @@ import java.io.UnsupportedEncodingExcept
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLDecoder;
+import java.util.Locale;
 
 import org.apache.pivot.collections.ArrayList;
 import org.apache.pivot.collections.HashMap;
@@ -85,6 +86,9 @@ public final class BrowserApplicationCon
                 if (systemPropertiesParameter != null) {
                     String[] arguments = systemPropertiesParameter.split("&");
 
+                    String language = null;
+                    String region = null;
+
                     for (int i = 0, n = arguments.length; i < n; i++) {
                         String argument = arguments[i];
                         String[] property = argument.split("=");
@@ -98,11 +102,21 @@ public final class BrowserApplicationCon
                                 throw new RuntimeException(exception);
                             }
 
-                            System.setProperty(key, value);
+                            if (key.equals("user.language")) {
+                                language = value;
+                            } else if (key.equals("user.region")) {
+                                region = value;
+                            } else {
+                                System.setProperty(key, value);
+                            }
                         } else {
                             System.err.println(argument + " is not a valid system property.");
                         }
                     }
+
+                    if (language != null) {
+                        Locale.setDefault((region == null) ? new Locale(language) : new Locale(language, region));
+                    }
                 }
 
                 // Load properties specified in the startup properties parameter