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 16:35:12 UTC

svn commit: r1028323 [3/3] - in /pivot/trunk: demos/www/ tutorials/src/org/apache/pivot/tutorials/labels/ tutorials/www/ wtk/src/org/apache/pivot/wtk/

Modified: pivot/trunk/tutorials/www/flow-panes.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/flow-panes.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/flow-panes.xml (original)
+++ pivot/trunk/tutorials/www/flow-panes.xml Thu Oct 28 14:35:11 2010
@@ -37,7 +37,7 @@ limitations under the License.
             have a baseline, it draws a blue line across the component's vertical midpoint:
         </p>
 
-        <application class="org.apache.pivot.tutorials.layout.FlowPanes"
+        <application class="org.apache.pivot.wtk.ScriptApplication"
             width="512" height="240">
             <libraries>
                 <library>core</library>
@@ -45,65 +45,64 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
+            <startup-properties>
+                <src>/org/apache/pivot/tutorials/layout/flow_panes.bxml</src>
+            </startup-properties>
         </application>
 
         <p>
-            The WTKX source for this example is shown below:
+            The BXML source for this example is shown below:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/layout/flow_panes.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/layout/flow_panes.bxml">
             <![CDATA[
-            <Window title="Flow Panes" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+            <layout:FlowPanes title="Flow Panes" maximized="true"
+                xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns:effects="org.apache.pivot.wtk.effects"
+                xmlns:layout="org.apache.pivot.tutorials.layout"
                 xmlns="org.apache.pivot.wtk">
-                <content>
-                    <SplitPane splitRatio="0.75">
-                        <left>
-                            <Border styles="{padding:4}">
-                                <content>
-                                    <BoxPane orientation="vertical" styles="{fill:true}">
-                                        <FlowPane wtkx:id="flowPane" styles="{padding:2}">
-                                            <decorators>
-                                                <effects:BaselineDecorator/>
-                                            </decorators>
-
-                                            <PushButton buttonData="0" styles="{minimumAspectRatio:1.5}"/>
-                                            <PushButton buttonData="1" styles="{minimumAspectRatio:1.5}"/>
-                                            <PushButton buttonData="2" styles="{minimumAspectRatio:1.5}"/>
-                                            <PushButton buttonData="3" preferredWidth="20" preferredHeight="20"/>
-                                            <PushButton buttonData="4" preferredWidth="30" preferredHeight="30"/>
-                                            <PushButton buttonData="5" preferredWidth="40" preferredHeight="40"/>
-                                            <PushButton buttonData="6" styles="{minimumAspectRatio:1.5}"/>
-                                            <PushButton buttonData="7" styles="{minimumAspectRatio:1.5}"/>
-                                        </FlowPane>
-                                    </BoxPane>
-                                </content>
-                            </Border>
-                        </left>
-                        <right>
-                            <Border styles="{padding:{top:2, left:6}}">
-                                <content>
-                                    <BoxPane orientation="vertical">
-                                        <Label text="Alignment" styles="{font:{bold:true}}"/>
-
-                                        <wtkx:define>
-                                            <ButtonGroup wtkx:id="alignment"/>
-                                        </wtkx:define>
-                                        <RadioButton wtkx:id="leftRadioButton" buttonData="Left" buttonGroup="$alignment" selected="true"/>
-                                        <RadioButton wtkx:id="rightRadioButton" buttonData="Right" buttonGroup="$alignment"/>
-                                        <RadioButton wtkx:id="centerRadioButton" buttonData="Center" buttonGroup="$alignment"/>
-
-                                        <BoxPane styles="{padding:{top:6}}">
-                                            <Checkbox wtkx:id="alignToBaselineCheckbox" buttonData="Align to baseline"/>
-                                        </BoxPane>
-                                    </BoxPane>
-                                </content>
-                            </Border>
-                        </right>
-                    </SplitPane>
-                </content>
-            </Window>
+                <SplitPane splitRatio="0.75">
+                    <left>
+                        <Border styles="{padding:4}">
+                            <BoxPane orientation="vertical" styles="{fill:true}">
+                                <FlowPane bxml:id="flowPane" styles="{padding:2}">
+                                    <decorators>
+                                        <effects:BaselineDecorator/>
+                                    </decorators>
+
+                                    <PushButton buttonData="0" styles="{minimumAspectRatio:1.5}"/>
+                                    <PushButton buttonData="1" styles="{minimumAspectRatio:1.5}"/>
+                                    <PushButton buttonData="2" styles="{minimumAspectRatio:1.5}"/>
+                                    <PushButton buttonData="3" preferredWidth="20" preferredHeight="20"/>
+                                    <PushButton buttonData="4" preferredWidth="30" preferredHeight="30"/>
+                                    <PushButton buttonData="5" preferredWidth="40" preferredHeight="40"/>
+                                    <PushButton buttonData="6" styles="{minimumAspectRatio:1.5}"/>
+                                    <PushButton buttonData="7" styles="{minimumAspectRatio:1.5}"/>
+                                </FlowPane>
+                            </BoxPane>
+                        </Border>
+                    </left>
+
+                    <right>
+                        <Border styles="{padding:{top:2, left:6}}">
+                            <BoxPane orientation="vertical">
+                                <Label text="Alignment" styles="{font:{bold:true}}"/>
+
+                                <bxml:define>
+                                    <ButtonGroup bxml:id="alignment"/>
+                                </bxml:define>
+                                <RadioButton bxml:id="leftRadioButton" buttonData="Left" buttonGroup="$alignment" selected="true"/>
+                                <RadioButton bxml:id="rightRadioButton" buttonData="Right" buttonGroup="$alignment"/>
+                                <RadioButton bxml:id="centerRadioButton" buttonData="Center" buttonGroup="$alignment"/>
+
+                                <BoxPane styles="{padding:{top:6}}">
+                                    <Checkbox bxml:id="alignToBaselineCheckbox" buttonData="Align to baseline"/>
+                                </BoxPane>
+                            </BoxPane>
+                    </Border>
+                    </right>
+                </SplitPane>
+            </layout:FlowPanes>
             ]]>
         </source>
 
