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 2009/06/30 01:12:31 UTC

svn commit: r789488 [2/2] - in /incubator/pivot/trunk: demos/src/org/apache/pivot/demos/dnd/ demos/src/org/apache/pivot/demos/dom/ demos/src/org/apache/pivot/demos/itunes/ demos/src/org/apache/pivot/demos/million/ demos/src/org/apache/pivot/demos/rowed...

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MovieViewSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MovieViewSkin.java?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MovieViewSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/MovieViewSkin.java Mon Jun 29 23:12:30 2009
@@ -247,7 +247,7 @@
             throw new IllegalArgumentException("horizontalAlignment is null.");
         }
 
-        setHorizontalAlignment(HorizontalAlignment.decode(horizontalAlignment));
+        setHorizontalAlignment(HorizontalAlignment.valueOf(horizontalAlignment.toUpperCase()));
     }
 
     public VerticalAlignment getVerticalAlignment() {
@@ -276,7 +276,7 @@
             throw new IllegalArgumentException("verticalAlignment is null.");
         }
 
-        setVerticalAlignment(VerticalAlignment.decode(verticalAlignment));
+        setVerticalAlignment(VerticalAlignment.valueOf(verticalAlignment.toUpperCase()));
     }
 
     // MovieViewListener methods

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFormSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFormSkin.java?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFormSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraFormSkin.java Mon Jun 29 23:12:30 2009
@@ -339,7 +339,7 @@
             throw new IllegalArgumentException("fieldAlignment is null.");
         }
 
