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

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2011-03-14 19:16:10-0700
New Revision: 19114

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

Log:
Issue 6203: The type of a control is now held as a class not a string.

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=19114&r1=19113&r2=19114
==============================================================================
--- 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	2011-03-14 19:16:10-0700
@@ -213,6 +213,7 @@
         JComponent control = null;
         
         final String propertyName = prop.getPropertyName();
+        final Class<?> type = prop.getType();
         
         if ("initialValue".equals(prop.getPropertyName())) {        
             UMLExpressionModel model = 
@@ -230,8 +231,8 @@
             UMLTextArea osta = new UMLTextArea(document);
             osta.setRows(3);
             control = new JScrollPane(osta);
-        } else if ("body".equals(prop.getPropertyName()) && "String".equals(prop.getType())) {
-            UMLPlainTextDocument document = new UMLCommentBodyDocument(prop.getPropertyName(), target);
+        } else if ("body".equals(propertyName) && type == String.class) {
+            UMLPlainTextDocument document = new UMLCommentBodyDocument(propertyName, target);
             UMLTextArea text = new UMLTextArea(document);
             text.setLineWrap(true);
             text.setRows(5);

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

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.