svn commit: r14356 - trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-04-15 20:12:04-0700
New Revision: 14356

Modified:
   trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java

Log:
Change use of deprecated TaggedValue methods

Modified: trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java?view=diff&rev=14356&p1=trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java&p2=trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java&r1=14355&r2=14356
==============================================================================
--- trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java	(original)
+++ trunk/src/app/src/org/argouml/uml/ui/TabTaggedValuesModel.java	2008-04-15 20:12:04-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 2005-2007 The Regents of the University of California. All
+// Copyright (c) 2005-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -120,6 +120,7 @@
     /*
      * @see javax.swing.table.TableModel#getColumnClass(int)
      */
+    @Override
     public Class getColumnClass(int c) {
         if (c == 0) {
             return (Class) Model.getMetaTypes().getTagDefinition();
@@ -134,6 +135,7 @@
     /*
      * @see javax.swing.table.TableModel#isCellEditable(int, int)
      */
+    @Override
     public boolean isCellEditable(int row, int col) {
         return true;
     }
@@ -216,9 +218,10 @@
         } else {
             Object tv = getFromCollection(tvs, rowIndex);
             if (columnIndex == 0) {
-                Model.getExtensionMechanismsHelper().setTag(tv, aValue);
+                Model.getExtensionMechanismsHelper().setType(tv, aValue);
             } else if (columnIndex == 1) {
-                Model.getCommonBehaviorHelper().setValue(tv, aValue);
+                Model.getExtensionMechanismsHelper().setDataValues(tv,
+                        new String[] {(String) aValue });
             }
             fireTableChanged(
                     new TableModelEvent(this, rowIndex, rowIndex, columnIndex));
@@ -234,7 +237,7 @@
      */
     public void addRow(Object[] values) {
         Object tagType = values[0];
-        Object tagValue = values[1];
+        String tagValue = (String) values[1];
         
         if (tagType == null) {
             tagType = "";
@@ -250,8 +253,9 @@
         // need it to have an owner for the following method calls
         Model.getExtensionMechanismsHelper().addTaggedValue(target, tv);
 
-        Model.getExtensionMechanismsHelper().setTag(tv, tagType);
-        Model.getCommonBehaviorHelper().setValue(tv, tagValue);
+        Model.getExtensionMechanismsHelper().setType(tv, tagType);
+        Model.getExtensionMechanismsHelper().setDataValues(tv,
+                new String[] {tagValue});
 
         // Since we aren't sure of ordering, fire event for whole table
         fireTableChanged(new TableModelEvent(this));
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.