@@ -116,21 +115,20 @@ limitations under the License.
             <![CDATA[
             package org.apache.pivot.tutorials.layout;
 
+            import java.net.URL;
+
+            import org.apache.pivot.beans.Bindable;
             import org.apache.pivot.collections.Map;
-            import org.apache.pivot.wtk.Application;
+            import org.apache.pivot.util.Resources;
             import org.apache.pivot.wtk.Button;
             import org.apache.pivot.wtk.ButtonStateListener;
             import org.apache.pivot.wtk.Checkbox;
-            import org.apache.pivot.wtk.DesktopApplicationContext;
-            import org.apache.pivot.wtk.Display;
             import org.apache.pivot.wtk.FlowPane;
             import org.apache.pivot.wtk.HorizontalAlignment;
             import org.apache.pivot.wtk.RadioButton;
             import org.apache.pivot.wtk.Window;
-            import org.apache.pivot.wtkx.WTKXSerializer;
 
-            public class FlowPanes implements Application {
-                private Window window = null;
+            public class FlowPanes extends Window implements Bindable {
                 private FlowPane flowPane = null;
                 private RadioButton leftRadioButton = null;
                 private RadioButton rightRadioButton = null;
@@ -138,14 +136,12 @@ limitations under the License.
                 private Checkbox alignToBaselineCheckbox = null;
 
                 @Override
-                public void startup(Display display, Map<String, String> properties) throws Exception {
-                    WTKXSerializer wtkxSerializer = new WTKXSerializer();
-                    window = (Window)wtkxSerializer.readObject(this, "flow_panes.wtkx");
-                    flowPane = (FlowPane)wtkxSerializer.get("flowPane");
-                    leftRadioButton = (RadioButton)wtkxSerializer.get("leftRadioButton");
-                    rightRadioButton = (RadioButton)wtkxSerializer.get("rightRadioButton");
-                    centerRadioButton = (RadioButton)wtkxSerializer.get("centerRadioButton");
-                    alignToBaselineCheckbox = (Checkbox)wtkxSerializer.get("alignToBaselineCheckbox");
+                public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
+                    flowPane = (FlowPane)namespace.get("flowPane");
+                    leftRadioButton = (RadioButton)namespace.get("leftRadioButton");
+                    rightRadioButton = (RadioButton)namespace.get("rightRadioButton");
+                    centerRadioButton = (RadioButton)namespace.get("centerRadioButton");
+                    alignToBaselineCheckbox = (Checkbox)namespace.get("alignToBaselineCheckbox");
 
                     ButtonStateListener buttonStateListener = new ButtonStateListener() {
                         @Override
@@ -160,25 +156,6 @@ limitations under the License.
                     alignToBaselineCheckbox.getButtonStateListeners().add(buttonStateListener);
 
                     updateFlowPaneState();
-
-                    window.open(display);
-                }
-
-                @Override
-                public boolean shutdown(boolean optional) {
-                    if (window != null) {
-                        window.close();
-                    }
-
-                    return false;
-                }
-
-                @Override
-                public void suspend() {
-                }
-
-                @Override
-                public void resume() {
                 }
 
                 private void updateFlowPaneState() {
@@ -198,10 +175,6 @@ limitations under the License.
 
                     flowPane.getStyles().put("alignToBaseline", alignToBaselineCheckbox.isSelected());
                 }
-
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(FlowPanes.class, args);
-                }
             }
             ]]>
         </source>

Modified: pivot/trunk/tutorials/www/forms.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/forms.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/forms.xml (original)
+++ pivot/trunk/tutorials/www/forms.xml Thu Oct 28 14:35:11 2010
@@ -41,7 +41,7 @@ limitations under the License.
             uses the <tt>Form.Section</tt> heading as the <tt>Separator</tt> heading:
         </p>
 
-        <application class="org.apache.pivot.tutorials.layout.Forms"
+        <application class="org.apache.pivot.wtk.ScriptApplication"
             width="512" height="384">
             <libraries>
                 <library>core</library>
@@ -49,91 +49,93 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
+            <startup-properties>
+                <src>/org/apache/pivot/tutorials/layout/forms.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/forms.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/layout/forms.bxml">
             <![CDATA[
-            <Window title="Forms" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+            <layout:Forms title="Forms" maximized="true"
+                xmlns:bxml="http://pivot.apache.org/bxml"
+                xmlns:layout="org.apache.pivot.tutorials.layout"
                 xmlns="org.apache.pivot.wtk">
-                <content>
-                    <Border styles="{padding:6}">
-                        <content>
+                <Border styles="{padding:6}">
+                    <TablePane>
+                        <columns>
+                            <TablePane.Column width="1*"/>
+                        </columns>
+
+                        <TablePane.Row height="1*">
+                            <Form>
+                                <Form.Section>
+                                    <BoxPane bxml:id="nameBoxPane" Form.label="Name">
+                                        <TextInput bxml:id="lastNameTextInput" prompt="Last"/>
+                                        <TextInput bxml:id="firstNameTextInput" prompt="First"/>
+                                    </BoxPane>
+                                </Form.Section>
+
+                                <Form.Section heading="Addresses">
+                                    <BoxPane Form.label="Home" orientation="vertical">
+                                        <TextInput prompt="Street" textSize="24"/>
+                                        <BoxPane>
+                                            <TextInput prompt="City"/>
+                                            <TextInput prompt="State" textSize="6"/>
+                                            <TextInput prompt="Zip" textSize="10"/>
+                                        </BoxPane>
+                                    </BoxPane>
+
+                                    <BoxPane Form.label="Work" orientation="vertical">
+                                        <TextInput prompt="Street" textSize="24"/>
+                                        <BoxPane>
+                                            <TextInput prompt="City"/>
+                                            <TextInput prompt="State" textSize="6"/>
+                                            <TextInput prompt="Zip" textSize="10"/>
+                                        </BoxPane>
+                                    </BoxPane>
+                                </Form.Section>
+
+                                <Form.Section heading="Phone Numbers">
+                                    <TextInput Form.label="Home"/>
+                                    <TextInput Form.label="Work"/>
+                                </Form.Section>
+
+                                <Form.Section heading="Email Addresses">
+                                    <TextInput Form.label="Home"/>
+                                    <TextInput Form.label="Work"/>
+                                </Form.Section>
+                            </Form>
+                        </TablePane.Row>
+
+                        <TablePane.Row height="-1">
+                            <Separator/>
+                        </TablePane.Row>
+
+                        <TablePane.Row height="-1">
                             <TablePane>
                                 <columns>
                                     <TablePane.Column width="1*"/>
+                                    <TablePane.Column width="-1"/>
                                 </columns>
-                                <rows>
-                                    <TablePane.Row height="1*">
-                                        <Form>
-                                            <sections>
-                                                <Form.Section>
-                                                    <BoxPane wtkx:id="nameBoxPane" Form.label="Name">
-                                                        <TextInput wtkx:id="lastNameTextInput" prompt="Last"/>
-                                                        <TextInput wtkx:id="firstNameTextInput" prompt="First"/>
-                                                    </BoxPane>
-                                                </Form.Section>
-                                                <Form.Section heading="Addresses">
-                                                    <BoxPane Form.label="Home" orientation="vertical">
-                                                        <TextInput prompt="Street" textSize="24"/>
-                                                        <BoxPane>
-                                                            <TextInput prompt="City"/>
-                                                            <TextInput prompt="State" textSize="6"/>
-                                                            <TextInput prompt="Zip" textSize="10"/>
-                                                        </BoxPane>
-                                                    </BoxPane>
-                                                    <BoxPane Form.label="Work" orientation="vertical">
-                                                        <TextInput prompt="Street" textSize="24"/>
-                                                        <BoxPane>
-                                                            <TextInput prompt="City"/>
-                                                            <TextInput prompt="State" textSize="6"/>
-                                                            <TextInput prompt="Zip" textSize="10"/>
-                                                        </BoxPane>
-                                                    </BoxPane>
-                                                </Form.Section>
-                                                <Form.Section heading="Phone Numbers">
-                                                    <TextInput Form.label="Home"/>
-                                                    <TextInput Form.label="Work"/>
-                                                </Form.Section>
-                                                <Form.Section heading="Email Addresses">
-                                                    <TextInput Form.label="Home"/>
-                                                    <TextInput Form.label="Work"/>
-                                                </Form.Section>
-                                            </sections>
-                                        </Form>
-                                    </TablePane.Row>
-                                    <TablePane.Row height="-1">
-                                        <Separator/>
-                                    </TablePane.Row>
-                                    <TablePane.Row height="-1">
-                                        <TablePane>
-                                            <columns>
-                                                <TablePane.Column width="1*"/>
-                                                <TablePane.Column width="-1"/>
-                                            </columns>
-                                            <rows>
-                                                <TablePane.Row>
-                                                    <BoxPane styles="{verticalAlignment:'center'}">
-                                                        <Label wtkx:id="errorLabel" styles="{color:22}"/>
-                                                    </BoxPane>
-                                                    <BoxPane styles="{horizontalAlignment:'right', verticalAlignment:'center'}">
-                                                        <PushButton wtkx:id="submitButton" buttonData="Submit"
-                                                            styles="{minimumAspectRatio:3}"/>
-                                                    </BoxPane>
-                                                </TablePane.Row>
-                                            </rows>
-                                        </TablePane>
-                                    </TablePane.Row>
-                                </rows>
+
+                                <TablePane.Row>
+                                    <BoxPane styles="{verticalAlignment:'center'}">
+                                        <Label bxml:id="errorLabel" styles="{color:22}"/>
+                                    </BoxPane>
+                                    <BoxPane styles="{horizontalAlignment:'right', verticalAlignment:'center'}">
+                                        <PushButton bxml:id="submitButton" buttonData="Submit"
+                                            styles="{minimumAspectRatio:3}"/>
+                                    </BoxPane>
+                                </TablePane.Row>
                             </TablePane>
-                        </content>
-                    </Border>
-                </content>
-            </Window>
+                        </TablePane.Row>
+                    </TablePane>
+                </Border>
+            </layout:Forms>
             ]]>
         </source>
 
@@ -174,12 +176,13 @@ limitations under the License.
             <![CDATA[
             package org.apache.pivot.tutorials.layout;
 
+            import java.net.URL;
+
+            import org.apache.pivot.beans.Bindable;
             import org.apache.pivot.collections.Map;
-            import org.apache.pivot.wtk.Application;
+            import org.apache.pivot.util.Resources;
             import org.apache.pivot.wtk.Button;
             import org.apache.pivot.wtk.ButtonPressListener;
-            import org.apache.pivot.wtk.DesktopApplicationContext;
-            import org.apache.pivot.wtk.Display;
             import org.apache.pivot.wtk.BoxPane;
             import org.apache.pivot.wtk.Form;
             import org.apache.pivot.wtk.Label;
@@ -188,10 +191,8 @@ limitations under the License.
             import org.apache.pivot.wtk.PushButton;
             import org.apache.pivot.wtk.TextInput;
             import org.apache.pivot.wtk.Window;
-            import org.apache.pivot.wtkx.WTKXSerializer;
 
-            public class Forms implements Application {
-                private Window window = null;
+            public class Forms extends Window implements Bindable {
                 private BoxPane nameBoxPane = null;
                 private TextInput lastNameTextInput = null;
                 private TextInput firstNameTextInput = null;
@@ -199,14 +200,12 @@ limitations under the License.
                 private Label errorLabel = null;
 
                 @Override
-                public void startup(Display display, Map<String, String> properties) throws Exception {
-                    WTKXSerializer wtkxSerializer = new WTKXSerializer();
-                    window = (Window)wtkxSerializer.readObject(this, "forms.wtkx");
-                    nameBoxPane = (BoxPane)wtkxSerializer.get("nameBoxPane");
-                    lastNameTextInput = (TextInput)wtkxSerializer.get("lastNameTextInput");
-                    firstNameTextInput = (TextInput)wtkxSerializer.get("firstNameTextInput");
-                    submitButton = (PushButton)wtkxSerializer.get("submitButton");
-                    errorLabel = (Label)wtkxSerializer.get("errorLabel");
+                public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
+                    nameBoxPane = (BoxPane)namespace.get("nameBoxPane");
+                    lastNameTextInput = (TextInput)namespace.get("lastNameTextInput");
+                    firstNameTextInput = (TextInput)namespace.get("firstNameTextInput");
+                    submitButton = (PushButton)namespace.get("submitButton");
+                    errorLabel = (Label)namespace.get("errorLabel");
 
                     submitButton.getButtonPressListeners().add(new ButtonPressListener() {
                         @Override
@@ -224,35 +223,12 @@ limitations under the License.
 
                             if (flag == null) {
                                 errorLabel.setText(null);
-                                Prompt.prompt("Pretending to submit...", window);
+                                Prompt.prompt("Pretending to submit...", Forms.this);
                             } else {
                                 errorLabel.setText("Some required information is missing.");
                             }
                         }
                     });
-
-                    window.open(display);
-                }
-
-                @Override
-                public boolean shutdown(boolean optional) {
-                    if (window != null) {
-                        window.close();
-                    }
-
-                    return false;
-                }
-
-                @Override
-                public void suspend() {
-                }
-
-                @Override
-                public void resume() {
-                }
-
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(Forms.class, args);
                 }
             }
             ]]>

