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/07/10 02:40:27 UTC

svn commit: r962734 - in /pivot/trunk/demos: src/org/apache/pivot/demos/binding/namespace_binding_demo.bxml www/index.xml www/namespace-binding.xml

Author: gbrown
Date: Sat Jul 10 00:40:27 2010
New Revision: 962734

URL: http://svn.apache.org/viewvc?rev=962734&view=rev
Log:
Add namespace binding demo to demos WAR.

Added:
    pivot/trunk/demos/www/namespace-binding.xml
Modified:
    pivot/trunk/demos/src/org/apache/pivot/demos/binding/namespace_binding_demo.bxml
    pivot/trunk/demos/www/index.xml

Modified: pivot/trunk/demos/src/org/apache/pivot/demos/binding/namespace_binding_demo.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/demos/src/org/apache/pivot/demos/binding/namespace_binding_demo.bxml?rev=962734&r1=962733&r2=962734&view=diff
==============================================================================
--- pivot/trunk/demos/src/org/apache/pivot/demos/binding/namespace_binding_demo.bxml (original)
+++ pivot/trunk/demos/src/org/apache/pivot/demos/binding/namespace_binding_demo.bxml Sat Jul 10 00:40:27 2010
@@ -20,30 +20,32 @@ limitations under the License.
     xmlns:bxml="http://pivot.apache.org/bxml"
     xmlns:binding="org.apache.pivot.demos.binding"
     xmlns="org.apache.pivot.wtk">
-    <Form>
-        <Form.Section heading="One-Way Binding">
-            <TextInput bxml:id="textInput" Form.label="Text Input"/>
-            <Label bxml:id="textInputLabel" Form.label="Text" text="${textInput.text}"/>
-        </Form.Section>
+    <Border>
+        <Form>
+            <Form.Section heading="One-Way Binding">
+                <TextInput bxml:id="textInput" Form.label="Text Input"/>
+                <Label bxml:id="textInputLabel" Form.label="Text" text="${textInput.text}"/>
+            </Form.Section>
 
-        <Form.Section heading="Two-Way Binding">
-            <TextInput bxml:id="textInput1" Form.label="Text Input 1" text="${textInput2.text}"/>
-            <TextInput bxml:id="textInput2" Form.label="Text Input 2" text="${textInput1.text}"/>
-        </Form.Section>
+            <Form.Section heading="Two-Way Binding">
+                <TextInput bxml:id="textInput1" Form.label="Text Input 1" text="${textInput2.text}"/>
+                <TextInput bxml:id="textInput2" Form.label="Text Input 2" text="${textInput1.text}"/>
+            </Form.Section>
 
-        <Form.Section heading="Style Binding">
-            <ColorChooserButton bxml:id="colorChooserButton" Form.label="Color Chooser Button"
-                selectedColor="#000000"/>
-            <Label bxml:id="colorChooserLabel" Form.label="Selected Color"
-                text="${colorChooserButton.selectedColor}">
-                <styles color="${colorChooserButton.selectedColor}"/>
-            </Label>
-        </Form.Section>
+            <Form.Section heading="Style Binding">
+                <ColorChooserButton bxml:id="colorChooserButton" Form.label="Color Chooser Button"
+                    selectedColor="#000000"/>
+                <Label bxml:id="colorChooserLabel" Form.label="Selected Color"
+                    text="${colorChooserButton.selectedColor}">
+                    <styles color="${colorChooserButton.selectedColor}"/>
+                </Label>
+            </Form.Section>
 
-        <Form.Section heading="Manual Binding">
-            <ListButton bxml:id="listButton" Form.label="List Button"
-                listData="['Zero', 'One', 'Two', 'Three']" selectedIndex="0"/>
-            <Label bxml:id="listButtonLabel" Form.label="Selected Index"/>
-        </Form.Section>
-    </Form>
+            <Form.Section heading="Manual Binding">
+                <ListButton bxml:id="listButton" Form.label="List Button"
+                    listData="['Zero', 'One', 'Two', 'Three']" selectedIndex="0"/>
+                <Label bxml:id="listButtonLabel" Form.label="Selected Index"/>
+            </Form.Section>
+        </Form>
+    </Border>
 </binding:NamespaceBindingDemo>

Modified: pivot/trunk/demos/www/index.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/demos/www/index.xml?rev=962734&r1=962733&r2=962734&view=diff
==============================================================================
--- pivot/trunk/demos/www/index.xml (original)
+++ pivot/trunk/demos/www/index.xml Sat Jul 10 00:40:27 2010
@@ -32,6 +32,7 @@ limitations under the License.
         <document-item id="itunes-search"/>
         <document-item id="decorators"/>
         <document-item id="suggest"/>
+        <document-item id="namespace-binding"/>
         <document-item id="xml-viewer"/>
         <document-item id="json-viewer"/>
         <document-item id="table-row-editor"/>

Added: pivot/trunk/demos/www/namespace-binding.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/demos/www/namespace-binding.xml?rev=962734&view=auto
==============================================================================
--- pivot/trunk/demos/www/namespace-binding.xml (added)
+++ pivot/trunk/demos/www/namespace-binding.xml Sat Jul 10 00:40:27 2010
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<document>
+    <properties>
+        <title>Namespace Binding</title>
+        <description>
+            Demonstrates dynamic property binding in Pivot.
+        </description>
+    </properties>
+
+    <body>
+        <p>
+            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>
+                <library>wtk</library>
+                <library>wtk-terra</library>
+                <library>demos</library>
+            </libraries>
+
+            <startup-properties>
+                <src>org/apache/pivot/demos/binding/namespace_binding_demo.bxml</src>
+            </startup-properties>
+        </application>
+    </body>
+</document>