This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: AbstractButton subclasses - tests for model and UI delegate initialisation


This patch (committed) adds tests to check the initialisation of the model and UI delegates in the AbstractButton subclasses:

2006-09-19 David Gilbert <david.gilbert@object-refinery.com>

	* gnu/testlet/javax/swing/JButton/model.java: New test,
	* gnu/testlet/javax/swing/JButton/uidelegate.java: Likewise,
	* gnu/testlet/javax/swing/JCheckBox/model.java: Likewise,
	* gnu/testlet/javax/swing/JCheckBox/uidelegate.java: Likewise,
	* gnu/testlet/javax/swing/JCheckBoxMenuItem/model.java: Likewise,
	* gnu/testlet/javax/swing/JCheckBoxMenuItem/uidelegate.java: Likewise,
	* gnu/testlet/javax/swing/JMenu/model.java: Likewise,
	* gnu/testlet/javax/swing/JMenu/uidelegate.java: Likewise,
	* gnu/testlet/javax/swing/JMenuItem/model.java: Likewise,
	* gnu/testlet/javax/swing/JMenuItem/uidelegate.java: Likewise,
	* gnu/testlet/javax/swing/JRadioButton/model.java: Likewise,
	* gnu/testlet/javax/swing/JRadioButton/uidelegate.java: Likewise,
	* gnu/testlet/javax/swing/JRadioButtonMenuItem/model.java: Likewise,
	* gnu/testlet/javax/swing/JRadioButtonMenuItem/uidelegate.java:
	Likewise,
	* gnu/testlet/javax/swing/JToggleButton/model.java: Likewise,
	* gnu/testlet/javax/swing/JToggleButton/uidelegate.java: Likewise.

I put these together while investigating a bug in GNU Classpath that shows up when running Swing apps with the LiquidLookAndFeel.

Regards,

