Revision: 1316
Author: mathiasbr
Date: 2006-08-19 15:49:06 -0700 (Sat, 19 Aug 2006)
ViewCVS: http://svn.sourceforge.net/spring-rich-c/?rev=1316&view=rev
Log Message:
-----------
LabelInfo now supports configuring instances of AbstractButton to support
configuring label of JCheckBox and JToggleButton
Modified Paths:
--------------
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/LabelInfo.java
Modified:
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/LabelInfo.java
===================================================================
---
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/LabelInfo.java
2006-08-19 22:35:44 UTC (rev 1315)
+++
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/factory/LabelInfo.java
2006-08-19 22:49:06 UTC (rev 1316)
@@ -15,6 +15,7 @@
*/
package org.springframework.richclient.factory;
+import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
@@ -103,6 +104,17 @@
label.setLabelFor(component);
return label;
}
+
+ public AbstractButton configureLabelFor(AbstractButton button) {
+ Assert.notNull(button);
+ button.setText(text);
+ button.setMnemonic(getMnemonic());
+ int index = getMnemonicIndex();
+ if (index > 0) {
+ button.setDisplayedMnemonicIndex(index);
+ }
+ return button;
+ }
public String getText() {
return text;
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