svn commit: r17005 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-03-30 16:36:09-0700
New Revision: 17005

Modified:
   trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java

Log:
Reduce some warnings in eclipse

Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java?view=diff&pathrev=17005&r1=17004&r2=17005
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java	(original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java	2009-03-30 16:36:09-0700
@@ -197,11 +197,6 @@
  */
 public class SwingUIFactory implements UIFactory {
     
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = Logger.getLogger(SwingUIFactory.class);
-    
     private static UIFactory instance = new SwingUIFactory();
     
     public SwingUIFactory() {
@@ -233,26 +228,19 @@
         for (XMLPropertyPanelsDataRecord prop : data.getProperties()) {        
             if ("text".equals(prop.getType())) {
                 buildTextboxPanel(panel, target, prop);
-            }
-            else if ("combo".equals(prop.getType())) {
+            } else if ("combo".equals(prop.getType())) {
                 buildComboPanel(panel, target, prop);                
-            }
-            else if ("checkgroup".equals(prop.getType())) {
+            } else if ("checkgroup".equals(prop.getType())) {
                 buildCheckGroup(panel, target, prop);
-            }
-            else if ("optionbox".equals(prop.getType())) {
+            } else if ("optionbox".equals(prop.getType())) {
                 buildOptionBox(panel, target, prop);
-            }
-            else if ("singlerow".equals(prop.getType())) {
+            } else if ("singlerow".equals(prop.getType())) {
                 buildSingleRow(panel, target, prop);
-            }
-            else if ("list".equals(prop.getType())) {                    
+            } else if ("list".equals(prop.getType())) {                    
                 buildList(panel, target, prop);
-            }
-            else if ("textarea".equals(prop.getType())) {
+            } else if ("textarea".equals(prop.getType())) {
                 buildTextArea(panel, target, prop);
-            }
-            else if ("separator".equals(prop.getType())) {
+            } else if ("separator".equals(prop.getType())) {
                 panel.add(LabelledLayout.getSeparator());
             }
         }
@@ -272,71 +260,62 @@
                 new UMLInitialValueExpressionModel(target);
             p  = new UMLExpressionPanel(model, prop.getName());
             control = p;
-        }
-        if ("defaultValue".equals(prop.getName())) {        
+        } else if ("defaultValue".equals(prop.getName())) {        
             UMLExpressionModel model = 
                 new UMLDefaultValueExpressionModel(target);
             p  = new UMLExpressionPanel(model, prop.getName());
             control = p;
-        }
-        else if ("specification".equals(prop.getName())) {
+        } else if ("specification".equals(prop.getName())) {
             UMLPlainTextDocument document = 
                 new UMLOperationSpecificationDocument();
             document.setTarget(target);
             UMLTextArea2 osta = new UMLTextArea2(document);
             osta.setRows(3);
             control = new JScrollPane(osta);
-        }
-        else if ("body".equals(prop.getName())) {
+        } else if ("body".equals(prop.getName())) {
             UMLPlainTextDocument document = new UMLCommentBodyDocument();
             document.setTarget(target);
             UMLTextArea2 text = new UMLTextArea2(document);
             text.setLineWrap(true);
             text.setRows(5);
             control = new JScrollPane(text);
-        }
-        else if ("condition".equals(prop.getName())) {
+        } else if ("condition".equals(prop.getName())) {
             UMLExpressionModel conditionModel =
                 new UMLConditionExpressionModel(target);
             JTextArea conditionArea =
                 new UMLExpressionBodyField(conditionModel, true);
             conditionArea.setRows(5);
             control = new JScrollPane(conditionArea);
-        }
-        else if ("script".equals(prop.getName())) {
+        } else if ("script".equals(prop.getName())) {
             UMLExpressionModel scriptModel =
                 new UMLScriptExpressionModel(target);            
             p  = new UMLExpressionPanel(scriptModel, prop.getName());
             control = p;
-        }
-        else if ("recurrence".equals(prop.getName())) {
+        } else if ("recurrence".equals(prop.getName())) {
             UMLExpressionModel recurrenceModel =
                 new UMLRecurrenceExpressionModel(target);            
             p  = new UMLExpressionPanel(recurrenceModel, prop.getName());
             control = p;
-        }
-        else if ("expression".equals(prop.getName())) {
+        } else if ("expression".equals(prop.getName())) {
             UMLExpressionModel model = new UMLExpressionExpressionModel(target);
             p = new UMLExpressionPanel(model, prop.getName());
             control = p;
-        }
-        else if ("changeExpression".equals(prop.getName())) {
+        } else if ("changeExpression".equals(prop.getName())) {
             UMLExpressionModel model = new UMLChangeExpressionModel(target);
             p = new UMLExpressionPanel(model, prop.getName());
             control = p;
-        }
-        else if ("when".equals(prop.getName())) {
+        } else if ("when".equals(prop.getName())) {
             UMLExpressionModel model = new UMLTimeExpressionModel(target);
             p = new UMLExpressionPanel(model, prop.getName());
             control = p;
         }
+        
         if (control != null) {
-            // if the control is a panel, add it
             if (control == p) {
+                // if the control is a panel, add it
                 panel.add(control);
-            }
-            // if not, it is a control and must be labeled...
-            else {
+            } else {
+                // if not, it is a control and must be labeled...
                 JLabel label = new JLabel(prop.getName());
                 label.setLabelFor(control);
                 panel.add(label);
@@ -356,58 +335,47 @@
             model = new UMLFeatureOwnerListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("behavioralFeature".equals(prop.getName())) {
+        } else if ("behavioralFeature".equals(prop.getName())) {
             model = new UMLParameterBehavioralFeatListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("parent".equals(prop.getName())) {
+        } else if ("parent".equals(prop.getName())) {
             model = new UMLGeneralizationParentListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("child".equals(prop.getName())) {
+        } else if ("child".equals(prop.getName())) {
             model = new UMLGeneralizationChildListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("feature".equals(prop.getName())) {
+        } else if ("feature".equals(prop.getName())) {
             model = new UMLParameterBehavioralFeatListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("enumeration".equals(prop.getName())) {
+        } else if ("enumeration".equals(prop.getName())) {
             EnumerationListModel m = new EnumerationListModel();
             m.setTarget(target);   
             pane = new UMLSingleRowSelector(m);
-        }
-        else if ("association".equals(prop.getName())) {
+        } else if ("association".equals(prop.getName())) {
             model = new UMLAssociationEndAssociationListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("base".equals(prop.getName())) {
+        } else if ("base".equals(prop.getName())) {
             model = new UMLExtendBaseListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);            
-        }
-        else if ("extension".equals(prop.getName())) {
+        } else if ("extension".equals(prop.getName())) {
             model = new UMLExtendExtensionListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);            
-        }
-        else if ("addition".equals(prop.getName())) {
+        } else if ("addition".equals(prop.getName())) {
             model = new UMLIncludeAdditionListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("useCase".equals(prop.getName())) {
+        } else if ("useCase".equals(prop.getName())) {
             model = new UMLExtensionPointUseCaseListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);            
-        }
-        else if ("interaction".equals(prop.getName())) {
+        } else if ("interaction".equals(prop.getName())) {
             if (Model.getFacade().isAMessage(target)) {
                 model = new UMLMessageInteractionListModel();
             }
@@ -416,23 +384,19 @@
             }
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);            
-        }
-        else if ("sender".equals(prop.getName())) {
+        } else if ("sender".equals(prop.getName())) {
             model = new UMLMessageSenderListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);            
-        }
-        else if ("receiver".equals(prop.getName())) {
+        } else if ("receiver".equals(prop.getName())) {
             model = new UMLMessageReceiverListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);            
-        }
-        else if ("action".equals(prop.getName())) {
+        } else if ("action".equals(prop.getName())) {
             model = new UMLMessageActionListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);            
-        }
-        else if ("context".equals(prop.getName())) {
+        } else if ("context".equals(prop.getName())) {
             model = new UMLInteractionContextListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
@@ -448,62 +412,52 @@
             model = new UMLInstanceSenderStimulusListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("receivedStimulus".equals(prop.getName())) {
+        } else if ("receivedStimulus".equals(prop.getName())) {
             model = new UMLInstanceReceiverStimulusListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("stateMachine".equals(prop.getName())) {
+        } else if ("stateMachine".equals(prop.getName())) {
             model = new UMLTransitionStatemachineListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("state".equals(prop.getName())) {
+        } else if ("state".equals(prop.getName())) {
             model = new UMLTransitionStateListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("source".equals(prop.getName())) {
+        } else if ("source".equals(prop.getName())) {
             model = new UMLTransitionSourceListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("target".equals(prop.getName())) {
+        } else if ("target".equals(prop.getName())) {
             model = new UMLTransitionTargetListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("guard".equals(prop.getName())) {
+        } else if ("guard".equals(prop.getName())) {
             model = new UMLTransitionGuardListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("effect".equals(prop.getName())) {
+        } else if ("effect".equals(prop.getName())) {
             model = new UMLTransitionEffectListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("trigger".equals(prop.getName())) {
+        } else if ("trigger".equals(prop.getName())) {
             model = new UMLTransitionTriggerListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("transition".equals(prop.getName())) {
+        } else if ("transition".equals(prop.getName())) {
             model = new UMLGuardTransitionListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("container".equals(prop.getName())) {
+        } else if ("container".equals(prop.getName())) {
             model = new UMLStateVertexContainerListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
-        }
-        else if ("activityGraph".equals(prop.getName())) {
+        } else if ("activityGraph".equals(prop.getName())) {
             model = new UMLPartitionActivityGraphListModel();
             model.setTarget(target);
             pane = new UMLSingleRowSelector(model);
         }
+        
         if (pane != null) {           
             JLabel label = new JLabel(prop.getName());
             label.setLabelFor(pane);
@@ -526,8 +480,7 @@
                     null,
                     null,
                     true));
-        }
-        else if ("supplierDependency".equals(prop.getName())) {
+        } else if ("supplierDependency".equals(prop.getName())) {
             model = new UMLModelElementSupplierDependencyListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLMutableLinkedList(
@@ -536,43 +489,35 @@
                     null,
                     null,
                     true));
-        }
-        else if ("generalization".equals(prop.getName())) {
+        } else if ("generalization".equals(prop.getName())) {
             model = new UMLGeneralizableElementGeneralizationListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("specialization".equals(prop.getName())) {
+        } else if ("specialization".equals(prop.getName())) {
             model = new UMLGeneralizableElementSpecializationListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("attribute".equals(prop.getName())) {
+        } else if ("attribute".equals(prop.getName())) {
             model = new UMLClassAttributeListModel();
             model.setTarget(target);
             list = new ScrollList(model, true, false);
-        }
-        else if ("association".equals(prop.getName())) {
+        } else if ("association".equals(prop.getName())) {
             model = new UMLClassifierAssociationEndListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("feature".equals(prop.getName())) {
+        } else if ("feature".equals(prop.getName())) {
             model = new UMLClassifierFeatureListModel();
             model.setTarget(target);
             list = new ScrollList(model, true, false);
-        }
-        else if ("operation".equals(prop.getName())) {
+        } else if ("operation".equals(prop.getName())) {
             model = new UMLClassOperationListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("ownedElement".equals(prop.getName())) {
+        } else if ("ownedElement".equals(prop.getName())) {
             model = new UMLNamespaceOwnedElementListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("elementImport".equals(prop.getName())) {
+        } else if ("elementImport".equals(prop.getName())) {
             model = new UMLClassifierPackageImportsListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLMutableLinkedList(model,
@@ -581,8 +526,7 @@
                     null,
                     null, //new ActionRemovePackageImport(),
                     true));
-        }
-        else if ("parameter".equals(prop.getName())) {
+        } else if ("parameter".equals(prop.getName())) {
             if (Model.getFacade().isAObjectFlowState(target)) {
                 model = new UMLObjectFlowStateParameterListModel();
                 model.setTarget(target);
@@ -600,26 +544,22 @@
                 list = new ScrollList(new UMLLinkedList(model, 
                         true, false));
             }
-        }
-        else if ("raisedSignal".equals(prop.getName())) {
+        } else if ("raisedSignal".equals(prop.getName())) {
             model = new UMLOperationRaisedSignalsListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLLinkedList(model, 
                     true, false));
-        }
-        else if ("method".equals(prop.getName())) {
+        } else if ("method".equals(prop.getName())) {
             model = new UMLOperationMethodsListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLLinkedList(model, 
                     true, false));
-        }
-        else if ("definedTag".equals(prop.getName())) {
+        } else if ("definedTag".equals(prop.getName())) {
             model = new UMLStereotypeTagDefinitionListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLLinkedList(model,
                     true, false));
-        }
-        else if ("baseClass".equals(prop.getName())) {
+        } else if ("baseClass".equals(prop.getName())) {
             model = new UMLStereotypeBaseClassListModel();
             model.setTarget(target);
             UMLMutableLinkedList l = new UMLMutableLinkedList(
@@ -630,65 +570,54 @@
                     true);
             l.setCellRenderer(new DefaultListCellRenderer());
             list = new ScrollList(l);
-        }
-        else if ("extended_elements".equals(prop.getName())) {
+        } else if ("extended_elements".equals(prop.getName())) {
             model = new UMLExtendedElementsListModel();
             model.setTarget(target);
             list = new ScrollList( new UMLLinkedList(model, 
                     true, true));
-        }
-        else if ("literal".equals(prop.getName())) {
+        } else if ("literal".equals(prop.getName())) {
             model = new UMLEnumerationLiteralsListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("supplier".equals(prop.getName())) {
+        } else if ("supplier".equals(prop.getName())) {
             model = new UMLDependencySupplierListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("client".equals(prop.getName())) {
+        } else if ("client".equals(prop.getName())) {
             model = new UMLDependencyClientListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("connection".equals(prop.getName())) {
+        } else if ("connection".equals(prop.getName())) {
             model = new UMLAssociationConnectionListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("associationRole".equals(prop.getName())) {
+        } else if ("associationRole".equals(prop.getName())) {
             model = new UMLAssociationAssociationRoleListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("link".equals(prop.getName())) {
+        } else if ("link".equals(prop.getName())) {
             model = new UMLAssociationLinkListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("specification".equals(prop.getName())) {
+        } else if ("specification".equals(prop.getName())) {
             model = new UMLAssociationEndSpecificationListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLMutableLinkedList(
                     model,
                     ActionAddAssociationSpecification.getInstance(),
                     null, null, true));
-        }
-        else if ("qualifier".equals(prop.getName())) {
+        } else if ("qualifier".equals(prop.getName())) {
             model = new UMLAssociationEndQualifiersListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("annotatedElement".equals(prop.getName())) {
+        } else if ("annotatedElement".equals(prop.getName())) {
             model = new UMLCommentAnnotatedElementListModel();
             model.setTarget(target);
             UMLMutableLinkedList l = new UMLMutableLinkedList(
                     model, null, null);            
             l.setDeleteAction(new ActionDeleteAnnotatedElement());
             list = new ScrollList(l);
-        }
-        else if ("context".equals(prop.getName())) {
+        } else if ("context".equals(prop.getName())) {
             model = new UMLSignalContextListModel();
             model.setTarget(target);
             UMLMutableLinkedList l = new UMLMutableLinkedList(
@@ -696,8 +625,7 @@
                     new ActionAddContextSignal(), null, 
                     new ActionRemoveContextSignal(), true);
             list = new ScrollList(l);
-        }
-        else if ("reception".equals(prop.getName())) {
+        } else if ("reception".equals(prop.getName())) {
             model = new UMLSignalReceptionListModel();
             model.setTarget(target);
             UMLMutableLinkedList l = new UMLMutableLinkedList(
@@ -705,18 +633,15 @@
                     new ActionAddReceptionSignal(), null, 
                     new ActionRemoveReceptionSignal(), true);
             list = new ScrollList(l);
-        }
-        else if ("extend".equals(prop.getName())) {
+        } else if ("extend".equals(prop.getName())) {
             model = new UMLUseCaseExtendListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("include".equals(prop.getName())) {
+        } else if ("include".equals(prop.getName())) {
             model = new UMLUseCaseIncludeListModel();
             model.setTarget(target);
             list = new ScrollList(model);
-        }
-        else if ("extensionPoint".equals(prop.getName())) {
+        } else if ("extensionPoint".equals(prop.getName())) {
             if (Model.getFacade().isAUseCase(target)) {
                 model = new UMLUseCaseExtensionPointListModel();
                 model.setTarget(target);
@@ -734,8 +659,7 @@
                         ActionNewExtendExtensionPoint.SINGLETON);
                 list = new ScrollList(l);
             }
-        }
-        else if ("base".equals(prop.getName())) {
+        } else if ("base".equals(prop.getName())) {
             model = new UMLClassifierRoleBaseListModel();
             model.setTarget(target);
             JList l =
@@ -745,90 +669,76 @@
                     ActionRemoveClassifierRoleBase.getInstance(),
                     true);
             list = new ScrollList(l);
-        }
-        else if ("availableFeature".equals(prop.getName())) {
+        } else if ("availableFeature".equals(prop.getName())) {
             model = new UMLClassifierRoleAvailableFeaturesListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("availableContents".equals(prop.getName())) {
+        } else if ("availableContents".equals(prop.getName())) {
             model = new UMLClassifierRoleAvailableContentsListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("predecessor".equals(prop.getName())) {
+        } else if ("predecessor".equals(prop.getName())) {
             model = new UMLMessagePredecessorListModel();
             model.setTarget(target);
             JList l = new UMLMutableLinkedList(model,
                     ActionAddMessagePredecessor.getInstance(),
                     null);
             list = new ScrollList(l);
-        }
-        else if ("actualArgument".equals(prop.getName())) {
+        } else if ("actualArgument".equals(prop.getName())) {
             model = new UMLActionArgumentListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("instantiation".equals(prop.getName())) {
+        } else if ("instantiation".equals(prop.getName())) {
             model = new UMLCreateActionClassifierListModel();
             model.setTarget(target);
             JList l = new UMLMutableLinkedList(model,
                     new ActionAddCreateActionInstantiation(), 
                     null, null, true);
             list = new ScrollList(l);
-        }
-        else if ("constrainingElement".equals(prop.getName())) {
+        } else if ("constrainingElement".equals(prop.getName())) {
             model = new UMLCollaborationConstrainingElementListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("top".equals(prop.getName())) {
+        } else if ("top".equals(prop.getName())) {
             model = new UMLStateMachineTopListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("transitions".equals(prop.getName())) {
+        } else if ("transitions".equals(prop.getName())) {
             model = new UMLStateMachineTransitionListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("transition".equals(prop.getName())) {
+        } else if ("transition".equals(prop.getName())) {
             model = new UMLEventTransitionListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("submachineState".equals(prop.getName())) {
+        } else if ("submachineState".equals(prop.getName())) {
             model = new UMLStateMachineSubmachineStateListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("message".equals(prop.getName())) {
+        } else if ("message".equals(prop.getName())) {
             model = new UMLInteractionMessagesListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("deployedComponent".equals(prop.getName())) {
+        } else if ("deployedComponent".equals(prop.getName())) {
             model = new UMLNodeDeployedComponentListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("residentElement".equals(prop.getName())) {
+        } else if ("residentElement".equals(prop.getName())) {
             model = new UMLComponentResidentListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("classifier".equals(prop.getName())) {
+        } else if ("classifier".equals(prop.getName())) {
             model = new UMLInstanceClassifierListModel();
             model.setTarget(target);
             JList l = new UMLMutableLinkedList(model,
@@ -836,50 +746,42 @@
                                      Model.getMetaTypes().getClassifier()), 
                                      null, null, true);
             list = new ScrollList(l);
-        }
-        else if ("resident".equals(prop.getName())) {
+        } else if ("resident".equals(prop.getName())) {
             model = new UMLContainerResidentListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);
-        }
-        else if ("entry".equals(prop.getName())) {
+        } else if ("entry".equals(prop.getName())) {
             model = new UMLStateEntryListModel();
             model.setTarget(target);
             JList l = new UMLStateEntryList(model);
             list = new ScrollList(l);
-        }
-        else if ("exit".equals(prop.getName())) {
+        } else if ("exit".equals(prop.getName())) {
             model = new UMLStateExitListModel();
             model.setTarget(target);
             JList l = new UMLStateExitList(model);
             list = new ScrollList(l);
-        }
-        else if ("deferrableEvent".equals(prop.getName())) {
+        } else if ("deferrableEvent".equals(prop.getName())) {
             model = new UMLStateDeferrableEventListModel();
             model.setTarget(target);
             JList l = new UMLStateDeferrableEventList(model);
             list = new ScrollList(l);                    
-        }
-        else if ("doActivity".equals(prop.getName())) {
+        } else if ("doActivity".equals(prop.getName())) {
             model = new UMLStateDoActivityListModel();
             model.setTarget(target);
             JList l = new UMLStateDoActivityList(model);
             list = new ScrollList(l);
-        }
-        else if ("outgoing".equals(prop.getName())) {
+        } else if ("outgoing".equals(prop.getName())) {
             model = new UMLStateVertexOutgoingListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);                    
-        }
-        else if ("incoming".equals(prop.getName())) {
+        } else if ("incoming".equals(prop.getName())) {
             model = new UMLStateVertexIncomingListModel();
             model.setTarget(target);
             JList l = new UMLLinkedList(model);
             list = new ScrollList(l);                    
-        }
-        else if ("classifierInState".equals(prop.getName())) {
+        } else if ("classifierInState".equals(prop.getName())) {
             model = new UMLOFSStateListModel();
             model.setTarget(target);
             JList l = new UMLMutableLinkedList(model,
@@ -888,43 +790,38 @@
                     new ActionRemoveOFSState(),
                     true);
             list = new ScrollList(l);
-        }
-        else if ("internalTransition".equals(prop.getName())) {
+        } else if ("internalTransition".equals(prop.getName())) {
             model = new UMLStateInternalTransition();
             model.setTarget(target);
             JList l = new UMLMutableLinkedList(model, null, 
                     new ActionNewTransition());
             list = new ScrollList(l);
-        }
-        else if ("subvertex".equals(prop.getName())) {
+        } else if ("subvertex".equals(prop.getName())) {
             model = new UMLCompositeStateSubvertexListModel();
             model.setTarget(target);
             JList l = new UMLCompositeStateSubvertexList(model);
             list = new ScrollList(l);
-        }
-        else if ("contents".equals(prop.getName())) {
+        } else if ("contents".equals(prop.getName())) {
             model = new UMLPartitionContentListModel();
             model.setTarget(target);
             JList l = new UMLMutableLinkedList(model,
                     new ActionAddPartitionContent(),
                     null);
             list = new ScrollList(l);
-        }
-        else if ("partition".equals(prop.getName())) {
+        } else if ("partition".equals(prop.getName())) {
             model = new UMLActivityGraphPartitionListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLLinkedList(model));
-        }
-        else if ("signal".equals(prop.getName())) {
+        } else if ("signal".equals(prop.getName())) {
             model = new UMLSignalEventSignalListModel();
             model.setTarget(target);
             list = new ScrollList(new UMLSignalEventSignalList(model));                    
-        }
-        else if ("action".equals(prop.getName())) {
+        } else if ("action".equals(prop.getName())) {
             // TODO: we need to set up the target. 
             // This creates a model without it.
             list = new ScrollList(new UMLActionSequenceActionList());
         }
+        
         if (list != null) {
             String name = prop.getName();
 
@@ -953,15 +850,13 @@
                     true); 
             visibilityPanel.setTarget(target);
             control = visibilityPanel;
-        }
-        else if ("changeability".equals(prop.getName())) {
+        } else if ("changeability".equals(prop.getName())) {
             UMLRadioButtonPanel cPanel = null;
             if (Model.getFacade().isAAssociationEnd(target)) {
                 cPanel = 
                     new UMLAssociationEndChangeabilityRadioButtonPanel(
                             "label.changeability", true);
-            }
-            else {
+            } else {
                 cPanel =   
                     new UMLStructuralFeatureChangeabilityRadioButtonPanel(
                             Translator.localize("label.changeability"), 
@@ -970,29 +865,27 @@
             cPanel.setTarget(target);
             control = cPanel;
 
-        }
-        else if ("concurrency".equals(prop.getName())) { 
+        } else if ("concurrency".equals(prop.getName())) { 
             UMLRadioButtonPanel cPanel =   
                 new UMLOperationConcurrencyRadioButtonPanel(
                         Translator.localize("label.concurrency"), true); 
             cPanel.setTarget(target);
             control = cPanel;
             
-        }
-        else if ("kind".equals(prop.getName())) {
+        } else if ("kind".equals(prop.getName())) {
             UMLRadioButtonPanel cPanel = 
                 new UMLParameterDirectionKindRadioButtonPanel(
                     Translator.localize("label.parameter.kind"), true);
             cPanel.setTarget(target);
             control = cPanel;   
-        }
-        else if ("aggregation".equals(prop.getName())) {
+        } else if ("aggregation".equals(prop.getName())) {
             UMLRadioButtonPanel cPanel = 
                 new UMLAssociationEndAggregationRadioButtonPanel(
                         "label.aggregation", true);
             cPanel.setTarget(target);
             control = cPanel;   
         }
+        
         if (control != null) {
             panel.add(control);
         }
@@ -1024,40 +917,30 @@
         
         if ("isAbstract".equals(p.getName())) {
             checkbox = new UMLGeneralizableElementAbstractCheckBox();
-        }
-        else if ("isLeaf".equals(p.getName())) {
+        } else if ("isLeaf".equals(p.getName())) {
             checkbox = new UMLGeneralizableElementLeafCheckBox();
-        }
-        else if ("isRoot".equals(p.getName())) {
+        } else if ("isRoot".equals(p.getName())) {
             checkbox = new UMLGeneralizableElementRootCheckBox(); 
-        }
-        else if ("derived".equals(p.getName())) {
+        } else if ("derived".equals(p.getName())) {
             checkbox = new UMLDerivedCheckBox();
-        }
-        else if ("isActive".equals(p.getName())) {
+        } else if ("isActive".equals(p.getName())) {
             checkbox = new UMLClassActiveCheckBox();    
-        }        
-        else if ("ownerScope".equals(p.getName())) {   
+        } else if ("ownerScope".equals(p.getName())) {   
             checkbox = new UMLFeatureOwnerScopeCheckBox();
-        }
-        else if ("targetScope".equals(p.getName())) {
+        } else if ("targetScope".equals(p.getName())) {
             checkbox = new UMLAssociationEndTargetScopeCheckbox();
-        }
-        else if ("isQuery".equals(p.getName())) {
+        } else if ("isQuery".equals(p.getName())) {
             checkbox = new UMLBehavioralFeatureQueryCheckBox();
-        }
-        else if ("isNavigable".equals(p.getName())) {
+        } else if ("isNavigable".equals(p.getName())) {
             checkbox = new UMLAssociationEndNavigableCheckBox();
-        }
-        else if ("ordering".equals(p.getName())) {
+        } else if ("ordering".equals(p.getName())) {
             checkbox = new UMLAssociationEndOrderingCheckBox();
-        }
-        else if ("isAsynchronous".equals(p.getName())) {
+        } else if ("isAsynchronous".equals(p.getName())) {
             checkbox = new UMLActionAsynchronousCheckBox();
-        }
-        else if ("isSynch".equals(p.getName())) {
+        } else if ("isSynch".equals(p.getName())) {
             checkbox = new UMLActionSynchCheckBox();
         }
+        
         if (checkbox != null) {
             checkbox.setTarget(target);
             panel.add(checkbox);
@@ -1085,8 +968,7 @@
                     Translator.localize(
                     "label.namespace.navigate.tooltip"),
                     combo);
-        }
-        else if ("type".equals(prop.getName())) {
+        } else if ("type".equals(prop.getName())) {
             if (Model.getFacade().isAObjectFlowState(target)) {
                 final UMLComboBoxModel2 model = 
                     new UMLObjectFlowStateClassifierComboBoxModel();
@@ -1097,8 +979,7 @@
                 comp = new UMLComboBoxNavigator(Translator.localize(
                         "label.classifierinstate.navigate.tooltip"),
                         combo);
-            }
-            else {
+            } else {
                 final UMLComboBoxModel2 model =
                     new UMLStructuralFeatureTypeComboBoxModel();
                 model.setTarget(target);           
@@ -1109,8 +990,7 @@
                         ActionSetStructuralFeatureType.getInstance());
                 comp = combo;
             }
-        }
-        else if ("powertype".equals(prop.getName())) {
+        } else if ("powertype".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLGeneralizationPowertypeComboBoxModel();
             model.setTarget(target);
@@ -1118,20 +998,17 @@
                     model,
                     ActionSetGeneralizationPowertype.getInstance());
             comp = combo;
-        }
-        else if ("multiplicity".equals(prop.getName())) {            
+        } else if ("multiplicity".equals(prop.getName())) {            
             final UMLMultiplicityPanel mPanel = new UMLMultiplicityPanel();
             mPanel.setTarget(target);
             comp = mPanel;
-        }
-        else if ("activator".equals(prop.getName())) {
+        } else if ("activator".equals(prop.getName())) {
             final UMLComboBoxModel model = 
                 new UMLMessageActivatorComboBoxModel();
             model.setTarget(target); 
             final JComboBox combo = new UMLMessageActivatorComboBox(model);
             comp = combo;
-        }
-        else if ("operation".equals(prop.getName())) {
+        } else if ("operation".equals(prop.getName())) {
             if (Model.getFacade().isACallEvent(target)) {
                 UMLComboBoxModel2 model = 
                     new UMLCallEventOperationComboBoxModel();
@@ -1140,8 +1017,7 @@
                 comp = new UMLComboBoxNavigator(Translator.localize(
                         "label.operation.navigate.tooltip"),
                         combo);
-            }
-            else {
+            } else {
                 final UMLComboBoxModel model = 
                     new UMLCallActionOperationComboBoxModel();
                 model.setTarget(target); 
@@ -1151,8 +1027,7 @@
                         Translator.localize("label.operation.navigate.tooltip"),
                         operationComboBox);
             }
-        }
-        else if ("representedClassifier".equals(prop.getName())) {
+        } else if ("representedClassifier".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLCollaborationRepresentedClassifierComboBoxModel();
             model.setTarget(target);
@@ -1162,8 +1037,7 @@
             comp = new UMLComboBoxNavigator(Translator.localize(
                             "label.represented-classifier.navigate.tooltip"),
                             combo);
-        }
-        else if ("representedOperation".equals(prop.getName())) {
+        } else if ("representedOperation".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLCollaborationRepresentedOperationComboBoxModel();
             model.setTarget(target);
@@ -1172,8 +1046,7 @@
             comp = new UMLComboBoxNavigator(Translator.localize(
                             "label.represented-operation.navigate.tooltip"),
                     combo);
-        }
-        else if ("context".equals(prop.getName())) {
+        } else if ("context".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLStateMachineContextComboBoxModel();
             model.setTarget(target);
@@ -1183,8 +1056,7 @@
                             "label.context.navigate.tooltip"),
                     combo);
 
-        }
-        else if ("association".equals(prop.getName())) {
+        } else if ("association".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLLinkAssociationComboBoxModel();
             model.setTarget(target);
@@ -1192,15 +1064,13 @@
                         "label.association.navigate.tooltip"),                
                     new UMLSearchableComboBox(model,
                             new ActionSetLinkAssociation(), true));
-        }
-        else if ("participant".equals(prop.getName())) {
+        } else if ("participant".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLAssociationEndTypeComboBoxModel();
             model.setTarget(target);
             comp = new UMLComboBox2(model,
                     ActionSetAssociationEndType.getInstance(), true);
-        }
-        else if ("submachine".equals(prop.getName())) {
+        } else if ("submachine".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLSubmachineStateComboBoxModel();
             model.setTarget(target);            
@@ -1208,8 +1078,7 @@
                     ActionSetSubmachineStateSubmachine.getInstance());
             comp = new UMLComboBoxNavigator(Translator.localize(
                             "tooltip.nav-submachine"), submachineBox);
-        }
-        else if ("referenceState".equals(prop.getName())) {
+        } else if ("referenceState".equals(prop.getName())) {
             final UMLComboBoxModel2 model = 
                 new UMLStubStateComboBoxModel();
             model.setTarget(target);            
@@ -1219,6 +1088,7 @@
             comp = new UMLComboBoxNavigator(Translator.localize(
                     "tooltip.nav-stubstate"), referencestateBox);            
         }
+        
         if (comp != null) {
             String name = prop.getName();
 
@@ -1230,10 +1100,10 @@
     }
 
     /**
+     * @param panel a panel with a labelled text field 
      * @param target The target of the panel
      * @param prop The XML data that contains the information
      *        of the options.
-     * @return a panel with a labelled text field 
      */
     private void buildTextboxPanel(JPanel panel, Object target,
             XMLPropertyPanelsDataRecord prop) {
@@ -1242,20 +1112,19 @@
         UMLPlainTextDocument document = null;
         if ("name".equals(prop.getName())) {
             document = new UMLModelElementNameDocument();            
-        }
-        else if ("discriminator".equals(prop.getName())) {
+        } else if ("discriminator".equals(prop.getName())) {
             document = new UMLDiscriminatorNameDocument();            
-        }
-        else if ("location".equals(prop.getName())) {
+        } else if ("location".equals(prop.getName())) {
             document = new UMLExtensionPointLocationDocument();
-        }
-        else if ("bound".equals(prop.getName())) {
+        } else if ("bound".equals(prop.getName())) {
             document = new UMLSynchStateBoundDocument();
         }
+        
         if (document != null) {
             document.setTarget(target);
             tfield = new UMLTextField2(document);
-        }        
+        }
+        
         if (tfield != null) {
             String name = prop.getName();
             JLabel label = new JLabel(name);
@@ -1264,9 +1133,4 @@
             panel.add(tfield);
         }        
     }
-
-
-    
-
-
 }

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1487831

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.