Modified: pivot/trunk/tutorials/www/grid-panes.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/grid-panes.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/grid-panes.xml (original)
+++ pivot/trunk/tutorials/www/grid-panes.xml Thu Oct 28 14:35:11 2010
@@ -50,7 +50,7 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>org/apache/pivot/tutorials/layout/grid_panes.wtkx</src>
+                <src>/org/apache/pivot/tutorials/layout/grid_panes.wtkx</src>
             </startup-properties>
         </application>
 
@@ -61,74 +61,72 @@ limitations under the License.
         <source type="xml" location="org/apache/pivot/tutorials/layout/grid_panes.wtkx">
             <![CDATA[
             <Window title="Grid Panes" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+                xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns="org.apache.pivot.wtk">
-                <content>
-                    <Border>
-                        <content>
-                            <GridPane columnCount="5" styles="{horizontalSpacing:1, verticalSpacing:1,
-                                showHorizontalGridLines:true, showVerticalGridLines:true}">
-                                <rows>
-                                    <GridPane.Row>
-                                        <Label text="0, 0" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="0, 1" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="0, 2" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="0, 3" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <GridPane.Filler/>
-                                    </GridPane.Row>
-                                    <GridPane.Row>
-                                        <Label text="1, 0" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="1, 1" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="1, 2" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <GridPane.Filler/>
-                                        <Label text="1, 4" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                    </GridPane.Row>
-                                    <GridPane.Row>
-                                        <Label text="2, 0" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="2, 1" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <GridPane.Filler/>
-                                        <Label text="2, 3" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="2, 4" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                    </GridPane.Row>
-                                    <GridPane.Row>
-                                        <Label text="3, 0" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <GridPane.Filler/>
-                                        <Label text="3, 2" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="3, 3" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="3, 4" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                    </GridPane.Row>
-                                    <GridPane.Row>
-                                        <GridPane.Filler/>
-                                        <Label text="4, 1" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="4, 2" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="4, 3" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                        <Label text="4, 4" styles="{horizontalAlignment:'center',
-                                            verticalAlignment:'center'}"/>
-                                    </GridPane.Row>
-                                </rows>
-                            </GridPane>
-                        </content>
-                    </Border>
-                </content>
+                <Border>
+                    <GridPane columnCount="5" styles="{horizontalSpacing:1, verticalSpacing:1,
+                        showHorizontalGridLines:true, showVerticalGridLines:true}">
+                        <GridPane.Row>
+                            <Label text="0, 0" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="0, 1" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="0, 2" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="0, 3" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <GridPane.Filler/>
+                        </GridPane.Row>
+
+                        <GridPane.Row>
+                            <Label text="1, 0" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="1, 1" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="1, 2" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <GridPane.Filler/>
+                            <Label text="1, 4" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                        </GridPane.Row>
+
+                        <GridPane.Row>
+                            <Label text="2, 0" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="2, 1" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <GridPane.Filler/>
+                            <Label text="2, 3" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="2, 4" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                        </GridPane.Row>
+
+                        <GridPane.Row>
+                            <Label text="3, 0" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <GridPane.Filler/>
+                            <Label text="3, 2" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="3, 3" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="3, 4" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                        </GridPane.Row>
+
+                        <GridPane.Row>
+                            <GridPane.Filler/>
+                            <Label text="4, 1" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="4, 2" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="4, 3" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                            <Label text="4, 4" styles="{horizontalAlignment:'center',
+                                verticalAlignment:'center'}"/>
+                        </GridPane.Row>
+                    </GridPane>
+                </Border>
             </Window>
             ]]>
         </source>

