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/09/30 17:43:27 UTC

svn commit: r1003111 - in /pivot/trunk: tutorials/src/org/apache/pivot/tutorials/webqueries/ tutorials/www/ wtk/src/org/apache/pivot/wtk/media/ wtk/src/org/apache/pivot/wtk/skin/

Author: gbrown
Date: Thu Sep 30 15:43:26 2010
New Revision: 1003111

URL: http://svn.apache.org/viewvc?rev=1003111&view=rev
Log:
Minor fixes; tutorial updates.

Added:
    pivot/trunk/tutorials/www/bxml-primer.xml
      - copied unchanged from r1001207, pivot/trunk/tutorials/www/wtkx-primer.xml
    pivot/trunk/tutorials/www/hello-bxml.xml
      - copied unchanged from r1001207, pivot/trunk/tutorials/www/hello-wtkx.xml
Removed:
    pivot/trunk/tutorials/www/hello-wtkx.xml
    pivot/trunk/tutorials/www/wtkx-primer.xml
Modified:
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java
    pivot/trunk/tutorials/www/data-binding.xml
    pivot/trunk/tutorials/www/index.xml
    pivot/trunk/tutorials/www/property-binding.xml
    pivot/trunk/wtk/src/org/apache/pivot/wtk/media/Picture.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java

Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java?rev=1003111&r1=1003110&r2=1003111&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/webqueries/ExpensesWindow.java Thu Sep 30 15:43:26 2010
@@ -132,8 +132,7 @@ public class ExpensesWindow extends Wind
         }
 
         // Create the delete confirmation prompt
-        ArrayList<String> options = new ArrayList((String)resources.get("cancel"),
-            (String)resources.get("ok"));
+        ArrayList<String> options = new ArrayList(resources.get("cancel"), resources.get("ok"));
         deleteConfirmationPrompt = new Prompt(MessageType.QUESTION, (String)resources.get("confirmDelete"),
             options);
 

Modified: pivot/trunk/tutorials/www/data-binding.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/data-binding.xml?rev=1003111&r1=1003110&r2=1003111&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/data-binding.xml (original)
+++ pivot/trunk/tutorials/www/data-binding.xml Thu Sep 30 15:43:26 2010
@@ -61,14 +61,17 @@ limitations under the License.
             <tt>load()</tt> method:
         </p>
 
-        <application class="org.apache.pivot.tutorials.databinding.DataBinding"
-            width="430" height="280">
+        <application class="org.apache.pivot.wtk.ScriptApplication" width="430" height="280">
             <libraries>
                 <library>core</library>
                 <library>wtk</library>
                 <library>wtk-terra</library>
                 <library>tutorials</library>
             </libraries>
+
+            <startup-properties>
+                <src>/org/apache/pivot/tutorials/databinding/data_binding.bxml</src>
+            </startup-properties>
         </application>
 
         <p>

Modified: pivot/trunk/tutorials/www/index.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/index.xml?rev=1003111&r1=1003110&r2=1003111&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/index.xml (original)
+++ pivot/trunk/tutorials/www/index.xml Thu Sep 30 15:43:26 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="wtkx-primer.html">WTKX Primer</a> section, which provides a detailed
+            <a href="bxml-primer.html">WTKX Primer</a> section, which provides a detailed
             description of Pivot's markup language, before browsing the tutorials themsevles.
         </p>
 
@@ -48,7 +48,7 @@ limitations under the License.
             <document-item id="sample-application"/>
             <document-item id="platform-overview"/>
             <document-item id="hello-world">
-                <document-item id="hello-wtkx"/>
+                <document-item id="hello-bxml"/>
             </document-item>
             <document-item id="component-and-container"/>
         </item-group>
@@ -143,7 +143,7 @@ limitations under the License.
         </item-group>
 
         <item-group name="Further Reading">
-            <document-item id="wtkx-primer"/>
+            <document-item id="bxml-primer"/>
         </item-group>
     </body>
 </document>

Modified: pivot/trunk/tutorials/www/property-binding.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/property-binding.xml?rev=1003111&r1=1003110&r2=1003111&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/property-binding.xml (original)
+++ pivot/trunk/tutorials/www/property-binding.xml Thu Sep 30 15:43:26 2010
@@ -38,7 +38,7 @@ limitations under the License.
             </libraries>
 
             <startup-properties>
-                <src>org/apache/pivot/tutorials/databinding/property_binding.bxml</src>
+                <src>/org/apache/pivot/tutorials/databinding/property_binding.bxml</src>
             </startup-properties>
         </application>
     </body>

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/media/Picture.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/media/Picture.java?rev=1003111&r1=1003110&r2=1003111&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/media/Picture.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/media/Picture.java Thu Sep 30 15:43:26 2010
@@ -49,6 +49,10 @@ public class Picture extends Image {
         this.bufferedImage = bufferedImage;
     }
 
+    public BufferedImage getBufferedImage() {
+        return bufferedImage;
+    }
+
     @Override
     public int getWidth() {
         return bufferedImage.getWidth();
@@ -161,8 +165,4 @@ public class Picture extends Image {
     public void paint(Graphics2D graphics) {
         graphics.drawImage(bufferedImage, 0, 0, null);
     }
-
-    public BufferedImage getBufferedImage() {
-        return bufferedImage;
-    }
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java?rev=1003111&r1=1003110&r2=1003111&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkinParagraphView.java Thu Sep 30 15:43:26 2010
@@ -283,7 +283,7 @@ class TextAreaSkinParagraphView implemen
         LineMetrics lm = font.getLineMetrics("", fontRenderContext);
         float rowHeight = lm.getAscent() + lm.getDescent();
 
-        int i = (int)Math.floor((float)y / rowHeight);
+        int i = (int)Math.floor(y / rowHeight);
 
         return getRowInsertionPoint(i, x);
     }