-        setFieldAlignment(HorizontalAlignment.decode(fieldAlignment));
+        setFieldAlignment(HorizontalAlignment.valueOf(fieldAlignment.toUpperCase()));
     }
 
     public int getHorizontalSpacing() {

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraScrollBarSkin.java Mon Jun 29 23:12:30 2009
@@ -45,17 +45,6 @@
  */
 public class TerraScrollBarSkin extends ContainerSkin
     implements ScrollBarListener, ScrollBarValueListener {
-
-    /**
-     * The types of scroll that are supported.
-     *
-     * @author tvolkert
-     */
-    protected enum IncrementType {
-        UNIT,
-        BLOCK;
-    }
-
     /**
      * Encapsulates the code needed to perform timer-controlled scrolling. This
      * class is used by <tt>TerraScrollBarSkin</tt> (automatic block increment
@@ -66,7 +55,7 @@
      */
     protected class AutomaticScroller {
         public int direction;
-        public IncrementType incrementType;
+        public Mouse.ScrollType incrementType;
         public int stopValue;
 
         private ApplicationContext.ScheduledCallback scheduledScrollCallback = null;
@@ -91,7 +80,7 @@
          * If automatic scrolling of any scroll bar is already in progress.
          * Only one scroll bar may be automatically scrolled at one time
          */
-        public void start(int direction, IncrementType incrementType, int stopValue) {
+        public void start(int direction, Mouse.ScrollType incrementType, int stopValue) {
             if (scheduledScrollCallback != null) {
                 throw new IllegalStateException("Already running");
             }
@@ -131,7 +120,7 @@
 
             int adjustment;
 
-            if (incrementType == IncrementType.UNIT) {
+            if (incrementType == Mouse.ScrollType.UNIT) {
                 adjustment = direction * scrollBar.getUnitIncrement();
             } else {
                 adjustment = direction * scrollBar.getBlockIncrement();
@@ -315,7 +304,7 @@
 
                 // Start the automatic scroller. It'll be stopped when we
                 // mouse up or mouse out
-                automaticScroller.start(scrollButton.getDirection(), IncrementType.UNIT, -1);
+                automaticScroller.start(scrollButton.getDirection(), Mouse.ScrollType.UNIT, -1);
 
                 pressed = true;
                 repaintComponent();
@@ -1066,7 +1055,7 @@
             }
 
             // Start the automatic scroller
-            automaticScroller.start(direction, IncrementType.BLOCK, realStopValue);
+            automaticScroller.start(direction, Mouse.ScrollType.BLOCK, realStopValue);
             consumed = true;
         }
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java Mon Jun 29 23:12:30 2009
@@ -1074,7 +1074,7 @@
             throw new IllegalArgumentException("tabOrientation is null.");
         }
 
-        setTabOrientation(Orientation.decode(tabOrientation));
+        setTabOrientation(Orientation.valueOf(tabOrientation.toUpperCase()));
     }
 
     public boolean isCollapsible() {

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/CardPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/CardPaneTest.java?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/CardPaneTest.java (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/CardPaneTest.java Mon Jun 29 23:12:30 2009
@@ -47,7 +47,7 @@
         sheet = (Sheet)wtkxSerializer.readObject(this, "card_pane_test.wtkx");
         cardPane = (CardPane)wtkxSerializer.get("cardPane");
 
-        Button.Group sizeGroup = Button.getGroup("sizeGroup");
+        Button.Group sizeGroup = Button.getNamedGroups().get("sizeGroup");
         sizeGroup.getGroupListeners().add(new Button.GroupListener() {
             public void selectionChanged(Button.Group buttonGroup, Button previousSelection) {
                 final Button selection = buttonGroup.getSelection();

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/drawing_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/drawing_test.wtkx?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/drawing_test.wtkx (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/drawing_test.wtkx Mon Jun 29 23:12:30 2009
@@ -16,9 +16,13 @@
 limitations under the License.
 -->
 
-<ScrollPane xmlns:wtkx="http://pivot.apache.org/wtkx"
+<Window xmlns:wtkx="http://pivot.apache.org/wtkx"
     xmlns="org.apache.pivot.wtk">
-    <view>
-        <ImageView styles="{backgroundColor:'#999999'}" image="@sample.wtkd"/>
-    </view>
-</ScrollPane>
+    <content>
+        <ScrollPane>
+            <view>
+                <ImageView styles="{backgroundColor:'#999999'}" image="@sample.wtkd"/>
+            </view>
+        </ScrollPane>
+    </content>
+</Window>

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/file_browser_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/file_browser_test.wtkx?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/file_browser_test.wtkx (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/file_browser_test.wtkx Mon Jun 29 23:12:30 2009
@@ -22,8 +22,8 @@
     xmlns:content="org.apache.pivot.wtk.content"
     xmlns="org.apache.pivot.wtk">
     <content>
-        <ScrollPane horizontalScrollBarPolicy="fillToCapacity"
-            verticalScrollBarPolicy="fillToCapacity">
+        <ScrollPane horizontalScrollBarPolicy="fill_to_capacity"
+            verticalScrollBarPolicy="fill_to_capacity">
             <view>
                 <TreeView wtkx:id="folderTreeView">
                     <nodeRenderer>

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/sample.wtkd
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/sample.wtkd?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/sample.wtkd (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/sample.wtkd Mon Jun 29 23:12:30 2009
@@ -54,7 +54,7 @@
                 
 	            <Rectangle x="0" y="0"
 	                width="160" height="120" 
-                    fill="{paintType:'radialGradient', 
+                    fill="{paintType:'radial_gradient', 
                         centerX:50, centerY:50, radius:50,
                         stops: [{color:'#ffffff', offset:0.0}, {color:'#000000', offset:1.0}]}"
 	                stroke="#00ff00" strokeThickness="4"

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/text_area_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/text_area_test.wtkx?rev=789488&r1=789487&r2=789488&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/text_area_test.wtkx (original)
+++ incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/text/test/text_area_test.wtkx Mon Jun 29 23:12:30 2009
@@ -29,7 +29,7 @@
                 <TablePane.Row height="1*">
                     <Border styles="{padding:0}">
                         <content>
-                            <ScrollPane horizontalScrollBarPolicy="fill" verticalScrollBarPolicy="fillToCapacity">
+                            <ScrollPane horizontalScrollBarPolicy="fill" verticalScrollBarPolicy="fill_to_capacity">
                                 <view>
                                     <TextArea wtkx:id="textArea">
                                        <document>
@@ -64,7 +64,7 @@
                 <TablePane.Row height="1*">
                     <Border styles="{padding:0}">
                         <content>
-                            <ScrollPane horizontalScrollBarPolicy="fillToCapacity">
+                            <ScrollPane horizontalScrollBarPolicy="fill_to_capacity">
                                 <view>
                                     <TreeView wtkx:id="treeView">
                                         <nodeRenderer>