Dave
Index: gnu/testlet/javax/swing/JButton/model.java
===================================================================
RCS file: gnu/testlet/javax/swing/JButton/model.java
diff -N gnu/testlet/javax/swing/JButton/model.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JButton/model.java	19 Sep 2006 15:07:28 -0000
@@ -0,0 +1,126 @@
+/* model.java -- some checks for the initialisation of the button's model.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JButton;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.DefaultButtonModel;
+import javax.swing.Icon;
+import javax.swing.JButton;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the button's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class model implements Testlet {
+
+  static class MyJButton extends JButton
+  {
+    public MyJButton()
+    {
+      super();
+    }
+    public MyJButton(Action action)
+    {
+      super(action);
+    }
+    public MyJButton(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJButton(String text)
+    {
+      super(text);
+    }
+    public MyJButton(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      // don't call super.init(), because we want to check what happens in
+      // the constructor only...
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJButton b = new MyJButton();
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJButton b = new MyJButton(action);
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJButton b = new MyJButton(MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJButton b = new MyJButton("ABC");
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJButton b = new MyJButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+
+}
Index: gnu/testlet/javax/swing/JButton/uidelegate.java
===================================================================
RCS file: gnu/testlet/javax/swing/JButton/uidelegate.java
diff -N gnu/testlet/javax/swing/JButton/uidelegate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JButton/uidelegate.java	19 Sep 2006 15:07:28 -0000
@@ -0,0 +1,134 @@
+/* model.java -- some checks for the initialisation of the button's UI delegate.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JButton;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.DefaultButtonModel;
+import javax.swing.Icon;
+import javax.swing.JButton;
+import javax.swing.plaf.ButtonUI;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the UI delegate's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class uidelegate implements Testlet {
+
+  static class MyJButton extends JButton
+  {
+    public boolean initCalled;
+    public boolean updateUICalledAfterInitCalled;
+    public MyJButton()
+    {
+      super();
+    }
+    public MyJButton(Action action)
+    {
+      super(action);
+    }
+    public MyJButton(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJButton(String text)
+    {
+      super(text);
+    }
+    public MyJButton(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      initCalled = true;
+      super.init(text, icon);
+    }
+    public void updateUI()
+    {
+      updateUICalledAfterInitCalled = initCalled;
+      super.updateUI();
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJButton b = new MyJButton();
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJButton b = new MyJButton(action);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJButton b = new MyJButton(MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJButton b = new MyJButton("ABC");
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJButton b = new MyJButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+}
Index: gnu/testlet/javax/swing/JCheckBox/model.java
===================================================================
RCS file: gnu/testlet/javax/swing/JCheckBox/model.java
diff -N gnu/testlet/javax/swing/JCheckBox/model.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JCheckBox/model.java	19 Sep 2006 15:07:28 -0000
@@ -0,0 +1,164 @@
+/* model.java -- some checks for the initialisation of the button's model.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JCheckBox;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JCheckBox;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the menu's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class model implements Testlet {
+
+  static class MyJCheckBox extends JCheckBox
+  {
+    public MyJCheckBox()
+    {
+      super();
+    }
+    public MyJCheckBox(Action action)
+    {
+      super(action);
+    }
+    public MyJCheckBox(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJCheckBox(Icon icon, boolean selected)
+    {
+      super(icon, selected);
+    }
+    public MyJCheckBox(String text)
+    {
+      super(text);
+    }
+    public MyJCheckBox(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJCheckBox(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJCheckBox(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      // don't call super.init(), because we want to check what happens in
+      // the constructor only...
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+    testConstructor8(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJCheckBox b = new MyJCheckBox();
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJCheckBox b = new MyJCheckBox(action);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJCheckBox b = new MyJCheckBox(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(Icon, boolean)");
+    MyJCheckBox b = new MyJCheckBox(
+            MetalIconFactory.getFileChooserListViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJCheckBox b = new MyJCheckBox("ABC");
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJCheckBox b = new MyJCheckBox("ABC", false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJCheckBox b = new MyJCheckBox("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor8(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJCheckBox b = new MyJCheckBox("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JCheckBox/uidelegate.java
===================================================================
RCS file: gnu/testlet/javax/swing/JCheckBox/uidelegate.java
diff -N gnu/testlet/javax/swing/JCheckBox/uidelegate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JCheckBox/uidelegate.java	19 Sep 2006 15:07:28 -0000
@@ -0,0 +1,170 @@
+/* uidelegate.java -- some checks for the initialisation of the button's UI
+       delegate.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JCheckBox;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JCheckBox;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the button's UI delegate.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class uidelegate implements Testlet {
+
+  static class MyJCheckBox extends JCheckBox
+  {
+    public boolean initCalled;
+    public boolean updateUICalledAfterInitCalled;
+    public MyJCheckBox()
+    {
+      super();
+    }
+    public MyJCheckBox(Action action)
+    {
+      super(action);
+    }
+    public MyJCheckBox(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJCheckBox(Icon icon, boolean selected)
+    {
+      super(icon, selected);
+    }
+    public MyJCheckBox(String text)
+    {
+      super(text);
+    }
+    public MyJCheckBox(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJCheckBox(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJCheckBox(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    public void init(String text, Icon icon)
+    {
+      initCalled = true;
+      super.init(text, icon);
+    }
+    public void updateUI()
+    {
+      updateUICalledAfterInitCalled = initCalled;
+      super.updateUI();
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+    testConstructor8(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJCheckBox b = new MyJCheckBox();
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJCheckBox b = new MyJCheckBox(action);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJCheckBox b = new MyJCheckBox(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(Icon, boolean)");
+    MyJCheckBox b = new MyJCheckBox(
+            MetalIconFactory.getFileChooserListViewIcon(), false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJCheckBox b = new MyJCheckBox("ABC");
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJCheckBox b = new MyJCheckBox("ABC", false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJCheckBox b = new MyJCheckBox("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor8(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJCheckBox b = new MyJCheckBox("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JCheckBoxMenuItem/model.java
===================================================================
RCS file: gnu/testlet/javax/swing/JCheckBoxMenuItem/model.java
diff -N gnu/testlet/javax/swing/JCheckBoxMenuItem/model.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JCheckBoxMenuItem/model.java	19 Sep 2006 15:07:28 -0000
@@ -0,0 +1,151 @@
+/* model.java -- some checks for the initialisation of the menu item's model.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JCheckBoxMenuItem;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the button's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class model implements Testlet {
+
+  static class MyJCheckBoxMenuItem extends JCheckBoxMenuItem
+  {
+    public MyJCheckBoxMenuItem()
+    {
+      super();
+    }
+    public MyJCheckBoxMenuItem(Action action)
+    {
+      super(action);
+    }
+    public MyJCheckBoxMenuItem(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJCheckBoxMenuItem(String text)
+    {
+      super(text);
+    }
+    public MyJCheckBoxMenuItem(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJCheckBoxMenuItem(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJCheckBoxMenuItem(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      // don't call super.init(), because we want to check what happens in
+      // the constructor only...
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem();
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem(action);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC");
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC", false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JCheckBoxMenuItem/uidelegate.java
===================================================================
RCS file: gnu/testlet/javax/swing/JCheckBoxMenuItem/uidelegate.java
diff -N gnu/testlet/javax/swing/JCheckBoxMenuItem/uidelegate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JCheckBoxMenuItem/uidelegate.java	19 Sep 2006 15:07:28 -0000
@@ -0,0 +1,159 @@
+/* uidelegate.java -- some checks for the initialisation of the menu item's 
+       UI delegate.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JCheckBoxMenuItem;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the menu item's UI delegate.  This test 
+ * was written to investigate a look and feel bug that occurs because the model
+ * is null when the UI delegate is initialised.
+ */
+public class uidelegate implements Testlet {
+
+  static class MyJCheckBoxMenuItem extends JCheckBoxMenuItem
+  {
+    public boolean initCalled;
+    public boolean updateUICalledAfterInitCalled;
+    public MyJCheckBoxMenuItem()
+    {
+      super();
+    }
+    public MyJCheckBoxMenuItem(Action action)
+    {
+      super(action);
+    }
+    public MyJCheckBoxMenuItem(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJCheckBoxMenuItem(String text)
+    {
+      super(text);
+    }
+    public MyJCheckBoxMenuItem(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJCheckBoxMenuItem(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJCheckBoxMenuItem(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      initCalled = true;
+      super.init(text, icon);
+    }
+    public void updateUI()
+    {
+      updateUICalledAfterInitCalled = initCalled;
+      super.updateUI();
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem();
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem(action);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC");
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC", false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJCheckBoxMenuItem b = new MyJCheckBoxMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JMenu/model.java
===================================================================
RCS file: gnu/testlet/javax/swing/JMenu/model.java
diff -N gnu/testlet/javax/swing/JMenu/model.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JMenu/model.java	19 Sep 2006 15:07:29 -0000
@@ -0,0 +1,112 @@
+/* model.java -- some checks for the initialisation of the menu's model.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JMenu;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.DefaultButtonModel;
+import javax.swing.Icon;
+import javax.swing.JMenu;
+
+/**
+ * This test looks at the creation of the menu's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class model implements Testlet {
+
+  static class MyJMenu extends JMenu
+  {
+    public MyJMenu()
+    {
+      super();
+    }
+    public MyJMenu(Action action)
+    {
+      super(action);
+    }
+    public MyJMenu(String text)
+    {
+      super(text);
+    }
+    public MyJMenu(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      // don't call super.init(), because we want to check what happens in
+      // the constructor only...
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJMenu b = new MyJMenu();
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJMenu b = new MyJMenu(action);
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJMenu b = new MyJMenu("ABC");
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJMenu b = new MyJMenu("ABC", false);
+    harness.check(b.getModel().getClass(), DefaultButtonModel.class);
+  }
+
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JMenu/uidelegate.java
===================================================================
RCS file: gnu/testlet/javax/swing/JMenu/uidelegate.java
diff -N gnu/testlet/javax/swing/JMenu/uidelegate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JMenu/uidelegate.java	19 Sep 2006 15:07:29 -0000
@@ -0,0 +1,119 @@
+/* uidelegate.java -- some checks for the initialisation of the menu's UI
+       delegate.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JMenu;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JMenu;
+
+/**
+ * This test looks at the creation of the menu's UI delegate.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class uidelegate implements Testlet {
+
+  static class MyJMenu extends JMenu
+  {
+    public boolean initCalled;
+    public boolean updateUICalledAfterInitCalled;
+    public MyJMenu()
+    {
+      super();
+    }
+    public MyJMenu(Action action)
+    {
+      super(action);
+    }
+    public MyJMenu(String text)
+    {
+      super(text);
+    }
+    public MyJMenu(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      initCalled = true;
+      super.init(text, icon);
+    }
+    public void updateUI()
+    {
+      updateUICalledAfterInitCalled = initCalled;
+      super.updateUI();
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJMenu b = new MyJMenu();
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJMenu b = new MyJMenu(action);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJMenu b = new MyJMenu("ABC");
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJMenu b = new MyJMenu("ABC", false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JRadioButton/model.java
===================================================================
RCS file: gnu/testlet/javax/swing/JRadioButton/model.java
diff -N gnu/testlet/javax/swing/JRadioButton/model.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JRadioButton/model.java	19 Sep 2006 15:07:29 -0000
@@ -0,0 +1,164 @@
+/* model.java -- some checks for the initialisation of the button's model.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JRadioButton;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JRadioButton;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the button's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class model implements Testlet {
+
+  static class MyJRadioButton extends JRadioButton
+  {
+    public MyJRadioButton()
+    {
+      super();
+    }
+    public MyJRadioButton(Action action)
+    {
+      super(action);
+    }
+    public MyJRadioButton(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJRadioButton(Icon icon, boolean selected)
+    {
+      super(icon, selected);
+    }
+    public MyJRadioButton(String text)
+    {
+      super(text);
+    }
+    public MyJRadioButton(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJRadioButton(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJRadioButton(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      // don't call super.init(), because we want to check what happens in
+      // the constructor only...
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+    testConstructor8(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJRadioButton b = new MyJRadioButton();
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJRadioButton b = new MyJRadioButton(action);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJRadioButton b = new MyJRadioButton(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(Icon, boolean)");
+    MyJRadioButton b = new MyJRadioButton(
+            MetalIconFactory.getFileChooserListViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJRadioButton b = new MyJRadioButton("ABC");
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJRadioButton b = new MyJRadioButton("ABC", false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJRadioButton b = new MyJRadioButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor8(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJRadioButton b = new MyJRadioButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JRadioButton/uidelegate.java
===================================================================
RCS file: gnu/testlet/javax/swing/JRadioButton/uidelegate.java
diff -N gnu/testlet/javax/swing/JRadioButton/uidelegate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JRadioButton/uidelegate.java	19 Sep 2006 15:07:30 -0000
@@ -0,0 +1,171 @@
+/* uidelegate.java -- some checks for the initialisation of the button's UI
+       delegate.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JRadioButton;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JRadioButton;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the button's UI delegate.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class uidelegate implements Testlet {
+
+  static class MyJRadioButton extends JRadioButton
+  {
+    public boolean initCalled;
+    public boolean updateUICalledAfterInitCalled;
+    public MyJRadioButton()
+    {
+      super();
+    }
+    public MyJRadioButton(Action action)
+    {
+      super(action);
+    }
+    public MyJRadioButton(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJRadioButton(Icon icon, boolean selected)
+    {
+      super(icon, selected);
+    }
+    public MyJRadioButton(String text)
+    {
+      super(text);
+    }
+    public MyJRadioButton(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJRadioButton(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJRadioButton(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    public void init(String text, Icon icon)
+    {
+      initCalled = true;
+      super.init(text, icon);
+    }
+    public void updateUI()
+    {
+      updateUICalledAfterInitCalled = initCalled;
+      super.updateUI();
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+    testConstructor8(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJRadioButton b = new MyJRadioButton();
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJRadioButton b = new MyJRadioButton(action);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJRadioButton b = new MyJRadioButton(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(Icon, boolean)");
+    MyJRadioButton b = new MyJRadioButton(
+            MetalIconFactory.getFileChooserListViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJRadioButton b = new MyJRadioButton("ABC");
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJRadioButton b = new MyJRadioButton("ABC", false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJRadioButton b = new MyJRadioButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor8(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJRadioButton b = new MyJRadioButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JRadioButtonMenuItem/model.java
===================================================================
RCS file: gnu/testlet/javax/swing/JRadioButtonMenuItem/model.java
diff -N gnu/testlet/javax/swing/JRadioButtonMenuItem/model.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JRadioButtonMenuItem/model.java	19 Sep 2006 15:07:30 -0000
@@ -0,0 +1,151 @@
+/* model.java -- some checks for the initialisation of the menu item's model.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JRadioButtonMenuItem;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the menu item's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class model implements Testlet {
+
+  static class MyJRadioButtonMenuItem extends JRadioButtonMenuItem
+  {
+    public MyJRadioButtonMenuItem()
+    {
+      super();
+    }
+    public MyJRadioButtonMenuItem(Action action)
+    {
+      super(action);
+    }
+    public MyJRadioButtonMenuItem(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJRadioButtonMenuItem(String text)
+    {
+      super(text);
+    }
+    public MyJRadioButtonMenuItem(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJRadioButtonMenuItem(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJRadioButtonMenuItem(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      // don't call super.init(), because we want to check what happens in
+      // the constructor only...
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem();
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem(action);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC");
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC", false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JRadioButtonMenuItem/uidelegate.java
===================================================================
RCS file: gnu/testlet/javax/swing/JRadioButtonMenuItem/uidelegate.java
diff -N gnu/testlet/javax/swing/JRadioButtonMenuItem/uidelegate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JRadioButtonMenuItem/uidelegate.java	19 Sep 2006 15:07:30 -0000
@@ -0,0 +1,157 @@
+/* uidelegate.java -- some checks for the initialisation of the menu item's 
+       UI delegate.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JRadioButtonMenuItem;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the menu item's UI delegate.  This test 
+ * was written to investigate a look and feel bug that occurs because the 
+ * model is null when the UI delegate is initialised.
+ */
+public class uidelegate implements Testlet {
+
+  static class MyJRadioButtonMenuItem extends JRadioButtonMenuItem
+  {
+    public boolean initCalled;
+    public boolean updateUICalledAfterInitCalled;
+    public MyJRadioButtonMenuItem()
+    {
+      super();
+    }
+    public MyJRadioButtonMenuItem(Action action)
+    {
+      super(action);
+    }
+    public MyJRadioButtonMenuItem(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJRadioButtonMenuItem(String text)
+    {
+      super(text);
+    }
+    public MyJRadioButtonMenuItem(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJRadioButtonMenuItem(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJRadioButtonMenuItem(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    public void init(String text, Icon icon)
+    {
+      initCalled = true;
+      super.init(text, icon);
+    }
+    public void updateUI()
+    {
+      updateUICalledAfterInitCalled = initCalled;
+      super.updateUI();
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem();
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem(action);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC");
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC", false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJRadioButtonMenuItem b = new MyJRadioButtonMenuItem("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JToggleButton/model.java
===================================================================
RCS file: gnu/testlet/javax/swing/JToggleButton/model.java
diff -N gnu/testlet/javax/swing/JToggleButton/model.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JToggleButton/model.java	19 Sep 2006 15:07:30 -0000
@@ -0,0 +1,164 @@
+/* model.java -- some checks for the initialisation of the button's model.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JToggleButton;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JToggleButton;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the menu's model.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class model implements Testlet {
+
+  static class MyJToggleButton extends JToggleButton
+  {
+    public MyJToggleButton()
+    {
+      super();
+    }
+    public MyJToggleButton(Action action)
+    {
+      super(action);
+    }
+    public MyJToggleButton(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJToggleButton(Icon icon, boolean selected)
+    {
+      super(icon, selected);
+    }
+    public MyJToggleButton(String text)
+    {
+      super(text);
+    }
+    public MyJToggleButton(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJToggleButton(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJToggleButton(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    
+    public void init(String text, Icon icon)
+    {
+      // don't call super.init(), because we want to check what happens in
+      // the constructor only...
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+    testConstructor8(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJToggleButton b = new MyJToggleButton();
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJToggleButton b = new MyJToggleButton(action);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJToggleButton b = new MyJToggleButton(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(Icon, boolean)");
+    MyJToggleButton b = new MyJToggleButton(
+            MetalIconFactory.getFileChooserListViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJToggleButton b = new MyJToggleButton("ABC");
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJToggleButton b = new MyJToggleButton("ABC", false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+  
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJToggleButton b = new MyJToggleButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+
+  public void testConstructor8(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJToggleButton b = new MyJToggleButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+}
\ No newline at end of file
Index: gnu/testlet/javax/swing/JToggleButton/uidelegate.java
===================================================================
RCS file: gnu/testlet/javax/swing/JToggleButton/uidelegate.java
diff -N gnu/testlet/javax/swing/JToggleButton/uidelegate.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JToggleButton/uidelegate.java	19 Sep 2006 15:07:31 -0000
@@ -0,0 +1,171 @@
+/* uidelegate.java -- some checks for the initialisation of the button's UI
+       delegate.
+   Copyright (C) 2006 David Gilbert <david.gilbert@object-refinery.com>
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.5
+
+package gnu.testlet.javax.swing.JToggleButton;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JToggleButton;
+import javax.swing.JToggleButton.ToggleButtonModel;
+import javax.swing.plaf.metal.MetalIconFactory;
+
+/**
+ * This test looks at the creation of the menu's UI delegate.  This test was
+ * written to investigate a look and feel bug that occurs because the model is
+ * null when the UI delegate is initialised.
+ */
+public class uidelegate implements Testlet {
+
+  static class MyJToggleButton extends JToggleButton
+  {
+    public boolean initCalled;
+    public boolean updateUICalledAfterInitCalled;
+    public MyJToggleButton()
+    {
+      super();
+    }
+    public MyJToggleButton(Action action)
+    {
+      super(action);
+    }
+    public MyJToggleButton(Icon icon)
+    {
+      super(icon);
+    }
+    public MyJToggleButton(Icon icon, boolean selected)
+    {
+      super(icon, selected);
+    }
+    public MyJToggleButton(String text)
+    {
+      super(text);
+    }
+    public MyJToggleButton(String text, boolean selected)
+    {
+      super(text, selected);
+    }
+    public MyJToggleButton(String text, Icon icon)
+    {
+      super(text, icon);
+    }
+    public MyJToggleButton(String text, Icon icon, boolean selected)
+    {
+      super(text, icon, selected);
+    }
+    public void init(String text, Icon icon)
+    {
+      initCalled = true;
+      super.init(text, icon);
+    }
+    public void updateUI()
+    {
+      updateUICalledAfterInitCalled = initCalled;
+      super.updateUI();
+    }
+  }
+  
+  public void test(TestHarness harness)
+  {
+    testConstructor1(harness);
+    testConstructor2(harness);
+    testConstructor3(harness);
+    testConstructor4(harness);
+    testConstructor5(harness);
+    testConstructor6(harness);
+    testConstructor7(harness);
+    testConstructor8(harness);
+  }
+
+  public void testConstructor1(TestHarness harness)
+  {
+    harness.checkPoint("()");
+    MyJToggleButton b = new MyJToggleButton();
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor2(TestHarness harness)
+  {
+    harness.checkPoint("(Action)");
+    Action action = new AbstractAction() {
+      public void actionPerformed(ActionEvent e) 
+      {
+        // do nothing
+      }
+    };
+    MyJToggleButton b = new MyJToggleButton(action);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor3(TestHarness harness)
+  {
+    harness.checkPoint("(Icon)");
+    MyJToggleButton b = new MyJToggleButton(
+            MetalIconFactory.getFileChooserListViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor4(TestHarness harness)
+  {
+    harness.checkPoint("(Icon, boolean)");
+    MyJToggleButton b = new MyJToggleButton(
+            MetalIconFactory.getFileChooserListViewIcon(), false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor5(TestHarness harness)
+  {
+    harness.checkPoint("(String)");
+    MyJToggleButton b = new MyJToggleButton("ABC");
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor6(TestHarness harness)
+  {
+    harness.checkPoint("(String, boolean)");
+    MyJToggleButton b = new MyJToggleButton("ABC", false);
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+  
+  public void testConstructor7(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon)");
+    MyJToggleButton b = new MyJToggleButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon());
+    harness.check(b.updateUICalledAfterInitCalled, true);
+  }
+
+  public void testConstructor8(TestHarness harness)
+  {
+    harness.checkPoint("(String, Icon, boolean)");
+    MyJToggleButton b = new MyJToggleButton("ABC", 
+            MetalIconFactory.getFileChooserDetailViewIcon(), false);
+    harness.check(b.getModel().getClass(), ToggleButtonModel.class);
+  }
+}
\ No newline at end of file

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]