Modified: pivot/trunk/tutorials/www/hello-bxml.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/hello-bxml.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/hello-bxml.xml (original)
+++ pivot/trunk/tutorials/www/hello-bxml.xml Thu Oct 28 14:35:11 2010
@@ -16,19 +16,19 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-<document id="hello-wtkx">
+<document id="hello-bxml">
     <properties>
-        <title>Hello, WTKX!</title>
+        <title>Hello, BXML!</title>
     </properties>
 
     <body>
         <p>
-            Below is the output of the "hello world" application written using WTKX. Note that,
+            Below is the output of the "hello world" application written using BXML. Note that,
             with the exception of the actual text, it is identical to the output of the Java
             version:
         </p>
 
-        <application class="org.apache.pivot.tutorials.HelloWTKX"
+        <application class="org.apache.pivot.tutorials.HelloBXML"
             width="240" height="80">
             <libraries>
                 <library>core</library>
@@ -39,31 +39,30 @@ limitations under the License.
         </application>
 
         <p>
-            The following is the Java source code for the WTKX version. The content of the user
-            interface is defined entirely by the WTKX source file. It is loaded using an instance
-            of the <tt>WTKXSerializer</tt> class defined in the <tt>org.apache.pivot.wtkx</tt>
+            The following is the Java source code for the BXML version. The content of the user
+            interface is defined entirely by the BXML source file. It is loaded using an instance
+            of the <tt>BXMLSerializer</tt> class defined in the <tt>org.apache.pivot.bxml</tt>
             package.
         </p>
 
-        <source type="java" location="org/apache/pivot/tutorials/HelloWTKX.java">
+        <source type="java" location="org/apache/pivot/tutorials/HelloBXML.java">
             <![CDATA[
             package org.apache.pivot.tutorials;
 
+            import org.apache.pivot.beans.BXMLSerializer;
             import org.apache.pivot.collections.Map;
             import org.apache.pivot.wtk.Application;
-            import org.apache.pivot.wtk.DesktopApplicationContext;
             import org.apache.pivot.wtk.Display;
             import org.apache.pivot.wtk.Window;
-            import org.apache.pivot.wtkx.WTKXSerializer;
 
-            public class HelloWTKX implements Application {
+            public class HelloBXML implements Application {
                 private Window window = null;
 
                 @Override
                 public void startup(Display display, Map<String, String> properties)
                     throws Exception {
-                    WTKXSerializer wtkxSerializer = new WTKXSerializer();
-                    window = (Window)wtkxSerializer.readObject(this, "hello.wtkx");
+                    BXMLSerializer bxmlSerializer = new BXMLSerializer();
+                    window = (Window)bxmlSerializer.readObject(HelloBXML.class, "hello.bxml");
                     window.open(display);
                 }
 
@@ -83,47 +82,41 @@ limitations under the License.
                 @Override
                 public void resume() {
                 }
-
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(HelloWTKX.class, args);
-                }
-            }            ]]>
+            }
+            ]]>
         </source>
 
         <p>
-            The WTKX that is used to create the UI is shown below:
+            The BXML that is used to create the UI is shown below:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/hello.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/hello.bxml">
             <![CDATA[
-            <Window title="Hello WTKX!" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+            <Window title="Hello BXML!" maximized="true"
+                xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns="org.apache.pivot.wtk">
-                <content>
-                    <Label text="Hello WTKX!"
-                        styles="{font:'Arial bold 24', color:'#ff0000',
-                            horizontalAlignment:'center', verticalAlignment:'center'}"/>
-                </content>
+                <Label text="Hello BXML!"
+                    styles="{font:'Arial bold 24', color:'#ff0000',
+                        horizontalAlignment:'center', verticalAlignment:'center'}"/>
             </Window>
             ]]>
         </source>
 
         <p>
             Most Pivot applications will be constructed this way, declaring the structure of the
-            UI in WTKX rather than creating it programmatically in code. However, event handlers,
+            UI in BXML rather than creating it programmatically in code. However, event handlers,
             which allow an application to respond to user input, are always defined in code (either
-            Java or a compatible JVM scripting language). For example, the following WTKX produces
-            output very similar to the previous two versions, using a combination of WTKX and
+            Java or a compatible JVM scripting language). For example, the following BXML produces
+            output very similar to the previous two versions, using a combination of BXML and
             JavaScript:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/hello_javascript.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/hello_javascript.bxml">
             <![CDATA[
             <Window title="Hello JavaScript!" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+                xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns="org.apache.pivot.wtk">
                 <windowStateListeners>
-                    <wtkx:script>
                     importPackage(org.apache.pivot.wtk);
 
                     function windowOpened(window) {
@@ -136,7 +129,6 @@ limitations under the License.
 
                         window.setContent(label);
                     }
-                    </wtkx:script>
                 </windowStateListeners>
             </Window>
             ]]>
@@ -146,7 +138,7 @@ limitations under the License.
             The actual output is shown below:
         </p>
 
-        <application class="org.apache.pivot.tutorials.HelloJavaScript"
+        <application class="org.apache.pivot.wtk.ScriptApplication"
             width="240" height="80">
             <libraries>
                 <library>core</library>
@@ -154,12 +146,26 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
+            <startup-properties>
+                <src>/org/apache/pivot/tutorials/hello_javascript.bxml</src>
+            </startup-properties>
         </application>
 
         <p>
-            Though many of the examples in this tutorial implement event handlers in Java, some use
-            script code when it is more concise or convenient to do so. Scripting is discussed in
-            more detail in the <a href="scripting.html">Scripting</a> section.
+            Note that this example does not provide an implementation of the <tt>Application</tt>
+            interface. Rather, it is launched using the <tt>org.apache.pivot.wtk.ScriptApplication</tt> class.
+            This class, which is included with the Pivot platform, implements the
+            <tt>Application</tt> interface and takes the name of a BXML file to launch as a startup
+            property. The BXML file is expected to contain a root element representing a
+            <tt>Window</tt> subclass.
+        </p>
+
+        <p>
+            The class is named <tt>ScriptApplication</tt> because it is often used to launch
+            applications whose logic is defined entirely in script; however, it can actually be
+            used to launch any application whose main window is defined in a single BXML file. Many
+            of the examples in the following sections are launched using this class.
+            Scripting is discussed in more detail in the <a href="scripting.html">Scripting</a> section.
         </p>
     </body>
 </document>

