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/09/27 14:02:44 UTC

svn commit: r819290 - in /incubator/pivot/trunk: demos/src/org/apache/pivot/demos/scripting/ tutorials/src/org/apache/pivot/tutorials/ tutorials/src/org/apache/pivot/tutorials/buttons/ tutorials/src/org/apache/pivot/tutorials/filebrowsing/ tutorials/sr...

Author: gbrown
Date: Sun Sep 27 12:02:41 2009
New Revision: 819290

URL: http://svn.apache.org/viewvc?rev=819290&view=rev
Log:
Resolve issue PIVOT-292.

Added:
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroupListener.java
Modified:
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/ScriptingDemo.java
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/demo.js
    incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/scripting_demo.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/alert.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/alerts.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/RadioButtons.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/radio_buttons.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/file_browser_sheets.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/box_panes.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/flow_panes.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menu_bar.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menu_section.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/CardPanes.java
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/card_panes.wtkx
    incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/tab_panes.wtkx
    incubator/pivot/trunk/tutorials/www/box_panes.template.html
    incubator/pivot/trunk/tutorials/www/card_panes.template.html
    incubator/pivot/trunk/tutorials/www/flow_panes.template.html
    incubator/pivot/trunk/tutorials/www/index.html
    incubator/pivot/trunk/tutorials/www/radio_buttons.template.html
    incubator/pivot/trunk/tutorials/www/tutorial.css
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Button.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonListener.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ButtonSkin.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java
    incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/CardPaneTest.java
    incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/card_pane_test.wtkx
    incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/menu_bar_test.wtkx

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/ScriptingDemo.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/ScriptingDemo.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/ScriptingDemo.java (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/ScriptingDemo.java Sun Sep 27 12:02:41 2009
@@ -43,6 +43,8 @@
     public void startup(Display display, Map<String, String> properties)
         throws Exception {
         WTKXSerializer wtkxSerializer = new WTKXSerializer();
+        wtkxSerializer.put("bar", "12345");
+
         window = (Window)wtkxSerializer.readObject(this, "scripting_demo.wtkx");
         foo = (String)wtkxSerializer.get("foo");
         listData = (List<?>)wtkxSerializer.get("listData");

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/demo.js
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/demo.js?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/demo.js (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/demo.js Sun Sep 27 12:02:41 2009
@@ -14,8 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+importClass(java.lang.System);
 importPackage(org.apache.pivot.collections);
 
+System.out.println("Executing external script block.");
+
 var foo = "ABCDE";
 
 var listData = new ArrayList();

Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/scripting_demo.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/scripting/scripting_demo.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java Sun Sep 27 12:02:41 2009
@@ -40,6 +40,7 @@
 import org.apache.pivot.wtk.ApplicationContext;
 import org.apache.pivot.wtk.Border;
 import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.ButtonGroup;
 import org.apache.pivot.wtk.ButtonPressListener;
 import org.apache.pivot.wtk.ComponentMouseButtonListener;
 import org.apache.pivot.wtk.ListButton;
@@ -293,6 +294,7 @@
         private Menu.Item helpAboutMenuItem = null;
 
         private Menu.Section menuSection = null;
+        private ButtonGroup imageMenuGroup = null;
 
         @Override
         public Vote previewExpandedChange(Rollup rollup) {
@@ -305,7 +307,6 @@
 
                     @Override
                     public void perform() {
-                        Button.Group imageMenuGroup = Button.getNamedGroups().get("imageMenuGroup");
                         Button selectedItem = imageMenuGroup.getSelection();
 
                         String imageName = (String)selectedItem.getUserData().get("image");
@@ -346,6 +347,7 @@
 
                 try {
                     menuSection = (Menu.Section)wtkxSerializer.readObject(this, "menu_section.wtkx");
+                    imageMenuGroup = (ButtonGroup)wtkxSerializer.get("imageMenuGroup");
                 } catch(IOException exception) {
                     throw new RuntimeException(exception);
                 } catch(SerializationException exception) {
@@ -808,6 +810,7 @@
         private Component component = null;
         private PushButton alertButton = null;
         private PushButton promptButton = null;
+        private ButtonGroup messageTypeGroup = null;
 
         @Override
         public Vote previewExpandedChange(Rollup rollup) {
@@ -823,13 +826,13 @@
 
                 alertButton = (PushButton)wtkxSerializer.get("alertButton");
                 promptButton = (PushButton)wtkxSerializer.get("promptButton");
+                messageTypeGroup = (ButtonGroup)wtkxSerializer.get("messageTypeGroup");
 
                 rollup.setContent(component);
 
                 alertButton.getButtonPressListeners().add(new ButtonPressListener() {
                     @Override
                     public void buttonPressed(Button button) {
-                        Button.Group messageTypeGroup = Button.getNamedGroups().get("messageType");
                         Button selection = messageTypeGroup.getSelection();
 
                         Map<String, ?> userData;
@@ -870,7 +873,6 @@
                 promptButton.getButtonPressListeners().add(new ButtonPressListener() {
                     @Override
                     public void buttonPressed(Button button) {
-                        Button.Group messageTypeGroup = Button.getNamedGroups().get("messageType");
                         Button selection = messageTypeGroup.getSelection();
 
                         Map<String, ?> userData;

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/alert.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/alert.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/alerts.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/alerts.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/RadioButtons.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/RadioButtons.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/RadioButtons.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/RadioButtons.java Sun Sep 27 12:02:41 2009
@@ -20,6 +20,7 @@
 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;
@@ -40,7 +41,7 @@
         selectButton = (PushButton)wtkxSerializer.get("selectButton");
 
         // Get a reference to the button group
-        final Button.Group numbersGroup = Button.getNamedGroups().get("numbers");
+        final ButtonGroup numbersGroup = (ButtonGroup)wtkxSerializer.get("numbers");
 
         // Add a button press listener
         selectButton.getButtonPressListeners().add(new ButtonPressListener() {

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/radio_buttons.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/buttons/radio_buttons.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/FileBrowserSheets.java Sun Sep 27 12:02:41 2009
@@ -24,6 +24,7 @@
 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;
@@ -40,7 +41,7 @@
 public class FileBrowserSheets implements Application {
     private Window window = null;
 
-    @WTKX private Button.Group fileBrowserSheetModeGroup = null;
+    @WTKX private ButtonGroup fileBrowserSheetModeGroup = null;
     @WTKX private PushButton openSheetButton = null;
 
     @Override

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/file_browser_sheets.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/filebrowsing/file_browser_sheets.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/box_panes.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/box_panes.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/flow_panes.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/flow_panes.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_column.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/layout/table_panes_configure_row.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menu_bar.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menu_bar.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menu_section.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/menu_section.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/CardPanes.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/CardPanes.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/CardPanes.java (original)
+++ incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/CardPanes.java Sun Sep 27 12:02:41 2009
@@ -55,6 +55,8 @@
         previousButton = (LinkButton)wtkxSerializer.get("previousButton");
         nextButton = (LinkButton)wtkxSerializer.get("nextButton");
         sizeToSelectionCheckbox = (Checkbox)wtkxSerializer.get("sizeToSelectionCheckbox");
+
+
         crossfadeRadioButton = (RadioButton)wtkxSerializer.get("crossfadeRadioButton");
         horizontalSlideRadioButton = (RadioButton)wtkxSerializer.get("horizontalSlideRadioButton");
         verticalSlideRadioButton = (RadioButton)wtkxSerializer.get("verticalSlideRadioButton");

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/card_panes.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/card_panes.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/tab_panes.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/navigation/tab_panes.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/tutorials/www/box_panes.template.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/www/box_panes.template.html?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/www/box_panes.template.html (original)
+++ incubator/pivot/trunk/tutorials/www/box_panes.template.html Sun Sep 27 12:02:41 2009
@@ -85,29 +85,26 @@
                             &lt;/BoxPane&gt;
                         &lt;/content&gt;
                     &lt;/Border&gt;
-                    &lt;BoxPane orientation="vertical" styles="{padding:6, spacing:8,
-                        fill:true}"&gt;
+                    &lt;BoxPane orientation="vertical" styles="{padding:6, spacing:8, fill:true}"&gt;
+                        &lt;wtkx:define&gt;
+                            &lt;ButtonGroup wtkx:id="orientation"/&gt;
+                            &lt;ButtonGroup wtkx:id="horizontalAlignment"/&gt;
+                            &lt;ButtonGroup wtkx:id="verticalAlignment"/&gt;
+                        &lt;/wtkx:define&gt;
+
                         &lt;Label text="Orientation" styles="{fontBold:true}"/&gt;
-                        &lt;RadioButton wtkx:id="horizontalOrientationButton"
-                            buttonData="Horizontal" group="orientation" selected="true"/&gt;
-                        &lt;RadioButton wtkx:id="verticalOrientationButton"
-                            buttonData="Vertical" group="orientation"/&gt;
+                        &lt;RadioButton wtkx:id="horizontalOrientationButton" buttonData="Horizontal" buttonGroup="$orientation" selected="true"/&gt;
+                        &lt;RadioButton wtkx:id="verticalOrientationButton" buttonData="Vertical" buttonGroup="$orientation"/&gt;
 
                         &lt;Label text="Horizontal Alignment" styles="{fontBold:true}"/&gt;
-                        &lt;RadioButton wtkx:id="horizontalAlignmentLeftButton"
-                            buttonData="Left" group="horizontalAlignment" selected="true"/&gt;
-                        &lt;RadioButton wtkx:id="horizontalAlignmentRightButton"
-                            buttonData="Right" group="horizontalAlignment"/&gt;
-                        &lt;RadioButton wtkx:id="horizontalAlignmentCenterButton"
-                            buttonData="Center" group="horizontalAlignment"/&gt;
+                        &lt;RadioButton wtkx:id="horizontalAlignmentLeftButton" buttonData="Left" buttonGroup="$horizontalAlignment" selected="true"/&gt;
+                        &lt;RadioButton wtkx:id="horizontalAlignmentRightButton" buttonData="Right" buttonGroup="$horizontalAlignment"/&gt;
+                        &lt;RadioButton wtkx:id="horizontalAlignmentCenterButton" buttonData="Center" buttonGroup="$horizontalAlignment"/&gt;
 
                         &lt;Label text="Vertical Alignment" styles="{fontBold:true}"/&gt;
-                        &lt;RadioButton wtkx:id="verticalAlignmentTopButton"
-                            buttonData="Top" group="verticalAlignment" selected="true"/&gt;
-                        &lt;RadioButton wtkx:id="verticalAlignmentBottomButton"
-                            buttonData="Bottom" group="verticalAlignment"/&gt;
-                        &lt;RadioButton wtkx:id="verticalAlignmentCenterButton"
-                            buttonData="Center" group="verticalAlignment"/&gt;
+                        &lt;RadioButton wtkx:id="verticalAlignmentTopButton" buttonData="Top" buttonGroup="$verticalAlignment" selected="true"/&gt;
+                        &lt;RadioButton wtkx:id="verticalAlignmentBottomButton" buttonData="Bottom" buttonGroup="$verticalAlignment"/&gt;
+                        &lt;RadioButton wtkx:id="verticalAlignmentCenterButton" buttonData="Center" buttonGroup="$verticalAlignment"/&gt;
 
                         &lt;BoxPane styles="{padding:{top:8}}"&gt;
                             &lt;Checkbox wtkx:id="fillCheckbox" buttonData="Fill"/&gt;

Modified: incubator/pivot/trunk/tutorials/www/card_panes.template.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/www/card_panes.template.html?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/www/card_panes.template.html (original)
+++ incubator/pivot/trunk/tutorials/www/card_panes.template.html Sun Sep 27 12:02:41 2009
@@ -119,18 +119,25 @@
                             &lt;BoxPane orientation="vertical" styles="{padding:4, spacing:6}"&gt;
                                 &lt;Checkbox wtkx:id="sizeToSelectionCheckbox" buttonData="Size to selection"/&gt;
                                 &lt;Label text="Selection change effect:"/&gt;
+
+                                &lt;wtkx:define&gt;
+                                    &lt;ButtonGroup wtkx:id="selectionChangeEffect"/&gt;
+                                &lt;/wtkx:define&gt;
+
                                 &lt;RadioButton wtkx:id="crossfadeRadioButton" buttonData="Crossfade" selected="true"
-                                    group="selectionChangeEffect"/&gt;
+                                    buttonGroup="$selectionChangeEffect"/&gt;
                                 &lt;RadioButton wtkx:id="horizontalSlideRadioButton" buttonData="Horizontal Slide"
-                                    group="selectionChangeEffect"/&gt;
+                                    buttonGroup="$selectionChangeEffect"/&gt;
                                 &lt;RadioButton wtkx:id="verticalSlideRadioButton" buttonData="Vertical Slide"
-                                    group="selectionChangeEffect"/&gt;
+                                    buttonGroup="$selectionChangeEffect"/&gt;
                                 &lt;RadioButton wtkx:id="horizontalFlipRadioButton" buttonData="Horizontal Flip"
-                                    group="selectionChangeEffect"/&gt;
+                                    buttonGroup="$selectionChangeEffect"/&gt;
                                 &lt;RadioButton wtkx:id="verticalFlipRadioButton" buttonData="Vertical Flip"
-                                    group="selectionChangeEffect"/&gt;
+                                    buttonGroup="$selectionChangeEffect"/&gt;
+                                &lt;RadioButton wtkx:id="zoomRadioButton" buttonData="Zoom"
+                                    buttonGroup="$selectionChangeEffect"/&gt;
                                 &lt;RadioButton wtkx:id="noneRadioButton" buttonData="None"
-                                    group="selectionChangeEffect"/&gt;
+                                    buttonGroup="$selectionChangeEffect"/&gt;
                             &lt;/BoxPane&gt;
                         &lt;/content&gt;
                     &lt;/Border&gt;
@@ -173,8 +180,10 @@
     private RadioButton verticalSlideRadioButton = null;
     private RadioButton horizontalFlipRadioButton = null;
     private RadioButton verticalFlipRadioButton = null;
+    private RadioButton zoomRadioButton = null;
     private RadioButton noneRadioButton = null;
 
+    @Override
     public void startup(Display display, Map&lt;String, String&gt; properties)
         throws Exception {
         WTKXSerializer wtkxSerializer = new WTKXSerializer();
@@ -183,32 +192,39 @@
         previousButton = (LinkButton)wtkxSerializer.get("previousButton");
         nextButton = (LinkButton)wtkxSerializer.get("nextButton");
         sizeToSelectionCheckbox = (Checkbox)wtkxSerializer.get("sizeToSelectionCheckbox");
+
+
         crossfadeRadioButton = (RadioButton)wtkxSerializer.get("crossfadeRadioButton");
         horizontalSlideRadioButton = (RadioButton)wtkxSerializer.get("horizontalSlideRadioButton");
         verticalSlideRadioButton = (RadioButton)wtkxSerializer.get("verticalSlideRadioButton");
         horizontalFlipRadioButton = (RadioButton)wtkxSerializer.get("horizontalFlipRadioButton");
         verticalFlipRadioButton = (RadioButton)wtkxSerializer.get("verticalFlipRadioButton");
+        zoomRadioButton = (RadioButton)wtkxSerializer.get("zoomRadioButton");
         noneRadioButton = (RadioButton)wtkxSerializer.get("noneRadioButton");
 
         cardPane.getCardPaneListeners().add(new CardPaneListener.Adapter() {
+            @Override
             public void selectedIndexChanged(CardPane cardPane, int previousSelectedIndex) {
                 updateLinkButtonState();
             }
         });
 
         previousButton.getButtonPressListeners().add(new ButtonPressListener() {
+            @Override
             public void buttonPressed(Button button) {
                 cardPane.setSelectedIndex(cardPane.getSelectedIndex() - 1);
             }
         });
 
         nextButton.getButtonPressListeners().add(new ButtonPressListener() {
+            @Override
             public void buttonPressed(Button button) {
                 cardPane.setSelectedIndex(cardPane.getSelectedIndex() + 1);
             }
         });
 
         ButtonStateListener checkboxStateListener = new ButtonStateListener() {
+            @Override
             public void stateChanged(Button button, Button.State previousState) {
                 updateCardPane();
             }
@@ -217,6 +233,7 @@
         sizeToSelectionCheckbox.getButtonStateListeners().add(checkboxStateListener);
 
         ButtonStateListener radioButtonStateListener = new ButtonStateListener() {
+            @Override
             public void stateChanged(Button button, Button.State previousState) {
                 if (button.isSelected()) {
                     updateCardPane();
@@ -229,6 +246,7 @@
         verticalSlideRadioButton.getButtonStateListeners().add(radioButtonStateListener);
         horizontalFlipRadioButton.getButtonStateListeners().add(radioButtonStateListener);
         verticalFlipRadioButton.getButtonStateListeners().add(radioButtonStateListener);
+        zoomRadioButton.getButtonStateListeners().add(radioButtonStateListener);
         noneRadioButton.getButtonStateListeners().add(radioButtonStateListener);
 
         updateCardPane();
@@ -237,6 +255,7 @@
         window.open(display);
     }
 
+    @Override
     public boolean shutdown(boolean optional) {
         if (window != null) {
             window.close();
@@ -245,9 +264,11 @@
         return false;
     }
 
+    @Override
     public void suspend() {
     }
 
+    @Override
     public void resume() {
     }
 
@@ -269,6 +290,9 @@
         } else if (verticalFlipRadioButton.isSelected()) {
             cardPane.getStyles().put("selectionChangeEffect",
                 CardPaneSkin.SelectionChangeEffect.VERTICAL_FLIP);
+        } else if (zoomRadioButton.isSelected()) {
+            cardPane.getStyles().put("selectionChangeEffect",
+                CardPaneSkin.SelectionChangeEffect.ZOOM);
         } else {
             cardPane.getStyles().put("selectionChangeEffect", null);
         }
@@ -276,7 +300,7 @@
 
     private void updateLinkButtonState() {
         int selectedIndex = cardPane.getSelectedIndex();
-        previousButton.setEnabled(selectedIndex > 0);
+        previousButton.setEnabled(selectedIndex &gt; 0);
         nextButton.setEnabled(selectedIndex &lt; cardPane.getLength() - 1);
     }
 

Modified: incubator/pivot/trunk/tutorials/www/flow_panes.template.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/www/flow_panes.template.html?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/www/flow_panes.template.html (original)
+++ incubator/pivot/trunk/tutorials/www/flow_panes.template.html Sun Sep 27 12:02:41 2009
@@ -54,19 +54,19 @@
     xmlns:wtkx="http://pivot.apache.org/wtkx"
     xmlns="org.apache.pivot.wtk"&gt;
     &lt;content&gt;
-        &lt;SplitPane splitRatio="0.5"&gt;
+        &lt;SplitPane splitRatio="0.75"&gt;
             &lt;left&gt;
                 &lt;Border styles="{padding:0}"&gt;
                     &lt;content&gt;
                         &lt;FlowPane wtkx:id="flowPane"&gt;
-                            &lt;PushButton buttonData="0" styles="{preferredAspectRatio:1.5}"/&gt;
-                            &lt;PushButton buttonData="1" styles="{preferredAspectRatio:1.5}"/&gt;
-                            &lt;PushButton buttonData="2" styles="{preferredAspectRatio:1.5}"/&gt;
+                            &lt;PushButton buttonData="0" styles="{minimumAspectRatio:1.5}"/&gt;
+                            &lt;PushButton buttonData="1" styles="{minimumAspectRatio:1.5}"/&gt;
+                            &lt;PushButton buttonData="2" styles="{minimumAspectRatio:1.5}"/&gt;
                             &lt;PushButton buttonData="3" preferredWidth="20" preferredHeight="20"/&gt;
                             &lt;PushButton buttonData="4" preferredWidth="30" preferredHeight="30"/&gt;
                             &lt;PushButton buttonData="5" preferredWidth="40" preferredHeight="40"/&gt;
-                            &lt;PushButton buttonData="6" styles="{preferredAspectRatio:1.5}"/&gt;
-                            &lt;PushButton buttonData="7" styles="{preferredAspectRatio:1.5}"/&gt;
+                            &lt;PushButton buttonData="6" styles="{minimumAspectRatio:1.5}"/&gt;
+                            &lt;PushButton buttonData="7" styles="{minimumAspectRatio:1.5}"/&gt;
                         &lt;/FlowPane&gt;
                     &lt;/content&gt;
                 &lt;/Border&gt;
@@ -76,9 +76,13 @@
                     &lt;content&gt;
                         &lt;BoxPane orientation="vertical"&gt;
                             &lt;Label text="Alignment" styles="{fontBold:true}"/&gt;
-                            &lt;RadioButton wtkx:id="leftRadioButton" buttonData="Left" group="alignment" selected="true"/&gt;
-                            &lt;RadioButton wtkx:id="rightRadioButton" buttonData="Right" group="alignment"/&gt;
-                            &lt;RadioButton wtkx:id="centerRadioButton" buttonData="Center" group="alignment"/&gt;
+
+                            &lt;wtkx:define&gt;
+                                &lt;ButtonGroup wtkx:id="alignment"/&gt;
+                            &lt;/wtkx:define&gt;
+                            &lt;RadioButton wtkx:id="leftRadioButton" buttonData="Left" buttonGroup="$alignment" selected="true"/&gt;
+                            &lt;RadioButton wtkx:id="rightRadioButton" buttonData="Right" buttonGroup="$alignment"/&gt;
+                            &lt;RadioButton wtkx:id="centerRadioButton" buttonData="Center" buttonGroup="$alignment"/&gt;
                         &lt;/BoxPane&gt;
                     &lt;/content&gt;
                 &lt;/Border&gt;

Modified: incubator/pivot/trunk/tutorials/www/index.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/www/index.html?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/www/index.html (original)
+++ incubator/pivot/trunk/tutorials/www/index.html Sun Sep 27 12:02:41 2009
@@ -22,6 +22,12 @@
 <head>
 <title>Pivot Tutorial</title>
 <link rel="stylesheet" href="tutorial.css">
+<style>
+ul {
+    list-style-type: none;
+    padding-left: 20px;
+}
+</style>
 </head>
 <body>
 <p>This tutorial introduces developers to the Pivot platform. It is designed as a step-by-step guide that explains how to get started using a number of common Pivot features, beginning with a detailed introduction to the platform and the compulsory first programming exercise, "Hello World", written in Pivot. The sections are organized as follows:</p>

Modified: incubator/pivot/trunk/tutorials/www/radio_buttons.template.html
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/www/radio_buttons.template.html?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/www/radio_buttons.template.html (original)
+++ incubator/pivot/trunk/tutorials/www/radio_buttons.template.html Sun Sep 27 12:02:41 2009
@@ -57,18 +57,19 @@
     xmlns="org.apache.pivot.wtk"&gt;
     &lt;content&gt;
         &lt;BoxPane orientation="vertical" styles="{padding:4}"&gt;
-            &lt;RadioButton wtkx:id="oneButton" buttonData="One" group="numbers" selected="true"/&gt;
-            &lt;RadioButton wtkx:id="twoButton" buttonData="Two" group="numbers"/&gt;
-            &lt;RadioButton wtkx:id="threeButton" buttonData="Three" group="numbers"/&gt;
+            &lt;wtkx:define&gt;
+                &lt;ButtonGroup wtkx:id="numbers"/&gt;
+            &lt;/wtkx:define&gt;
+            &lt;RadioButton wtkx:id="oneButton" buttonData="One" buttonGroup="$numbers" selected="true"/&gt;
+            &lt;RadioButton wtkx:id="twoButton" buttonData="Two" buttonGroup="$numbers"/&gt;
+            &lt;RadioButton wtkx:id="threeButton" buttonData="Three" buttonGroup="$numbers"/&gt;
             &lt;PushButton wtkx:id="selectButton" buttonData="Select"/&gt;
         &lt;/BoxPane&gt;
     &lt;/content&gt;
 &lt;/Window&gt;
 </pre>
 
-<p>The following is the Java source for the example. Like the push button example, the application registers an event listener that is called when the button is pressed. It also gets a reference to the button group, which is used by the handler. This is an instance of <tt>Button.Group</tt> that is automatically created by the WTKX serializer, which creates one <tt>Group</tt> per unique button group name. The loader ensures that group names are unique within the application that defines them. Button groups can also be created and assigned programmatically.</p>
-
-<p><tt>numbersGroup</tt> is defined as a final local variable so the handler method will have access to it. When called, the handler gets a reference to the currently selected button from the button group and displays an alert containing the data of the selected button.</p>
+<p>The following is the Java source for the example. Like the push button example, the application registers an event listener that is called when the button is pressed. It also gets a reference to a button group named <tt>numbersGroup</tt> (<tt>numbersGroup</tt> is defined as a final local variable so the handler method will have access to it). When called, the handler gets a reference to the currently selected button from the button group and displays an alert containing the data of the selected button.</p>
 
 <pre class="brush:java;">
 package org.apache.pivot.tutorials.buttons;
@@ -77,6 +78,7 @@
 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;
@@ -89,6 +91,7 @@
     private Window window = null;
     private PushButton selectButton = null;
 
+    @Override
     public void startup(Display display, Map&lt;String, String&gt; properties)
         throws Exception {
         WTKXSerializer wtkxSerializer = new WTKXSerializer();
@@ -96,10 +99,11 @@
         selectButton = (PushButton)wtkxSerializer.get("selectButton");
 
         // Get a reference to the button group
-        final Button.Group numbersGroup = Button.getNamedGroups().get("numbers");
+        final ButtonGroup numbersGroup = (ButtonGroup)wtkxSerializer.get("numbers");
 
         // Add a button press listener
         selectButton.getButtonPressListeners().add(new ButtonPressListener() {
+            @Override
             public void buttonPressed(Button button) {
                 String message = "You selected \""
                     + numbersGroup.getSelection().getButtonData()
@@ -111,6 +115,7 @@
         window.open(display);
     }
 
+    @Override
     public boolean shutdown(boolean optional) {
         if (window != null) {
             window.close();
@@ -119,9 +124,11 @@
         return false;
     }
 
+    @Override
     public void suspend() {
     }
 
+    @Override
     public void resume() {
     }
 

Modified: incubator/pivot/trunk/tutorials/www/tutorial.css
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/www/tutorial.css?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/www/tutorial.css (original)
+++ incubator/pivot/trunk/tutorials/www/tutorial.css Sun Sep 27 12:02:41 2009
@@ -48,8 +48,3 @@
 table {
     font-size:11px;
 }
-
-ul {
-    list-style-type: none;
-    padding-left: 20px;
-}

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Button.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Button.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Button.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Button.java Sun Sep 27 12:02:41 2009
@@ -16,14 +16,9 @@
  */
 package org.apache.pivot.wtk;
 
-import java.util.Iterator;
-
 import org.apache.pivot.collections.Dictionary;
-import org.apache.pivot.collections.HashMap;
-import org.apache.pivot.util.ImmutableIterator;
 import org.apache.pivot.util.ListenerList;
 
-
 /**
  * Abstract base class for button components.
  */
@@ -45,122 +40,6 @@
     }
 
     /**
-     * Class representing a toggle button group.
-     */
-    public static class Group {
-        private static class GroupListenerList extends ListenerList<GroupListener>
-            implements GroupListener {
-            @Override
-            public void selectionChanged(Group group, Button previousSelection) {
-                for (GroupListener listener : this) {
-                    listener.selectionChanged(group, previousSelection);
-                }
-            }
-        }
-
-        private Button selection = null;
-        private GroupListenerList groupListeners = new GroupListenerList();
-
-        public Group() {
-        }
-
-        public Button getSelection() {
-            return selection;
-        }
-
-        private void setSelection(Button selection) {
-            Button previousSelection = this.selection;
-
-            if (previousSelection != selection) {
-                this.selection = selection;
-                groupListeners.selectionChanged(this, previousSelection);
-            }
-        }
-
-        public ListenerList<GroupListener> getGroupListeners() {
-            return groupListeners;
-        }
-    }
-
-    /**
-     * Listener interface for toggle button groups.
-     */
-    public interface GroupListener {
-        /**
-         * Called when a button group's selection has changed.
-         *
-         * @param group
-         * @param previousSelection
-         */
-        public void selectionChanged(Group group, Button previousSelection);
-    }
-
-    /**
-     * Named group dictionary.
-     */
-    public static class NamedGroupDictionary
-        implements Dictionary<String, Group>, Iterable<String> {
-        private NamedGroupDictionary() {
-        }
-
-        @Override
-        public Group get(String name) {
-            return namedGroups.get(name);
-        }
-
-        @Override
-        public Group put(String name, Group group) {
-            boolean update = containsKey(name);
-            Group previousGroup = namedGroups.put(name, group);
-
-            if (update) {
-                namedGroupDictionaryListeners.groupUpdated(name, previousGroup);
-            }
-            else {
-                namedGroupDictionaryListeners.groupAdded(name);
-            }
-
-            return previousGroup;
-        }
-
-        @Override
-        public Group remove(String name) {
-            Group group = null;
-
-            if (containsKey(name)) {
-                group = namedGroups.remove(name);
-                namedGroupDictionaryListeners.groupRemoved(name, group);
-            }
-
-            return group;
-        }
-
-        @Override
-        public boolean containsKey(String name) {
-            return namedGroups.containsKey(name);
-        }
-
-        @Override
-        public boolean isEmpty() {
-            return namedGroups.isEmpty();
-        }
-
-        @Override
-        public Iterator<String> iterator() {
-            return new ImmutableIterator<String>(namedGroups.iterator());
-        }
-    }
-
-    /**
-     * Named group dictionary listener interface.
-     */
-    public interface NamedGroupDictionaryListener {
-        public void groupAdded(String name);
-        public void groupUpdated(String name, Group previousGroup);
-        public void groupRemoved(String name, Group group);
-    };
-
-    /**
      * Button listener list.
      */
     private static class ButtonListenerList extends ListenerList<ButtonListener>
@@ -201,9 +80,9 @@
         }
 
         @Override
-        public void groupChanged(Button button, Button.Group previousGroup) {
+        public void buttonGroupChanged(Button button, ButtonGroup previousButtonGroup) {
             for (ButtonListener listener : this) {
-                listener.groupChanged(button, previousGroup);
+                listener.buttonGroupChanged(button, previousButtonGroup);
             }
         }
 
@@ -248,30 +127,6 @@
         }
     }
 
-    private static class NamedGroupDictionaryListenerList extends ListenerList<NamedGroupDictionaryListener>
-        implements NamedGroupDictionaryListener {
-        @Override
-        public void groupAdded(String name) {
-            for (NamedGroupDictionaryListener listener : this) {
-                listener.groupAdded(name);
-            }
-        }
-
-        @Override
-        public void groupUpdated(String name, Group previousGroup) {
-            for (NamedGroupDictionaryListener listener : this) {
-                listener.groupUpdated(name, previousGroup);
-            }
-        }
-
-        @Override
-        public void groupRemoved(String name, Group group) {
-            for (NamedGroupDictionaryListener listener : this) {
-                listener.groupRemoved(name, group);
-            }
-        }
-    }
-
     private Object buttonData = null;
     private DataRenderer dataRenderer = null;
     private Action action = null;
@@ -283,7 +138,7 @@
     };
 
     private State state = null;
-    private Group group = null;
+    private ButtonGroup buttonGroup = null;
 
     private boolean toggleButton = false;
     private boolean triState = false;
@@ -294,10 +149,6 @@
     private ButtonStateListenerList buttonStateListeners = new ButtonStateListenerList();
     private ButtonPressListenerList buttonPressListeners = new ButtonPressListenerList();
 
-    private static HashMap<String, Group> namedGroups = new HashMap<String, Group>();
-    private static NamedGroupDictionary namedGroupDictionary = new NamedGroupDictionary();
-    private static NamedGroupDictionaryListenerList namedGroupDictionaryListeners = new NamedGroupDictionaryListenerList();
-
     public Button() {
         this(null);
     }
@@ -464,15 +315,15 @@
         if (previousState != state) {
             this.state = state;
 
-            if (group != null) {
+            if (buttonGroup != null) {
                 // Update the group's selection
-                Button selection = group.getSelection();
+                Button selection = buttonGroup.getSelection();
 
                 if (state == State.SELECTED) {
                     // Set this as the new selection (do this before
                     // de-selecting any currently selected button so the
                     // group's change event isn't fired twice)
-                    group.setSelection(this);
+                    buttonGroup.setSelection(this);
 
                     // De-select any previously selected button
                     if (selection != null) {
@@ -483,7 +334,7 @@
                     // If this button is currently selected, clear the
                     // selection
                     if (selection == this) {
-                        group.setSelection(null);
+                        buttonGroup.setSelection(null);
                     }
                 }
             }
@@ -518,7 +369,7 @@
             // group, and can't be tri-state
             if (!toggleButton) {
                 setSelected(false);
-                setGroup((Group)null);
+                setButtonGroup(null);
                 setTriState(false);
             }
 
@@ -546,7 +397,7 @@
         }
 
         if (triState
-            && group != null) {
+            && buttonGroup != null) {
             throw new IllegalStateException("Toggle button is a member of a group.");
         }
 
@@ -557,56 +408,48 @@
     }
 
     /**
-     * Returns the button's group.
+     * Returns the button's button group.
+     *
+     * @return
+     * The group to which the button belongs, or <tt>null</tt> if the button
+     * does not belong to a group.
      */
-    public Group getGroup() {
-        return group;
+    public ButtonGroup getButtonGroup() {
+        return buttonGroup;
     }
 
     /**
-     * Sets the button's group.
+     * Sets the button's button group.
      *
-     * @param group
+     * @param buttonGroup
+     * The group to which the button will belong, or <tt>null</tt> if the button
+     * will not belong to a group.
      */
-    public void setGroup(Group group) {
+    public void setButtonGroup(ButtonGroup buttonGroup) {
         if (!toggleButton) {
             throw new IllegalStateException("Button is not in toggle mode.");
         }
 
-        if (group != null
+        if (buttonGroup != null
             && triState) {
             throw new IllegalStateException("Toggle button is tri-state.");
         }
 
-        Group previousGroup = this.group;
+        ButtonGroup previousButtonGroup = this.buttonGroup;
 
-        if (previousGroup != group) {
-            this.group = group;
+        if (previousButtonGroup != buttonGroup) {
+            this.buttonGroup = buttonGroup;
 
-            if (isSelected()) {
-                if (previousGroup != null) {
-                    previousGroup.setSelection(null);
-                }
-
-                if (group != null) {
-                    group.setSelection(this);
-                }
+            if (previousButtonGroup != null) {
+                previousButtonGroup.remove(this);
             }
 
-            buttonListeners.groupChanged(this, previousGroup);
-        }
-    }
-
-    public void setGroup(String group) {
-        if (group == null) {
-            throw new IllegalArgumentException("group is null.");
-        }
+            if (buttonGroup != null) {
+                buttonGroup.add(this);
+            }
 
-        if (!namedGroups.containsKey(group)) {
-            namedGroups.put(group, new Group());
+            buttonListeners.buttonGroupChanged(this, previousButtonGroup);
         }
-
-        setGroup(namedGroups.get(group));
     }
 
     public String getSelectedKey() {
@@ -681,12 +524,4 @@
     public ListenerList<ButtonPressListener> getButtonPressListeners() {
         return buttonPressListeners;
     }
-
-    public static NamedGroupDictionary getNamedGroups() {
-        return namedGroupDictionary;
-    }
-
-    public static ListenerList<NamedGroupDictionaryListener> getNamedGroupDictionaryListeners() {
-        return namedGroupDictionaryListeners;
-    }
 }

Added: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java?rev=819290&view=auto
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java (added)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroup.java Sun Sep 27 12:02:41 2009
@@ -0,0 +1,136 @@
+/*
+ * 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.
+ */
+package org.apache.pivot.wtk;
+
+import java.util.Iterator;
+
+import org.apache.pivot.collections.Group;
+import org.apache.pivot.collections.HashSet;
+import org.apache.pivot.util.ImmutableIterator;
+import org.apache.pivot.util.ListenerList;
+
+/**
+ * Class representing a toggle button group.
+ */
+public class ButtonGroup implements Group<Button>, Iterable<Button> {
+    private static class ButtonGroupListenerList extends ListenerList<ButtonGroupListener>
+        implements ButtonGroupListener {
+        public void buttonAdded(ButtonGroup buttonGroup, Button button) {
+            for (ButtonGroupListener listener : this) {
+                listener.buttonAdded(buttonGroup, button);
+            }
+        }
+
+        public void buttonRemoved(ButtonGroup buttonGroup, Button button) {
+            for (ButtonGroupListener listener : this) {
+                listener.buttonRemoved(buttonGroup, button);
+            }
+        }
+
+        public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
+            for (ButtonGroupListener listener : this) {
+                listener.selectionChanged(buttonGroup, previousSelection);
+            }
+        }
+    }
+
+    private HashSet<Button> buttons = new HashSet<Button>();
+    private Button selection = null;
+
+    private ButtonGroupListenerList buttonGroupListeners = new ButtonGroupListenerList();
+
+    @Override
+    public boolean add(Button button) {
+        boolean added = false;
+
+        if (!contains(button)) {
+            buttons.add(button);
+            added = true;
+
+            if (button.isSelected()) {
+                if (selection == null) {
+                    selection = button;
+                } else {
+                    button.setSelected(false);
+                }
+            }
+
+            button.setButtonGroup(this);
+
+            buttonGroupListeners.buttonAdded(this, button);
+        }
+
+        return added;
+    }
+
+    @Override
+    public boolean remove(Button button) {
+        boolean removed = false;
+
+        if (contains(button)) {
+            buttons.remove(button);
+            removed = true;
+
+            if (button.isSelected()) {
+                selection = null;
+            }
+
+            button.setButtonGroup(null);
+
+            buttonGroupListeners.buttonRemoved(this, button);
+        }
+
+        return removed;
+    }
+
+    @Override
+    public boolean contains(Button button) {
+        return buttons.contains(button);
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return buttons.isEmpty();
+    }
+
+    public Button getSelection() {
+        return selection;
+    }
+
+    public void setSelection(Button selection) {
+        if (!contains(selection)) {
+            throw new IllegalArgumentException();
+        }
+
+        Button previousSelection = this.selection;
+        if (previousSelection != selection) {
+            this.selection = selection;
+            selection.setSelected(true);
+
+            buttonGroupListeners.selectionChanged(this, previousSelection);
+        }
+    }
+
+    @Override
+    public Iterator<Button> iterator() {
+        return new ImmutableIterator<Button>(buttons.iterator());
+    }
+
+    public ListenerList<ButtonGroupListener> getButtonGroupListeners() {
+        return buttonGroupListeners;
+    }
+}

Added: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroupListener.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroupListener.java?rev=819290&view=auto
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroupListener.java (added)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonGroupListener.java Sun Sep 27 12:02:41 2009
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.apache.pivot.wtk;
+
+/**
+ * Button group listener interface.
+ */
+public interface ButtonGroupListener {
+    /**
+     * Button group listener adapter.
+     */
+    public class Adapter implements ButtonGroupListener {
+        public void buttonAdded(ButtonGroup buttonGroup, Button button) {
+        }
+
+        public void buttonRemoved(ButtonGroup buttonGroup, Button button) {
+        }
+
+        public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
+        }
+    }
+
+    /**
+     * Called when a button has been added to a button group.
+     *
+     * @param buttonGroup
+     * @param button
+     */
+    public void buttonAdded(ButtonGroup buttonGroup, Button button);
+
+    /**
+     * Called when a button has been removed from a button group.
+     *
+     * @param buttonGroup
+     * @param button
+     */
+    public void buttonRemoved(ButtonGroup buttonGroup, Button button);
+
+    /**
+     * Called when a button group's selection has changed.
+     *
+     * @param buttonGroup
+     * @param previousSelection
+     */
+    public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection);
+}

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonListener.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonListener.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonListener.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ButtonListener.java Sun Sep 27 12:02:41 2009
@@ -45,7 +45,7 @@
         }
 
         @Override
-        public void groupChanged(Button button, Button.Group previousGroup) {
+        public void buttonGroupChanged(Button button, ButtonGroup previousButtonGroup) {
         }
 
         @Override
@@ -96,12 +96,12 @@
     public void triStateChanged(Button button);
 
     /**
-     * Called when a button's group has changed.
+     * Called when a button's button group has changed.
      *
      * @param button
-     * @param previousGroup
+     * @param previousButtonGroup
      */
-    public void groupChanged(Button button, Button.Group previousGroup);
+    public void buttonGroupChanged(Button button, ButtonGroup previousButtonGroup);
 
     /**
      * Called when a button's selected key has changed.

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Checkbox.java Sun Sep 27 12:02:41 2009
@@ -64,7 +64,7 @@
     }
 
     @Override
-    public void setGroup(Group group) {
+    public void setButtonGroup(ButtonGroup buttonGroup) {
         throw new UnsupportedOperationException("Checkboxes can't be added to a group.");
     }
 }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Menu.java Sun Sep 27 12:02:41 2009
@@ -208,7 +208,7 @@
         @Override
         public void press() {
             if (isToggleButton()) {
-                setSelected(getGroup() == null ? !isSelected() : true);
+                setSelected(getButtonGroup() == null ? !isSelected() : true);
             }
 
             super.press();

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/PushButton.java Sun Sep 27 12:02:41 2009
@@ -50,7 +50,7 @@
         if (isToggleButton()) {
             State state = getState();
 
-            if (getGroup() == null) {
+            if (getButtonGroup() == null) {
                 if (state == State.SELECTED) {
                     setState(State.UNSELECTED);
                 }

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/RadioButton.java Sun Sep 27 12:02:41 2009
@@ -32,19 +32,19 @@
         this(null, null);
     }
 
-    public RadioButton(Group group) {
-        this(group, null);
+    public RadioButton(ButtonGroup buttonGroup) {
+        this(buttonGroup, null);
     }
 
     public RadioButton(Object buttonData) {
         this(null, buttonData);
     }
 
-    public RadioButton(Group group, Object buttonData) {
+    public RadioButton(ButtonGroup buttonGroup, Object buttonData) {
         super(buttonData);
         super.setToggleButton(true);
 
-        setGroup(group);
+        setButtonGroup(buttonGroup);
         setDataRenderer(DEFAULT_DATA_RENDERER);
 
         installThemeSkin(RadioButton.class);

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ButtonSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ButtonSkin.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ButtonSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ButtonSkin.java Sun Sep 27 12:02:41 2009
@@ -18,6 +18,7 @@
 
 import org.apache.pivot.wtk.Action;
 import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.ButtonGroup;
 import org.apache.pivot.wtk.ButtonListener;
 import org.apache.pivot.wtk.ButtonPressListener;
 import org.apache.pivot.wtk.ButtonStateListener;
@@ -108,7 +109,7 @@
     }
 
     @Override
-    public void groupChanged(Button button, Button.Group previousGroup) {
+    public void buttonGroupChanged(Button button, ButtonGroup previousButtonGroup) {
         // No-op
     }
 

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java Sun Sep 27 12:02:41 2009
@@ -30,6 +30,8 @@
 import org.apache.pivot.wtk.AccordionListener;
 import org.apache.pivot.wtk.AccordionSelectionListener;
 import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.ButtonGroup;
+import org.apache.pivot.wtk.ButtonGroupListener;
 import org.apache.pivot.wtk.Component;
 import org.apache.pivot.wtk.ComponentStateListener;
 import org.apache.pivot.wtk.Dimensions;
@@ -39,7 +41,6 @@
 import org.apache.pivot.wtk.Keyboard;
 import org.apache.pivot.wtk.Mouse;
 import org.apache.pivot.wtk.Theme;
-import org.apache.pivot.wtk.Button.Group;
 import org.apache.pivot.wtk.content.ButtonData;
 import org.apache.pivot.wtk.content.ButtonDataRenderer;
 import org.apache.pivot.wtk.effects.ClipDecorator;
@@ -232,7 +233,7 @@
         }
     }
 
-    private Button.Group panelHeaderGroup = new Button.Group();
+    private ButtonGroup panelHeaderGroup = new ButtonGroup();
     private ArrayList<PanelHeader> panelHeaders = new ArrayList<PanelHeader>();
 
     private Color borderColor;
@@ -294,9 +295,9 @@
         // Set the derived colors
         buttonBevelColor = TerraTheme.brighten(buttonBackgroundColor);
 
-        panelHeaderGroup.getGroupListeners().add(new Button.GroupListener() {
+        panelHeaderGroup.getButtonGroupListeners().add(new ButtonGroupListener.Adapter() {
             @Override
-            public void selectionChanged(Group group, Button previousSelection) {
+            public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
                 Button button = panelHeaderGroup.getSelection();
                 int index = (button == null) ? -1 : panelHeaders.indexOf((PanelHeader)button);
 
@@ -329,7 +330,7 @@
         // Add headers for all existing panels
         for (Component panel : accordion.getPanels()) {
             PanelHeader panelHeader = new PanelHeader(panel);
-            panelHeader.setGroup(panelHeaderGroup);
+            panelHeader.setButtonGroup(panelHeaderGroup);
             panelHeaders.add(panelHeader);
             accordion.add(panelHeader);
 
@@ -752,7 +753,7 @@
         // Add a header for the panel
         Component panel = accordion.getPanels().get(index);
         PanelHeader panelHeader = new PanelHeader(panel);
-        panelHeader.setGroup(panelHeaderGroup);
+        panelHeader.setButtonGroup(panelHeaderGroup);
         panelHeaders.insert(panelHeader, index);
         accordion.add(panelHeader);
 
@@ -779,7 +780,7 @@
 
         for (int i = 0, n = removedHeaders.getLength(); i < n; i++) {
             PanelHeader panelHeader = removedHeaders.get(i);
-            panelHeader.setGroup((Group)null);
+            panelHeader.setButtonGroup(null);
 
             // Stop listening for state changes on the panel
             Component panel = (Component)panelHeader.getButtonData();

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java Sun Sep 27 12:02:41 2009
@@ -28,6 +28,8 @@
 import org.apache.pivot.util.Filter;
 import org.apache.pivot.wtk.Bounds;
 import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.ButtonGroup;
+import org.apache.pivot.wtk.ButtonGroupListener;
 import org.apache.pivot.wtk.Calendar;
 import org.apache.pivot.wtk.CalendarListener;
 import org.apache.pivot.wtk.CalendarSelectionListener;
@@ -46,7 +48,6 @@
 import org.apache.pivot.wtk.SpinnerSelectionListener;
 import org.apache.pivot.wtk.TablePane;
 import org.apache.pivot.wtk.Theme;
-import org.apache.pivot.wtk.Button.Group;
 import org.apache.pivot.wtk.content.ButtonDataRenderer;
 import org.apache.pivot.wtk.content.NumericSpinnerData;
 import org.apache.pivot.wtk.content.SpinnerItemRenderer;
@@ -360,7 +361,7 @@
     private Spinner yearSpinner;
 
     private DateButton[][] dateButtons = new DateButton[6][7];
-    private Button.Group dateButtonGroup;
+    private ButtonGroup dateButtonGroup;
 
     private Button.DataRenderer dateButtonDataRenderer = new DateButtonDataRenderer();
 
@@ -468,13 +469,13 @@
         calendarTablePane.getRows().add(calendarRow);
 
         // Add the buttons
-        dateButtonGroup = new Button.Group();
-        dateButtonGroup.getGroupListeners().add(new Button.GroupListener() {
+        dateButtonGroup = new ButtonGroup();
+        dateButtonGroup.getButtonGroupListeners().add(new ButtonGroupListener.Adapter() {
             @Override
-            public void selectionChanged(Group group, Button previousSelection) {
+            public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
                 Calendar calendar = (Calendar)getComponent();
 
-                Button selection = group.getSelection();
+                Button selection = buttonGroup.getSelection();
                 if (selection == null) {
                     CalendarDate selectedDate = calendar.getSelectedDate();
 
@@ -498,7 +499,7 @@
             for (int i = 0; i < 7; i++) {
                 DateButton dateButton = new DateButton();
                 dateButtons[j][i] = dateButton;
-                dateButton.setGroup(dateButtonGroup);
+                dateButton.setButtonGroup(dateButtonGroup);
 
                 calendarRow.add(dateButton);
             }

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=819290&r1=819289&r2=819290&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 Sun Sep 27 12:02:41 2009
@@ -27,6 +27,8 @@
 import org.apache.pivot.wtk.ApplicationContext;
 import org.apache.pivot.wtk.Bounds;
 import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.ButtonGroup;
+import org.apache.pivot.wtk.ButtonGroupListener;
 import org.apache.pivot.wtk.Component;
 import org.apache.pivot.wtk.ComponentStateListener;
 import org.apache.pivot.wtk.Dimensions;
@@ -44,7 +46,6 @@
 import org.apache.pivot.wtk.TabPaneSelectionListener;
 import org.apache.pivot.wtk.Theme;
 import org.apache.pivot.wtk.VerticalAlignment;
-import org.apache.pivot.wtk.Button.Group;
 import org.apache.pivot.wtk.content.ButtonData;
 import org.apache.pivot.wtk.content.ButtonDataRenderer;
 import org.apache.pivot.wtk.effects.Transition;
@@ -55,7 +56,6 @@
 import org.apache.pivot.wtk.skin.ButtonSkin;
 import org.apache.pivot.wtk.skin.ContainerSkin;
 
-
 /**
  * Tab pane skin.
  */
@@ -332,7 +332,7 @@
 
     protected Panorama buttonPanorama = new Panorama();
     protected BoxPane buttonBoxPane = new BoxPane();
-    private Button.Group tabButtonGroup = new Button.Group();
+    private ButtonGroup tabButtonGroup = new ButtonGroup();
 
     private Color activeTabColor;
     private Color inactiveTabColor;
@@ -394,9 +394,9 @@
         buttonPanorama.getStyles().put("buttonPadding", 6);
         buttonPanorama.setView(buttonBoxPane);
 
-        tabButtonGroup.getGroupListeners().add(new Button.GroupListener() {
+        tabButtonGroup.getButtonGroupListeners().add(new ButtonGroupListener.Adapter() {
             @Override
-            public void selectionChanged(Group group, Button previousSelection) {
+            public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
                 Button button = tabButtonGroup.getSelection();
                 int index = (button == null) ? -1 : buttonBoxPane.indexOf(button);
 
@@ -430,7 +430,7 @@
             tab.setVisible(i == selectedIndex);
 
             TabButton tabButton = new TabButton(tab);
-            tabButton.setGroup(tabButtonGroup);
+            tabButton.setButtonGroup(tabButtonGroup);
             buttonBoxPane.add(tabButton);
 
             // Listen for state changes on the tab
@@ -1170,7 +1170,7 @@
 
         // Create a new button for the tab
         TabButton tabButton = new TabButton(tab);
-        tabButton.setGroup(tabButtonGroup);
+        tabButton.setButtonGroup(tabButtonGroup);
         buttonBoxPane.insert(tabButton, index);
 
         // Listen for state changes on the tab
@@ -1196,7 +1196,7 @@
 
         for (int i = 0, n = removed.getLength(); i < n; i++) {
             TabButton tabButton = (TabButton)removedButtons.get(i);
-            tabButton.setGroup((Group)null);
+            tabButton.setButtonGroup(null);
 
             // Stop listening for state changes on the tab
             Component tab = (Component)tabButton.getButtonData();

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java Sun Sep 27 12:02:41 2009
@@ -146,7 +146,14 @@
         componentSkinMap.put(TerraSplitPaneSkin.SplitterShadow.class, TerraSplitPaneSkin.SplitterShadowSkin.class);
         componentSkinMap.put(TerraTabPaneSkin.TabButton.class, TerraTabPaneSkin.TabButtonSkin.class);
 
-        String location = System.getProperty(LOCATION_PROPERTY);
+        String location = null;
+
+        try {
+            location = System.getProperty(LOCATION_PROPERTY);
+        } catch (SecurityException exception) {
+            // No-op
+        }
+
         if (location == null) {
             load(getClass().getResource("TerraTheme_default.json"));
         } else {

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=819290&r1=819289&r2=819290&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 Sun Sep 27 12:02:41 2009
@@ -20,6 +20,8 @@
 import org.apache.pivot.util.Vote;
 import org.apache.pivot.wtk.Application;
 import org.apache.pivot.wtk.Button;
+import org.apache.pivot.wtk.ButtonGroup;
+import org.apache.pivot.wtk.ButtonGroupListener;
 import org.apache.pivot.wtk.CardPane;
 import org.apache.pivot.wtk.CardPaneListener;
 import org.apache.pivot.wtk.DesktopApplicationContext;
@@ -33,7 +35,8 @@
     private Frame frame = null;
     private Sheet sheet = null;
 
-    private CardPane cardPane;
+    private CardPane cardPane = null;
+    private ButtonGroup sizeGroup = null;
 
     @Override
     public void startup(Display display, Map<String, String> properties)
@@ -47,11 +50,11 @@
         WTKXSerializer wtkxSerializer = new WTKXSerializer();
         sheet = (Sheet)wtkxSerializer.readObject(this, "card_pane_test.wtkx");
         cardPane = (CardPane)wtkxSerializer.get("cardPane");
+        sizeGroup = (ButtonGroup)wtkxSerializer.get("sizeGroup");
 
-        Button.Group sizeGroup = Button.getNamedGroups().get("sizeGroup");
-        sizeGroup.getGroupListeners().add(new Button.GroupListener() {
+        sizeGroup.getButtonGroupListeners().add(new ButtonGroupListener.Adapter() {
             @Override
-            public void selectionChanged(Button.Group buttonGroup, Button previousSelection) {
+            public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
                 final Button selection = buttonGroup.getSelection();
                 int selectedIndex = selection == null ? -1 : selection.getParent().indexOf(selection);
 

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/card_pane_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/card_pane_test.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/menu_bar_test.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/test/org/apache/pivot/wtk/test/menu_bar_test.wtkx?rev=819290&r1=819289&r2=819290&view=diff
==============================================================================
Binary files - no diff available.