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/05/27 15:42:01 UTC

svn commit: r779169 [3/3] - in /incubator/pivot/trunk: ./ core/src/pivot/beans/ core/src/pivot/collections/ core/src/pivot/collections/adapter/ core/src/pivot/serialization/ core/src/pivot/util/concurrent/ core/test/pivot/core/test/ core/test/resources...

Modified: incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraTabPaneSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraTabPaneSkin.java?rev=779169&r1=779168&r2=779169&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraTabPaneSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtk/skin/terra/TerraTabPaneSkin.java Wed May 27 13:41:59 2009
@@ -255,15 +255,15 @@
         }
 
         public Font getFont() {
-        	return buttonFont;
+            return buttonFont;
         }
 
         public Color getColor() {
-        	return buttonColor;
+            return buttonColor;
         }
 
         public Color getDisabledColor() {
-        	return disabledButtonColor;
+            return disabledButtonColor;
         }
     }
 
@@ -314,15 +314,15 @@
 
         @Override
         public void stop() {
-        	TabPane tabPane = (TabPane)getComponent();
+            TabPane tabPane = (TabPane)getComponent();
 
             if (!expand) {
                 tab.setVisible(false);
             }
 
-        	tabPane.setEnabled(true);
+            tabPane.setEnabled(true);
 
-        	super.stop();
+            super.stop();
         }
 
         @Override
@@ -363,18 +363,18 @@
     private static final int SELECTION_CHANGE_DURATION = 250;
     private static final int SELECTION_CHANGE_RATE = 30;
 