Modified: pivot/trunk/tutorials/www/hello-world.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/hello-world.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/hello-world.xml (original)
+++ pivot/trunk/tutorials/www/hello-world.xml Thu Oct 28 14:35:11 2010
@@ -50,7 +50,6 @@ limitations under the License.
 
             import org.apache.pivot.collections.Map;
             import org.apache.pivot.wtk.Application;
-            import org.apache.pivot.wtk.DesktopApplicationContext;
             import org.apache.pivot.wtk.Display;
             import org.apache.pivot.wtk.HorizontalAlignment;
             import org.apache.pivot.wtk.Label;
@@ -62,6 +61,8 @@ limitations under the License.
 
                 @Override
                 public void startup(Display display, Map<String, String> properties) {
+                    window = new Window();
+
                     Label label = new Label();
                     label.setText("Hello World!");
                     label.getStyles().put("font", new Font("Arial", Font.BOLD, 24));
@@ -71,10 +72,10 @@ limitations under the License.
                     label.getStyles().put("verticalAlignment",
                         VerticalAlignment.CENTER);
 
-                    window = new Window();
                     window.setContent(label);
                     window.setTitle("Hello World!");
                     window.setMaximized(true);
+
                     window.open(display);
                 }
 
@@ -94,10 +95,6 @@ limitations under the License.
                 @Override
                 public void resume() {
                 }
-
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(HelloJava.class, args);
-                }
             }
             ]]>
         </source>

Modified: pivot/trunk/tutorials/www/index.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/index.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/index.xml (original)
+++ pivot/trunk/tutorials/www/index.xml Thu Oct 28 14:35:11 2010
@@ -36,7 +36,7 @@ limitations under the License.
             Stock Tracker demonstrates a number of key features used by many "real world"
             applications, including UI markup, event handling, web queries, data binding, and
             localization, among others. Readers may also find it helpful to review the
-            <a href="bxml-primer.html">WTKX Primer</a> section, which provides a detailed
+            <a href="bxml-primer.html">BXML Primer</a> section, which provides a detailed
             description of Pivot's markup language, before browsing the tutorials themsevles.
         </p>
 
@@ -118,7 +118,6 @@ limitations under the License.
             <document-item id="windows"/>
             <document-item id="clipboard"/>
             <document-item id="drag-and-drop"/>
-            <document-item id="drawing"/>
             <document-item id="effects">
                 <document-item id="effects.transitions"/>
             </document-item>

Modified: pivot/trunk/tutorials/www/labels-and-image-views.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/labels-and-image-views.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/labels-and-image-views.xml (original)
+++ pivot/trunk/tutorials/www/labels-and-image-views.xml Thu Oct 28 14:35:11 2010
@@ -29,7 +29,7 @@ limitations under the License.
             applet below shows an <tt>ImageView</tt> followed by a <tt>Label</tt>:
         </p>
 
-        <application class="org.apache.pivot.tutorials.labels.Labels"
+        <application class="org.apache.pivot.wtk.ScriptApplication"
             width="120" height="40">
             <libraries>
                 <library>core</library>
@@ -37,32 +37,31 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
+            <startup-properties>
+                <src>/org/apache/pivot/tutorials/labels/labels.bxml</src>
+            </startup-properties>
         </application>
 
         <p>
-            Below is the WTKX source used to generate the applet's contents. Note that the
-            <tt>ImageView</tt> element defines a cursor attribute with a value of "crosshair" (move
-            the mouse pointer over the image to see the effect):
+            Below is the BXML source used to generate the applet's contents:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/labels/labels.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/labels/labels.bxml">
             <![CDATA[
             <Window title="Labels" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+                xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns="org.apache.pivot.wtk">
-                <content>
-                    <BoxPane styles="{padding:4, verticalAlignment:'center'}">
-                        <ImageView image="org/apache/pivot/tutorials/clock.png" cursor="crosshair"/>
-                        <Label text="What time is it?"/>
-                    </BoxPane>
-                </content>
+                <BoxPane styles="{padding:4, verticalAlignment:'center'}">
+                    <ImageView image="org/apache/pivot/tutorials/clock.png"/>
+                    <Label text="What time is it?"/>
+                </BoxPane>
             </Window>
             ]]>
         </source>
 
         <p>
-            Also note that the example uses a <tt>BoxPane</tt> to arrange the components
-            horizontally. <tt>BoxPane</tt> is discussed in more detail in the
+            Note that the example uses a <tt>BoxPane</tt> to arrange the components
+            horizontally. The <tt>BoxPane</tt> container is discussed in more detail in the
             <a href="layout-containers.html">Layout Containers</a> section.
         </p>
 
@@ -73,72 +72,5 @@ limitations under the License.
             the <tt>org.apache.pivot.wtk.media.Drawing</tt> class. Drawings are discussed in more
             detail in the <a href="drawing.html">Drawing</a> section.
         </p>
-
-        <p>
-            The application code used in this example is not significantly different from the code
-            used in the "Hello, World!" example. It simply loads the WTKX file and opens the
-            window:
-        </p>
-
-        <source type="java" location="org/apache/pivot/tutorials/labels/labels.wtkx">
-            <![CDATA[
-            package org.apache.pivot.tutorials.labels;
-
-            import org.apache.pivot.collections.Map;
-            import org.apache.pivot.wtk.Application;
-            import org.apache.pivot.wtk.DesktopApplicationContext;
-            import org.apache.pivot.wtk.Display;
-            import org.apache.pivot.wtk.Window;
-            import org.apache.pivot.wtkx.WTKXSerializer;
-
-            public class Labels implements Application {
-                private Window window = null;
-
-                @Override
-                public void startup(Display display, Map<String, String> properties) throws Exception {
-                    WTKXSerializer wtkxSerializer = new WTKXSerializer();
-                    window = (Window)wtkxSerializer.readObject(this, "labels.wtkx");
-                    window.open(display);
-                }
-
-                @Override
-                public boolean shutdown(boolean optional) {
-                    if (window != null) {
-                        window.close();
-                    }
-
-                    return false;
-                }
-
-                @Override
-                public void suspend() {
-                }
-
-                @Override
-                public void resume() {
-                }
-
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(Labels.class, args);
-                }
-            }
-            ]]>
-        </source>
-
-        <p>
-            In fact, because this application does not include any special logic, it could actually
-            have been launched using the <tt>org.apache.pivot.wtk.ScriptApplication</tt> class.
-            This class, which is included with the Pivot platform, implements the
-            <tt>Application</tt> interface and takes the name of a WTKX file to launch as a startup
-            property. The WTKX file is expected to contain a root element representing a
-            <tt>Window</tt> subclass.
-        </p>
-
-        <p>
-            The class is named <tt>ScriptApplication</tt> because it is often used to launch
-            applications whose logic is defined entirely in script; however, it can actually be
-            used to launch any application whose main window is defined in a single WTKX file. Many
-            of the examples in the following sections are launched using this class.
-        </p>
     </body>
 </document>

