Revision: 1346
Author:   mathiasbr
Date:     2006-08-30 00:56:33 -0700 (Wed, 30 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/spring-rich-c/?rev=1346&view=rev

Log Message:
-----------
support for radio buttons

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/ComponentFactory.java
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/DefaultComponentFactory.java
Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/ComponentFactory.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/ComponentFactory.java
  2006-08-30 07:46:46 UTC (rev 1345)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/ComponentFactory.java
  2006-08-30 07:56:33 UTC (rev 1346)
@@ -28,6 +28,7 @@
 import javax.swing.JMenuItem;
 import javax.swing.JPanel;
 import javax.swing.JPasswordField;
+import javax.swing.JRadioButton;
 import javax.swing.JTabbedPane;
 import javax.swing.JTable;
 import javax.swing.JTextArea;
@@ -284,6 +285,26 @@
     public JToggleButton createToggleButton(String[] labelKeys);
 
     /**
+     * Create a configured radio button.
+     * 
+     * @param labelKey
+     *            The label message code; may also be the label text if no
+     *            message source is configured.
+     * @return The radio button.
+     */
+    public JRadioButton createRadioButton(String labelKey);
+
+    /**
+     * Create a configured radio button.
+     * 
+     * @param labelKeys
+     *            The label message codes; may also be the label text if no
+     *            message source is configured.
+     * @return The radio button.
+     */
+    public JRadioButton createRadioButton(String[] labelKeys);
+
+    /**
      * Create a formatted text field using this component factory.
      * 
      * @param formatterFactory

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/DefaultComponentFactory.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/DefaultComponentFactory.java
   2006-08-30 07:46:46 UTC (rev 1345)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/DefaultComponentFactory.java
   2006-08-30 07:56:33 UTC (rev 1346)
@@ -35,6 +35,7 @@
 import javax.swing.JMenuItem;
 import javax.swing.JPanel;
 import javax.swing.JPasswordField;
+import javax.swing.JRadioButton;
 import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
 import javax.swing.JTable;
@@ -292,6 +293,21 @@
         return new JToggleButton();
     }
 
+    /* (non-Javadoc)
+     * @see 
org.springframework.richclient.factory.ComponentFactory#createRadioButton(java.lang.String)
+     */
+    public JRadioButton createRadioButton(String labelKey) {
+        return 
(JRadioButton)getButtonLabelInfo(getRequiredMessage(labelKey)).configure(createNewRadioButton());
+    }
+
+    protected JRadioButton createNewRadioButton() {
+        return new JRadioButton();
+    }
+
+    public JRadioButton createRadioButton(String[] labelKeys) {
+        return 
(JRadioButton)getButtonLabelInfo(getRequiredMessage(labelKeys)).configure(createNewRadioButton());
+    }
+
     public JMenuItem createMenuItem(String labelKey) {
         return 
(JMenuItem)getButtonLabelInfo(getRequiredMessage(labelKey)).configure(getMenuFactory().createMenuItem());
     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
spring-rich-c-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to