[jsword-svn] r1408 - trunk/common-swing/src/main/java/org/crosswire/common/swing
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Fri Jun 15 14:55:21 MST 2007
Author: dmsmith
Date: 2007-06-15 14:55:21 -0700 (Fri, 15 Jun 2007)
New Revision: 1408
Modified:
trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java
Log:
QA changes (checkstyle, findbugs, pmd, ...)
Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java 2007-06-15 21:53:56 UTC (rev 1407)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/ActionFactory.java 2007-06-15 21:55:21 UTC (rev 1408)
@@ -174,20 +174,14 @@
Action action = getAction(key);
JLabel label = new JLabel();
- if (action != null)
+ label.setText(action.getValue(Action.NAME).toString());
+
+ // Mac's don't have mnemonics
+ Integer mnemonic = (Integer) action.getValue(Action.MNEMONIC_KEY);
+ if (mnemonic != null && !OSType.MAC.equals(OSType.getOSType()))
{
- label.setText(action.getValue(Action.NAME).toString());
- // Mac's don't have mnemonics
- Integer mnemonic = (Integer) action.getValue(Action.MNEMONIC_KEY);
- if (mnemonic != null && !OSType.MAC.equals(OSType.getOSType()))
- {
- label.setDisplayedMnemonic(mnemonic.intValue());
- }
+ label.setDisplayedMnemonic(mnemonic.intValue());
}
- else
- {
- label.setText(key);
- }
return label;
}
More information about the jsword-svn
mailing list