Modified: pivot/trunk/tutorials/www/link-buttons.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/link-buttons.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/link-buttons.xml (original)
+++ pivot/trunk/tutorials/www/link-buttons.xml Thu Oct 28 14:35:11 2010
@@ -33,35 +33,31 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>org/apache/pivot/tutorials/buttons/link_buttons.wtkx</src>
+                <src>/org/apache/pivot/tutorials/buttons/link_buttons.bxml</src>
             </startup-properties>
         </application>
 
         <p>
-            The WTKX source for the example is below:
+            The BXML source for the example is below:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/buttons/link_buttons.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/buttons/link_buttons.bxml">
             <![CDATA[
             <Window title="Link Buttons" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+                xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns:content="org.apache.pivot.wtk.content"
                 xmlns="org.apache.pivot.wtk">
-                <content>
-                    <CardPane wtkx:id="cardPane" selectedIndex="0" styles="{selectionChangeEffect:'horizontal_slide'}">
+                <Border>
+                    <CardPane bxml:id="cardPane" selectedIndex="0" styles="{selectionChangeEffect:'horizontal_slide'}">
                         <BoxPane orientation="vertical" styles="{horizontalAlignment:'center', verticalAlignment:'center'}">
                             <ImageView image="org/apache/pivot/tutorials/IMG_0735_2.jpg"/>
                             <LinkButton>
-                                <buttonData>
-                                    <content:ButtonData text="Next" icon="@resultset_next.png"/>
-                                </buttonData>
+                                <content:ButtonData text="Next" icon="@resultset_next.png"/>
 
                                 <buttonPressListeners>
-                                    <wtkx:script>
                                     function buttonPressed(button) {
                                         cardPane.setSelectedIndex(1);
                                     }
-                                    </wtkx:script>
                                 </buttonPressListeners>
                             </LinkButton>
                         </BoxPane>
@@ -69,21 +65,17 @@ limitations under the License.
                         <BoxPane orientation="vertical" styles="{horizontalAlignment:'center', verticalAlignment:'center'}">
                             <ImageView image="org/apache/pivot/tutorials/IMG_0767_2.jpg"/>
                             <LinkButton>
-                                <buttonData>
-                                    <content:ButtonData text="Previous" icon="@resultset_previous.png"/>
-                                </buttonData>
+                                <content:ButtonData text="Previous" icon="@resultset_previous.png"/>
 
                                 <buttonPressListeners>
-                                    <wtkx:script>
                                     function buttonPressed(button) {
                                         cardPane.setSelectedIndex(0);
                                     }
-                                    </wtkx:script>
                                 </buttonPressListeners>
                             </LinkButton>
                         </BoxPane>
                     </CardPane>
-                </content>
+                </Border>
             </Window>
             ]]>
         </source>
@@ -96,7 +88,7 @@ limitations under the License.
         </p>
 
         <p>
-            This example demonstrates another means of defining event handlers in WTKX: within an
+            This example demonstrates another means of defining event handlers in BXML: within an
             element that refers to a listener list property of its parent element. The
             <tt>&lt;buttonPressListeners&gt;</tt> element of each <tt>LinkButton</tt> contains
             script code that will be executed in response to a button press. In this case, the

Modified: pivot/trunk/tutorials/www/platform-overview.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/platform-overview.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/platform-overview.xml (original)
+++ pivot/trunk/tutorials/www/platform-overview.xml Thu Oct 28 14:35:11 2010
@@ -48,9 +48,6 @@ limitations under the License.
                 <b>Charts</b> - Classes for adding interactive charting capabilities to Pivot
                 applications.
             </li>
-            <li>
-                <b>Tools</b> - Development tools and utility applications.
-            </li>
         </ul>
 
         <p>
@@ -63,8 +60,8 @@ limitations under the License.
 
         <ul>
             <li>
-                <tt>org.apache.pivot.beans</tt> - Classes that provide access to the Java bean
-                properties of an object via a dictionary interface.
+                <tt>org.apache.pivot.beans</tt> - Classes that facilitate and simplify programmatic
+                interaction with Java Bean types.
             </li>
             <li>
                 <tt>org.apache.pivot.collections</tt> - A set of classes and interfaces that serve
@@ -126,33 +123,23 @@ limitations under the License.
                 blurs, reflections, and drop shadows.
             </li>
             <li>
-                <tt>org.apache.pivot.wtk.effects.easing</tt> - Contains "easing" operations for
-                producing natural-looking transitions. Based on easing equations developed by
-                <a href="http://robertpenner.com/">Robert Penner</a>.
-            </li>
-            <li>
-                <tt>org.apache.pivot.wtk.media</tt> - Classes to enable multimedia support in
-                Pivot applications.
+                <tt>org.apache.pivot.wtk.effects.easing</tt> - Classes representing "easing"
+                operations for producing natural-looking transitions. Based on easing equations
+                developed by <a href="http://robertpenner.com/">Robert Penner</a>.
             </li>
             <li>
-                <tt>org.apache.pivot.wtk.media.drawing</tt> - Classes for constructing vector-based
-                drawings.
+                <tt>org.apache.pivot.wtk.media</tt> - Classes representing media resources.
             </li>
             <li>
-                <tt>org.apache.pivot.wtk.skin</tt> - Contains common skins and abstract base
+                <tt>org.apache.pivot.wtk.skin</tt> - Theme-independent skins and abstract base
                 classes for theme-specific skins.
             </li>
             <li>
-                <tt>org.apache.pivot.wtk.text</tt> - Contains classes representing a text object
-                model.
+                <tt>org.apache.pivot.wtk.text</tt> - Text object model classes.
             </li>
             <li>
-                <tt>org.apache.pivot.wtk.text.validation</tt> - Provides classes for validating
-                user-entered text.
-            </li>
-            <li>
-                <tt>org.apache.pivot.wtkx</tt> - Provides support for loading WTK components from
-                XML.
+                <tt>org.apache.pivot.wtk.text.validation</tt> - Classes for validating user-entered
+                text.
             </li>
         </ul>
 
@@ -197,23 +184,6 @@ limitations under the License.
             </li>
         </ul>
 
-        <h3>Tools</h3>
-        <h4>pivot-tools-[version].jar</h4>
-
-        <ul>
-            <li>
-                <tt>org.apache.pivot.tools.json</tt> - Utility applications for working with JSON
-                data.
-            </li>
-            <li>
-                <tt>org.apache.pivot.tools.wtk</tt> - GUI components for use in tool applications.
-            </li>
-            <li>
-                <tt>org.apache.pivot.tools.xml</tt> - Utility applications for working with XML
-                data.
-            </li>
-        </ul>
-
         <p>
             Most of Pivot's classes live in the WTK libraries.
         </p>
@@ -712,14 +682,14 @@ limitations under the License.
         <p>
             Pivot applications can be constructed entirely in Java code, but it is often more
             efficient (and readable) to define a Pivot application using XML. Pivot supports an XML
