Author: ruschein
Date: 2010-08-11 12:32:54 -0700 (Wed, 11 Aug 2010)
New Revision: 21334

Modified:
   
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
   core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java
Log:
Added getQualifiedName() which is needed for Tunable's property handlers.

Modified: 
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
===================================================================
--- 
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
   2010-08-11 17:51:06 UTC (rev 21333)
+++ 
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
   2010-08-11 19:32:54 UTC (rev 21334)
@@ -109,4 +109,16 @@
                else
                        return setter.getName().substring(3);
        }
+
+       /**
+        *  @return the name of the underlying class of the tunable followed by 
a dot and the name of the tunable field or getter/setter root name.
+        *
+        *  Please note that the returned String will always contain a single 
embedded dot.
+        */
+       final public String getQualifiedName() {
+               final String unqualifiedClassName =
+                       field == null ? method.getDeclaringClass().toString() : 
field.getDeclaringClass().toString();
+               
+                return unqualifiedClassName.substring( n.lastIndexOf(".") + 1) 
+ "." + getName();
+       }
 }

Modified: 
core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java
===================================================================
--- core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java   
2010-08-11 17:51:06 UTC (rev 21333)
+++ core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java   
2010-08-11 19:32:54 UTC (rev 21334)
@@ -57,4 +57,11 @@
         * @return a name representing a tunable property
         */
        String getName();
+
+       /**
+        *  @return the name of the underlying class of the tunable followed by 
a dot and the name of the tunable field or getter/setter root name.
+        *
+        *  Please note that the returned String will always contain a single 
embedded dot.
+        */
+       String getQualifiedName();
 }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to