svn commit: r12848 - trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java
[email protected] 15 Jun 2007 17:56:06 -0000
Newsgroups
gmane.comp.lang.uml.argouml.cvs
Message-ID
<[email protected] >
Author: mvw
Date: 2007-06-15 10:56:06-0700
New Revision: 12848
Modified:
trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java
Log:
Get rid of this static initializer, that initializes a few other classes, etc.
Modified: trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java?view=diff&rev=12848&p1=trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java&p2=trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java&r1=12847&r2=12848
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java (original)
+++ trunk/src_new/org/argouml/uml/ui/foundation/core/UMLOperationConcurrencyRadioButtonPanel.java 2007-06-15 10:56:06-0700
@@ -39,22 +39,26 @@
public class UMLOperationConcurrencyRadioButtonPanel extends
UMLRadioButtonPanel {
- private static List<String[]> labelTextsAndActionCommands =
- new ArrayList<String[]>();
+ private static List<String[]> labelTextsAndActionCommands;
- static {
- labelTextsAndActionCommands.add(new String[] {
- Translator.localize("label.concurrency-sequential"),
- ActionSetOperationConcurrencyKind.SEQUENTIAL_COMMAND
- });
- labelTextsAndActionCommands.add(new String[] {
- Translator.localize("label.concurrency-guarded"),
- ActionSetOperationConcurrencyKind.GUARDED_COMMAND
- });
- labelTextsAndActionCommands.add(new String[] {
- Translator.localize("label.concurrency-concurrent"),
- ActionSetOperationConcurrencyKind.CONCURRENT_COMMAND
- });
+ private static List<String[]> getCommands() {
+ if (labelTextsAndActionCommands == null) {
+ labelTextsAndActionCommands =
+ new ArrayList<String[]>();
+ labelTextsAndActionCommands.add(new String[] {
+ Translator.localize("label.concurrency-sequential"),
+ ActionSetOperationConcurrencyKind.SEQUENTIAL_COMMAND
+ });
+ labelTextsAndActionCommands.add(new String[] {
+ Translator.localize("label.concurrency-guarded"),
+ ActionSetOperationConcurrencyKind.GUARDED_COMMAND
+ });
+ labelTextsAndActionCommands.add(new String[] {
+ Translator.localize("label.concurrency-concurrent"),
+ ActionSetOperationConcurrencyKind.CONCURRENT_COMMAND
+ });
+ }
+ return labelTextsAndActionCommands;
}
/**
@@ -65,7 +69,7 @@
*/
public UMLOperationConcurrencyRadioButtonPanel(String title,
boolean horizontal) {
- super(title, labelTextsAndActionCommands, "concurrency",
+ super(title, getCommands(), "concurrency",
ActionSetOperationConcurrencyKind.getInstance(), horizontal);
}