-	public static final int GRADIENT_BEVEL_THICKNESS = 4;
-	private static final Button.DataRenderer DEFAULT_DATA_RENDERER = new ButtonDataRenderer() {
-	    @Override
-	    public void render(Object data, Button button, boolean highlighted) {
-	        // TODO Create a custom inner renderer class that can display
-	        // the close button (and also avoid the heap allocation every
-	        // time we're called to render())
-	        Component tab = (Component)data;
-	        super.render(new ButtonData(TabPane.getIcon(tab), TabPane.getName(tab)),
+    public static final int GRADIENT_BEVEL_THICKNESS = 4;
+    private static final Button.DataRenderer DEFAULT_DATA_RENDERER = new ButtonDataRenderer() {
+        @Override
+        public void render(Object data, Button button, boolean highlighted) {
+            // TODO Create a custom inner renderer class that can display
+            // the close button (and also avoid the heap allocation every
+            // time we're called to render())
+            Component tab = (Component)data;
+            super.render(new ButtonData(TabPane.getIcon(tab), TabPane.getName(tab)),
                 button, highlighted);
-	    }
-	};
+        }
+    };
 
     public TerraTabPaneSkin() {
         TerraTheme theme = (TerraTheme)Theme.getTheme();
@@ -862,9 +862,9 @@
 
             // Draw the bevel for vertical tabs
             if (tabOrientation == Orientation.VERTICAL) {
-	            graphics.setPaint(new GradientPaint(width / 2, contentBounds.y + 1, buttonBevelColor,
-	                width / 2, contentBounds.y + 1 + GRADIENT_BEVEL_THICKNESS, activeTabColor));
-	            graphics.fillRect(contentBounds.x + 1, contentBounds.y + 1,
+                graphics.setPaint(new GradientPaint(width / 2, contentBounds.y + 1, buttonBevelColor,
+                    width / 2, contentBounds.y + 1 + GRADIENT_BEVEL_THICKNESS, activeTabColor));
+                graphics.fillRect(contentBounds.x + 1, contentBounds.y + 1,
                     contentBounds.width - 2, GRADIENT_BEVEL_THICKNESS);
             }
         }
@@ -1086,9 +1086,9 @@
 
     // Tab pane events
     public void tabInserted(TabPane tabPane, int index) {
-    	if (selectionChangeTransition != null) {
-    	    selectionChangeTransition.end();
-    	}
+        if (selectionChangeTransition != null) {
+            selectionChangeTransition.end();
+        }
 
         Component tab = tabPane.getTabs().get(index);
         tab.setVisible(false);
@@ -1102,7 +1102,7 @@
         tabButton.setEnabled(tab.isEnabled());
         tab.getComponentStateListeners().add(tabStateListener);
 
-    	// If this is the first tab, select it
+        // If this is the first tab, select it
         if (tabPane.getTabs().getLength() == 1) {
             tabPane.setSelectedIndex(0);
         }
@@ -1111,12 +1111,12 @@
     }
 
     public void tabsRemoved(TabPane tabPane, int index, Sequence<Component> removed) {
-    	if (selectionChangeTransition != null) {
-    	    selectionChangeTransition.end();
-    	}
+        if (selectionChangeTransition != null) {
+            selectionChangeTransition.end();
+        }
 
         // Remove the buttons
-    	Sequence<Component> removedButtons = buttonFlowPane.remove(index, removed.getLength());
+        Sequence<Component> removedButtons = buttonFlowPane.remove(index, removed.getLength());
 
         for (int i = 0, n = removed.getLength(); i < n; i++) {
             TabButton tabButton = (TabButton)removedButtons.get(i);
@@ -1135,7 +1135,7 @@
     }
 
     // Tab pane selection events
-	public Vote previewSelectedIndexChange(TabPane tabPane, int selectedIndex) {
+    public Vote previewSelectedIndexChange(TabPane tabPane, int selectedIndex) {
         Vote vote;
 
         if (tabPane.isShowing()
@@ -1185,18 +1185,18 @@
         }
 
         return vote;
-	}
+    }
 
-	public void selectedIndexChangeVetoed(TabPane tabPane, Vote reason) {
+    public void selectedIndexChangeVetoed(TabPane tabPane, Vote reason) {
         if (reason == Vote.DENY
             && selectionChangeTransition != null) {
             selectionChangeTransition.stop();
             selectionChangeTransition = null;
         }
-	}
+    }
 
-	public void selectedIndexChanged(TabPane tabPane, int previousSelectedIndex) {
-	    int selectedIndex = tabPane.getSelectedIndex();
+    public void selectedIndexChanged(TabPane tabPane, int previousSelectedIndex) {
+        int selectedIndex = tabPane.getSelectedIndex();
         if (selectedIndex == -1) {
             Button button = tabButtonGroup.getSelection();
             if (button != null) {

Modified: incubator/pivot/trunk/wtk/test/pivot/wtk/test/CardPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/pivot/wtk/test/CardPaneTest.java?rev=779169&r1=779168&r2=779169&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/pivot/wtk/test/CardPaneTest.java (original)
+++ incubator/pivot/trunk/wtk/test/pivot/wtk/test/CardPaneTest.java Wed May 27 13:41:59 2009
@@ -39,43 +39,43 @@
         throws Exception {
         bind();
 
-    	frame = new Frame(new FlowPane());
-    	frame.getStyles().put("padding", 0);
-    	frame.setTitle("Component Pane Test");
-    	frame.setPreferredSize(800, 600);
-    	frame.setLocation(20, 20);
+        frame = new Frame(new FlowPane());
+        frame.getStyles().put("padding", 0);
+        frame.setTitle("Component Pane Test");
+        frame.setPreferredSize(800, 600);
+        frame.setLocation(20, 20);
 
         Button.Group sizeGroup = Button.getGroup("sizeGroup");
         sizeGroup.getGroupListeners().add(new Button.GroupListener() {
-        	public void selectionChanged(Button.Group buttonGroup, Button previousSelection) {
-        		final Button selection = buttonGroup.getSelection();
-        		int selectedIndex = selection == null ? -1 : selection.getParent().indexOf(selection);
-
-        		cardPane.getCardPaneListeners().add(new CardPaneListener.Adapter() {
-        			public Vote previewSelectedIndexChange(CardPane cardPane, int selectedIndex) {
-        				if (selection != null) {
-        					selection.getParent().setEnabled(false);
-        				}
-
-        				return Vote.APPROVE;
-        			}
-
-        			public void selectedIndexChangeVetoed(CardPane cardPane, Vote reason) {
-        				if (selection != null
-    						&& reason == Vote.DENY) {
-        					selection.getParent().setEnabled(true);
-        				}
-        			}
-
-        			public void selectedIndexChanged(CardPane cardPane, int previousSelectedIndex) {
-        				if (selection != null) {
-        					selection.getParent().setEnabled(true);
-        				}
-        			}
-        		});
+            public void selectionChanged(Button.Group buttonGroup, Button previousSelection) {
+                final Button selection = buttonGroup.getSelection();
+                int selectedIndex = selection == null ? -1 : selection.getParent().indexOf(selection);
+
+                cardPane.getCardPaneListeners().add(new CardPaneListener.Adapter() {
+                    public Vote previewSelectedIndexChange(CardPane cardPane, int selectedIndex) {
+                        if (selection != null) {
+                            selection.getParent().setEnabled(false);
+                        }
+
+                        return Vote.APPROVE;
+                    }
+
+                    public void selectedIndexChangeVetoed(CardPane cardPane, Vote reason) {
+                        if (selection != null
+                            && reason == Vote.DENY) {
+                            selection.getParent().setEnabled(true);
+                        }
+                    }
+
+                    public void selectedIndexChanged(CardPane cardPane, int previousSelectedIndex) {
+                        if (selection != null) {
+                            selection.getParent().setEnabled(true);
+                        }
+                    }
+                });
 
-        		cardPane.setSelectedIndex(selectedIndex);
-        	}
+                cardPane.setSelectedIndex(selectedIndex);
+            }
         });
 
         frame.open(display);
@@ -83,9 +83,9 @@
     }
 
     public boolean shutdown(boolean optional) {
-    	if (frame != null) {
-    	    frame.close();
-    	}
+        if (frame != null) {
+            frame.close();
+        }
 
         return true;
     }

Modified: incubator/pivot/trunk/wtk/test/pivot/wtk/test/CheckedListViewTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/pivot/wtk/test/CheckedListViewTest.java?rev=779169&r1=779168&r2=779169&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/pivot/wtk/test/CheckedListViewTest.java (original)
+++ incubator/pivot/trunk/wtk/test/pivot/wtk/test/CheckedListViewTest.java Wed May 27 13:41:59 2009
@@ -28,13 +28,13 @@
 
     public void startup(Display display, Dictionary<String, String> properties)
         throws Exception {
-    	ListView listView = new ListView(JSONSerializer.parseList("['One', 'Two', 'Three', 'Four']"));
-    	listView.setSelectMode(ListView.SelectMode.MULTI);
-    	listView.setCheckmarksEnabled(true);
-    	listView.setItemChecked(0, true);
-    	listView.setItemChecked(2, true);
+        ListView listView = new ListView(JSONSerializer.parseList("['One', 'Two', 'Three', 'Four']"));
+        listView.setSelectMode(ListView.SelectMode.MULTI);
+        listView.setCheckmarksEnabled(true);
+        listView.setItemChecked(0, true);
+        listView.setItemChecked(2, true);
 
-    	window = new Window(listView);
+        window = new Window(listView);
         window.setTitle("Checked List View Test");
         window.setMaximized(true);
         window.open(display);

Modified: incubator/pivot/trunk/wtk/test/pivot/wtk/test/PushButtonTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/pivot/wtk/test/PushButtonTest.java?rev=779169&r1=779168&r2=779169&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/pivot/wtk/test/PushButtonTest.java (original)
+++ incubator/pivot/trunk/wtk/test/pivot/wtk/test/PushButtonTest.java Wed May 27 13:41:59 2009
@@ -24,30 +24,30 @@
 import pivot.wtk.Window;
 
 public class PushButtonTest implements Application {
-	private Window window = null;
+    private Window window = null;
 
-	public void startup(Display display, Dictionary<String, String> properties)
-		throws Exception {
-		window = new Window();
-		FlowPane flowPane = new FlowPane();
+    public void startup(Display display, Dictionary<String, String> properties)
+        throws Exception {
+        window = new Window();
+        FlowPane flowPane = new FlowPane();
 
-		PushButton pushButton = new PushButton("OK");
-		pushButton.getStyles().put("preferredAspectRatio", 3.0f);
-		flowPane.add(pushButton);
+        PushButton pushButton = new PushButton("OK");
+        pushButton.getStyles().put("preferredAspectRatio", 3.0f);
+        flowPane.add(pushButton);
 
-		window.setContent(flowPane);
+        window.setContent(flowPane);
 
-		window.open(display);
-	}
+        window.open(display);
+    }
 
-	public boolean shutdown(boolean optional) {
-		window.close();
-		return true;
-	}
+    public boolean shutdown(boolean optional) {
+        window.close();
+        return true;
+    }
 
-	public void suspend() {
-	}
+    public void suspend() {
+    }
 
-	public void resume() {
-	}
+    public void resume() {
+    }
 }

Modified: incubator/pivot/trunk/wtk/test/pivot/wtk/test/SliderTest.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/pivot/wtk/test/SliderTest.java?rev=779169&r1=779168&r2=779169&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/pivot/wtk/test/SliderTest.java (original)
+++ incubator/pivot/trunk/wtk/test/pivot/wtk/test/SliderTest.java Wed May 27 13:41:59 2009
@@ -37,9 +37,9 @@
         window = new Window((Component)wtkxSerializer.readObject(getClass().getResource("slider_test.wtkx")));
         slider = (Slider)wtkxSerializer.getObjectByID("slider");
         slider.getSliderValueListeners().add(new SliderValueListener() {
-        	public void valueChanged(Slider slider, int previousValue) {
-        		valueLabel.setText(Integer.toString(slider.getValue()));
-        	}
+            public void valueChanged(Slider slider, int previousValue) {
+                valueLabel.setText(Integer.toString(slider.getValue()));
+            }
         });
 
         valueLabel = (Label)wtkxSerializer.getObjectByID("valueLabel");

Modified: incubator/pivot/trunk/wtk/test/pivot/wtk/test/form_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/pivot/wtk/test/form_test.wtkx?rev=779169&r1=779168&r2=779169&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/pivot/wtk/test/form_test.wtkx (original)
+++ incubator/pivot/trunk/wtk/test/pivot/wtk/test/form_test.wtkx Wed May 27 13:41:59 2009
@@ -20,8 +20,8 @@
     xmlns:wtkx="http://incubator.apache.org/pivot/wtkx/1.1" xmlns="pivot.wtk">
     <sections>
         <Form.Section heading="Test Section">
-	        <Label Form.name="ABCD" text="Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS..."
-	            styles="{wrapText:true}"/>
+            <Label Form.name="ABCD" text="Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS..."
+                styles="{wrapText:true}"/>
         </Form.Section>
         <Form.Section heading="Test Section">
             <Label Form.name="ABCD" text="Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS..."

Modified: incubator/pivot/trunk/wtk/test/pivot/wtk/text/test/text_area_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/pivot/wtk/text/test/text_area_test.wtkx?rev=779169&r1=779168&r2=779169&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/test/pivot/wtk/text/test/text_area_test.wtkx (original)
+++ incubator/pivot/trunk/wtk/test/pivot/wtk/text/test/text_area_test.wtkx Wed May 27 13:41:59 2009
@@ -26,28 +26,28 @@
             </columns>
             <rows>
                 <TablePane.Row height="1*">
-					<Border styles="{padding:0}">
-					    <content>
-					        <ScrollPane horizontalScrollBarPolicy="fill" verticalScrollBarPolicy="fillToCapacity">
-					            <view>
-					                <TextArea wtkx:id="textArea">
-					                   <document>
-					                       <wtkx:include src="document.wtkx"/>
-					                   </document>
-					                </TextArea>
-					            </view>
-					        </ScrollPane>
-					    </content>
-					</Border>
+                    <Border styles="{padding:0}">
+                        <content>
+                            <ScrollPane horizontalScrollBarPolicy="fill" verticalScrollBarPolicy="fillToCapacity">
+                                <view>
+                                    <TextArea wtkx:id="textArea">
+                                       <document>
+                                           <wtkx:include src="document.wtkx"/>
+                                       </document>
+                                    </TextArea>
+                                </view>
+                            </ScrollPane>
+                        </content>
+                    </Border>
                 </TablePane.Row>
                 <TablePane.Row height="-1">
                     <FlowPane>
                         <Label>
                             <text><![CDATA[Selection:]]></text>
                         </Label>
-	                    <Label wtkx:id="selectionStartLabel"/>
-	                    <Label text=":"/>
-	                    <Label wtkx:id="selectionLengthLabel"/>
+                        <Label wtkx:id="selectionStartLabel"/>
+                        <Label text=":"/>
+                        <Label wtkx:id="selectionLengthLabel"/>
                     </FlowPane>
                 </TablePane.Row>
             </rows>