summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavid Gilbert <david.gilbert@object-refinery.com>2006-02-28 22:25:29 +0000
committerDavid Gilbert <david.gilbert@object-refinery.com>2006-02-28 22:25:29 +0000
commitdf2013da5a955206377c892bfcb12faf5bf8317c (patch)
tree16ea13fef0eb296c68ffd32f98362440315feb1b /examples
parent272624d997057c9c6de8cd689192db22b61d34f6 (diff)
downloadclasspath-df2013da5a955206377c892bfcb12faf5bf8317c.tar.gz
2006-02-28 David Gilbert <david.gilbert@object-refinery.com>
* examples/gnu/classpath/examples/swing/Demo.java (mkMenuBar): Removed 'Toggles', 'Checkbox' and 'Radio' actions, connected 'Spinner' action to SpinnerDemo, (mkCheckbox): Removed, (mkRadio): Likewise, (mkSpinner): Likewise, (mkToggle): Likewise, (mkButtonBar): Removed 'Toggles', 'Checkbox' and 'Radio' actions, connected 'Spinner' action to SpinnerDemo.
Diffstat (limited to 'examples')
-rw-r--r--examples/gnu/classpath/examples/swing/Demo.java66
1 files changed, 3 insertions, 63 deletions
diff --git a/examples/gnu/classpath/examples/swing/Demo.java b/examples/gnu/classpath/examples/swing/Demo.java
index 977e364db..7cb722668 100644
--- a/examples/gnu/classpath/examples/swing/Demo.java
+++ b/examples/gnu/classpath/examples/swing/Demo.java
@@ -163,18 +163,6 @@ public class Demo
new PopUpAction("Buttons",
(new ButtonDemo("Button Demo")).createContent(),
examples);
-
- new PopUpAction("Toggles",
- mkToggle("cool and refreshing"),
- examples);
-
- new PopUpAction("Checkbox",
- mkCheckbox("ice cold"),
- examples);
-
- new PopUpAction("Radio",
- mkRadio("delicious"),
- examples);
new PopUpAction("Slider",
(new SliderDemo("Slider Demo")).createContent(),
@@ -214,8 +202,7 @@ public class Demo
examples);
new PopUpAction("Spinner",
- mkSpinner(),
- examples);
+ new SpinnerDemo("Spinner Demo").createContent(), examples);
new PopUpAction("TextField",
(new TextFieldDemo("TextField Demo")).createContent(),
@@ -733,26 +720,6 @@ public class Demo
SwingUtilities.invokeLater(new LaterMain());
}
- public static JCheckBox mkCheckbox(String label)
- {
- JCheckBox c = new JCheckBox(label);
- c.setFont(new Font("Luxi", Font.PLAIN, 14));
- return c;
- }
-
- public static JPanel mkRadio(String label)
- {
- JPanel p = new JPanel();
- JRadioButton c = new JRadioButton(label);
- JRadioButton d = new JRadioButton("not " + label);
- ButtonGroup bg = new ButtonGroup();
- bg.add(c);
- bg.add(d);
- p.add(c);
- p.add(d);
- return p;
- }
-
public static JList mkList(Object[] elts)
{
JList list = new JList(elts);
@@ -776,12 +743,6 @@ public class Demo
return box;
}
- public static JSpinner mkSpinner()
- {
- JSpinner spinner = new JSpinner();
- return spinner;
- }
-
public static JButton mkBigButton(String title)
{
JButton b = new JButton(title);
@@ -790,14 +751,6 @@ public class Demo
return b;
}
- public static JToggleButton mkToggle(String title)
- {
- JToggleButton b = new JToggleButton(title);
- b.setMargin(new Insets(5,5,5,5));
- b.setFont(new Font("Luxi", Font.PLAIN, 14));
- return b;
- }
-
public static JPanel mkPanel(JComponent[] inners)
{
JPanel p = new JPanel();
@@ -1009,18 +962,6 @@ public class Demo
new PopUpAction("Buttons",
(new ButtonDemo("Button Demo")).createContent(),
panel);
-
- new PopUpAction("Toggles",
- mkToggle("cool and refreshing"),
- panel);
-
- new PopUpAction("Checkbox",
- mkCheckbox("ice cold"),
- panel);
-
- new PopUpAction("Radio",
- mkRadio("delicious"),
- panel);
new PopUpAction("Slider",
(new SliderDemo("Slider Demo")).createContent(),
@@ -1060,9 +1001,8 @@ public class Demo
"indifferent"}),
panel);
- new PopUpAction("Spinner",
- mkSpinner(),
- panel);
+ new PopUpAction("Spinner",
+ new SpinnerDemo("Spinner Demo").createContent(), panel);
new PopUpAction("TextField",
(new TextFieldDemo("TextField Demo")).createContent(),