-            markup language called WTKX that can be used to help simplify user interface
-            development. The following example demonstrates the use of WTKX to create two buttons
+            markup language called BXML that can be used to help simplify user interface
+            development. The following example demonstrates the use of BXML to create two buttons
             labeled "OK" and "Cancel" arranged in a horizontal line:
         </p>
 
         <source type="xml">
             <![CDATA[
-            <BoxPane xmlns:wtkx="http://pivot.apache.org/wtkx"
+            <BoxPane xmlns:bxml="http://pivot.apache.org/bxml"
                 xmlns="org.apache.pivot.wtk">
                 <PushButton buttonData="OK"/>
                 <PushButton buttonData="Cancel"/>
@@ -728,8 +698,8 @@ limitations under the License.
         </source>
 
         <p>
-            A more detailed overview of WTKX can be found in the
-            <a href="wtkx-primer.html">WTKX primer</a> section.
+            A more detailed overview of BXML can be found in the
+            <a href="bxml-primer.html">BXML primer</a> section.
         </p>
 
         <h2>Effects</h2>

Modified: pivot/trunk/tutorials/www/push-buttons.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/push-buttons.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/push-buttons.xml (original)
+++ pivot/trunk/tutorials/www/push-buttons.xml Thu Oct 28 14:35:11 2010
@@ -27,7 +27,7 @@ limitations under the License.
             modal dialog informing the user that the button was clicked:
         </p>
 
-        <application class="org.apache.pivot.tutorials.buttons.PushButtons"
+        <application class="org.apache.pivot.wtk.ScriptApplication"
             width="480" height="360">
             <libraries>
                 <library>core</library>
@@ -35,28 +35,34 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
+            <startup-properties>
+                <src>/org/apache/pivot/tutorials/buttons/push_buttons.bxml</src>
+            </startup-properties>
         </application>
 
         <p>
-            The WTKX source for the example is below:
+            The BXML source for the example is below:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/buttons/push_buttons.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/buttons/push_buttons.bxml">
             <![CDATA[
-            <Window title="Push Buttons" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+            <buttons:PushButtons title="Push Buttons" maximized="true"
+                xmlns:bxml="http://pivot.apache.org/bxml"
+                xmlns:buttons="org.apache.pivot.tutorials.buttons"
                 xmlns="org.apache.pivot.wtk">
-                <content>
+                <Border>
                     <BoxPane styles="{padding:4, horizontalAlignment:'center',
                         verticalAlignment:'center'}">
-                        <PushButton wtkx:id="pushButton" buttonData="Click Me!"/>
+                        <PushButton bxml:id="pushButton" buttonData="Click Me!"/>
                     </BoxPane>
-                </content>
-            </Window>
+                </Border>
+            </buttons:PushButtons>
             ]]>
         </source>
 
         <p>
+            TBD Mention use of custom namespace
+
             The following is the Java source for the example. The application simply registers the
             event listener that is called when the button is pressed, as an anonymous inner class
             that implements <tt>ButtonPressListener</tt>:
@@ -66,58 +72,31 @@ limitations under the License.
             <![CDATA[
             package org.apache.pivot.tutorials.buttons;
 
+            import java.net.URL;
+
+            import org.apache.pivot.beans.Bindable;
             import org.apache.pivot.collections.Map;
+            import org.apache.pivot.util.Resources;
             import org.apache.pivot.wtk.Alert;
-            import org.apache.pivot.wtk.Application;
             import org.apache.pivot.wtk.Button;
             import org.apache.pivot.wtk.ButtonPressListener;
-            import org.apache.pivot.wtk.DesktopApplicationContext;
-            import org.apache.pivot.wtk.Display;
             import org.apache.pivot.wtk.MessageType;
             import org.apache.pivot.wtk.PushButton;
             import org.apache.pivot.wtk.Window;
-            import org.apache.pivot.wtkx.WTKXSerializer;
 
-            public class PushButtons implements Application {
-                private Window window = null;
-                private PushButton pushButton = null;
+            public class PushButtons extends Window implements Bindable {
+                private PushButton pushButton;
 
                 @Override
-                public void startup(Display display, Map<String, String> properties) throws Exception {
-                    WTKXSerializer wtkxSerializer = new WTKXSerializer();
-                    window = (Window)wtkxSerializer.readObject(this, "push_buttons.wtkx");
-                    pushButton = (PushButton)wtkxSerializer.get("pushButton");
+                public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
+                    pushButton = (PushButton)namespace.get("pushButton");
 
-                    // Add a button press listener
                     pushButton.getButtonPressListeners().add(new ButtonPressListener() {
                         @Override
                         public void buttonPressed(Button button) {
-                            Alert.alert(MessageType.INFO, "You clicked me!", window);
+                            Alert.alert(MessageType.INFO, "You clicked me!", PushButtons.this);
                         }
                     });
-
-                    window.open(display);
-                }
-
-                @Override
-                public boolean shutdown(boolean optional) {
-                    if (window != null) {
-                        window.close();
-                    }
-
-                    return false;
-                }
-
-                @Override
-                public void suspend() {
-                }
-
-                @Override
-                public void resume() {
-                }
-
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(PushButtons.class, args);
                 }
             }
             ]]>

Modified: pivot/trunk/tutorials/www/radio-buttons.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/radio-buttons.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/radio-buttons.xml (original)
+++ pivot/trunk/tutorials/www/radio-buttons.xml Thu Oct 28 14:35:11 2010
@@ -27,7 +27,7 @@ limitations under the License.
             Pivot application:
         </p>
 
-        <application class="org.apache.pivot.tutorials.buttons.RadioButtons"
+        <application class="org.apache.pivot.wtk.ScriptApplication"
             width="480" height="360">
             <libraries>
                 <library>core</library>
@@ -35,29 +35,33 @@ limitations under the License.
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
+            <startup-properties>
+                <src>org/apache/pivot/tutorials/buttons/radio_buttons.bxml</src>
+            </startup-properties>
         </application>
 
         <p>
-            The WTKX source for the example is below:
+            The BXML source for the example is below:
         </p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/buttons/push_buttons.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/buttons/radio_buttons.bxml">
             <![CDATA[
-            <Window title="Radio Buttons" maximized="true"
-                xmlns:wtkx="http://pivot.apache.org/wtkx"
+            <buttons:RadioButtons title="Radio Buttons" maximized="true"
+                xmlns:bxml="http://pivot.apache.org/bxml"
+                xmlns:buttons="org.apache.pivot.tutorials.buttons"
                 xmlns="org.apache.pivot.wtk">
-                <content>
+                <Border>
                     <BoxPane orientation="vertical" styles="{padding:4}">
-                        <wtkx:define>
-                            <ButtonGroup wtkx:id="numbers"/>
-                        </wtkx:define>
-                        <RadioButton wtkx:id="oneButton" buttonData="One" buttonGroup="$numbers" selected="true"/>
-                        <RadioButton wtkx:id="twoButton" buttonData="Two" buttonGroup="$numbers"/>
-                        <RadioButton wtkx:id="threeButton" buttonData="Three" buttonGroup="$numbers"/>
-                        <PushButton wtkx:id="selectButton" buttonData="Select"/>
+                        <bxml:define>
+                            <ButtonGroup bxml:id="numbers"/>
+                        </bxml:define>
+                        <RadioButton bxml:id="oneButton" buttonData="One" buttonGroup="$numbers" selected="true"/>
+                        <RadioButton bxml:id="twoButton" buttonData="Two" buttonGroup="$numbers"/>
+                        <RadioButton bxml:id="threeButton" buttonData="Three" buttonGroup="$numbers"/>
+                        <PushButton bxml:id="selectButton" buttonData="Select"/>
                     </BoxPane>
-                </content>
-            </Window>
+                </Border>
+            </buttons:RadioButtons>
             ]]>
         </source>
 
@@ -75,32 +79,28 @@ limitations under the License.
             <![CDATA[
             package org.apache.pivot.tutorials.buttons;
 
+            import java.net.URL;
+
+            import org.apache.pivot.beans.Bindable;
             import org.apache.pivot.collections.Map;
+            import org.apache.pivot.util.Resources;
             import org.apache.pivot.wtk.Alert;
-            import org.apache.pivot.wtk.Application;
             import org.apache.pivot.wtk.Button;
             import org.apache.pivot.wtk.ButtonGroup;
             import org.apache.pivot.wtk.ButtonPressListener;
-            import org.apache.pivot.wtk.DesktopApplicationContext;
-            import org.apache.pivot.wtk.Display;
             import org.apache.pivot.wtk.MessageType;
             import org.apache.pivot.wtk.PushButton;
             import org.apache.pivot.wtk.Window;
-            import org.apache.pivot.wtkx.WTKXSerializer;
 
-            public class RadioButtons implements Application {
-                private Window window = null;
+            public class RadioButtons extends Window implements Bindable {
                 private PushButton selectButton = null;
 
                 @Override
-                public void startup(Display display, Map<String, String> properties)
-                    throws Exception {
-                    WTKXSerializer wtkxSerializer = new WTKXSerializer();
-                    window = (Window)wtkxSerializer.readObject(this, "radio_buttons.wtkx");
-                    selectButton = (PushButton)wtkxSerializer.get("selectButton");
+                public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
+                    selectButton = (PushButton)namespace.get("selectButton");
 
                     // Get a reference to the button group
-                    final ButtonGroup numbersGroup = (ButtonGroup)wtkxSerializer.get("numbers");
+                    final ButtonGroup numbersGroup = (ButtonGroup)namespace.get("numbers");
 
                     // Add a button press listener
                     selectButton.getButtonPressListeners().add(new ButtonPressListener() {
@@ -109,32 +109,9 @@ limitations under the License.
                             String message = "You selected \""
                                 + numbersGroup.getSelection().getButtonData()
                                 + "\".";
-                            Alert.alert(MessageType.INFO, message, window);
+                            Alert.alert(MessageType.INFO, message, RadioButtons.this);
                         }
                     });
-
-                    window.open(display);
-                }
-
-                @Override
-                public boolean shutdown(boolean optional) {
-                    if (window != null) {
-                        window.close();
-                    }
-
-                    return false;
-                }
-
-                @Override
-                public void suspend() {
-                }
-
-                @Override
-                public void resume() {
-                }
-
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(RadioButtons.class, args);
                 }
             }
             ]]>

Modified: pivot/trunk/tutorials/www/toggle-buttons.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/toggle-buttons.xml?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/toggle-buttons.xml (original)
+++ pivot/trunk/tutorials/www/toggle-buttons.xml Thu Oct 28 14:35:11 2010
@@ -37,39 +37,31 @@ limitations under the License.
                 <library>tutorials</library>
             </libraries>
             <startup-properties>
-                <src>org/apache/pivot/tutorials/buttons/toggle_buttons.wtkx</src>
+                <src>/org/apache/pivot/tutorials/buttons/toggle_buttons.bxml</src>
             </startup-properties>
         </application>
 
-        <p>The WTKX source for the example is below:</p>
+        <p>The BXML source for the example is below:</p>
 
-        <source type="xml" location="org/apache/pivot/tutorials/buttons/toggle_buttons.wtkx">
+        <source type="xml" location="org/apache/pivot/tutorials/buttons/toggle_buttons.bxml">
             <![CDATA[
-        <Window title="Toggle Buttons" maximized="true"
-            xmlns:wtkx="http://pivot.apache.org/wtkx"
-            xmlns:content="org.apache.pivot.wtk.content"
-            xmlns="org.apache.pivot.wtk">
-            <content>
+            <Window title="Toggle Buttons" maximized="true"
+                xmlns:bxml="http://pivot.apache.org/bxml"
+                xmlns:content="org.apache.pivot.wtk.content"
+                xmlns="org.apache.pivot.wtk">
                 <BoxPane styles="{padding:4, horizontalAlignment:'center',
                     verticalAlignment:'center'}">
                     <PushButton toggleButton="true">
-                        <buttonData>
-                            <content:ButtonData text="Anchor" icon="org/apache/pivot/tutorials/anchor.png"/>
-                        </buttonData>
+                        <content:ButtonData text="Anchor" icon="org/apache/pivot/tutorials/anchor.png"/>
                     </PushButton>
                     <PushButton toggleButton="true">
-                        <buttonData>
-                            <content:ButtonData text="Cup" icon="org/apache/pivot/tutorials/cup.png"/>
-                        </buttonData>
+                        <content:ButtonData text="Cup" icon="org/apache/pivot/tutorials/cup.png"/>
                     </PushButton>
                     <PushButton toggleButton="true">
-                        <buttonData>
-                            <content:ButtonData text="Star" icon="org/apache/pivot/tutorials/star.png"/>
-                        </buttonData>
+                        <content:ButtonData text="Star" icon="org/apache/pivot/tutorials/star.png"/>
                     </PushButton>
                 </BoxPane>
-            </content>
-        </Window>
+            </Window>
         ]]>
         </source>
 
@@ -83,8 +75,8 @@ limitations under the License.
 
         <p>
             Note also that the values of the "icon" attributes do not begin with an '@' symbol. In
-            WTKX, image URLs are commonly specified with this prefix, to indicate that an image's
-            location is relative to the WTKX source file currently being loaded. An image path
+            BXML, image URLs are commonly specified with this prefix, to indicate that an image's
+            location is relative to the BXML source file currently being loaded. An image path
             without an '@' prefix, such as those in this example, is generally treated as an
             absolute location relative to the application's classpath.
         </p>

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java?rev=1028323&r1=1028322&r2=1028323&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ScriptApplication.java Thu Oct 28 14:35:11 2010
@@ -17,7 +17,6 @@
 package org.apache.pivot.wtk;
 
 import java.net.URL;
-import java.io.File;
 
 import org.apache.pivot.beans.BXMLSerializer;
 import org.apache.pivot.collections.Map;
@@ -34,8 +33,7 @@ public class ScriptApplication implement
     public static final String STYLESHEET_KEY = "stylesheet";
 
     @Override
-    public void startup(Display display, Map<String, String> properties)
-        throws Exception {
+    public void startup(Display display, Map<String, String> properties) throws Exception {
         // Get the location of the source file
         String src = properties.get(SRC_KEY);
         if (src == null) {
@@ -46,14 +44,6 @@ public class ScriptApplication implement
         URL location = classLoader.getResource(src.substring(1));
 
         if (location == null) {
-            File file = new File(src);
-
-            if (file.exists()) {
-               location = file.toURI().toURL();
-            }
-        }
-
-        if (location == null) {
             throw new IllegalArgumentException("Cannot find source file \"" + src + "\".");
         }