Author: mes
Date: 2011-11-23 16:23:22 -0800 (Wed, 23 Nov 2011)
New Revision: 27590

Added:
   
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/AbstractViewUpdater.java
Removed:
   
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/ViewUpdater.java
Modified:
   
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectEdgeViewUpdater.java
   
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectNodeViewUpdater.java
Log:
Renamed ViewUpdater to AbstractViewUpdater

Copied: 
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/AbstractViewUpdater.java
 (from rev 27587, 
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/ViewUpdater.java)
===================================================================
--- 
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/AbstractViewUpdater.java
                                (rev 0)
+++ 
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/AbstractViewUpdater.java
        2011-11-24 00:23:22 UTC (rev 27590)
@@ -0,0 +1,89 @@
+/*
+ Copyright (c) 2008, 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications.  In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage.  See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+package org.cytoscape.application.swing;
+
+import java.util.Map;
+
+import org.cytoscape.view.model.VisualProperty;
+import org.cytoscape.view.model.View;
+import org.cytoscape.model.CyRow;
+import org.cytoscape.model.events.RowSetRecord;
+import org.cytoscape.model.events.RowsSetEvent;
+import org.cytoscape.model.events.RowsSetListener;
+
+/**
+ * A utility class that provides an implementation of {@link RowsSetListener}
+ * for a particular column and {@link VisualProperty}.
+ * @param <S> The generic type of this ViewUpdater.
+ * @CyAPI.Abstract.Class
+ */
+public abstract class AbstractViewUpdater<S> implements RowsSetListener {
+
+       /** The {@link VisualProperty} that the {@link RowsSetListener} is 
provided for. */
+       protected final VisualProperty<S> vp;
+       /** The name of the column that the {@link RowsSetListener} is provided 
for.*/
+       protected final String columnName;
+
+       private final Map<CyRow, View<?>> rowViewMap;
+
+       /**
+        * Constructor.
+        * 
+        * @param vp The visual property that should be set on the view when 
the row
+        * is changed.
+        * @param columnName The name of the column within the row that is being
+        * listened to.
+        * @param rowViewMap a map between the row that is being listened to 
and the
+        * view that the visual property should be set when the row is changed.
+        */
+       public AbstractViewUpdater(VisualProperty<S> vp, String columnName, 
Map<CyRow, View<?>> rowViewMap) {
+               this.vp = vp;
+               this.columnName = columnName;
+               this.rowViewMap = rowViewMap;
+       }
+
+       /**
+        * Called whenever {@link CyRow}s are changed. Will attempt to set the
+        * visual property on the view with the new value that has been set in 
the
+        * row.
+        * 
+        * @param e The {@link RowsSetEvent} to be processed.
+        */
+       @SuppressWarnings("unchecked")
+       public void handleEvent(RowsSetEvent e) {
+               for (RowSetRecord record : e.getPayloadCollection()) {
+                       if (columnName != record.getColumn())
+                               continue;
+
+                       View<?> v = rowViewMap.get(record.getRow());
+
+                       if (v != null)
+                               v.setVisualProperty(vp, (S) record.getValue());
+               }
+       }
+}

Deleted: 
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/ViewUpdater.java
===================================================================
--- 
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/ViewUpdater.java
        2011-11-24 00:16:28 UTC (rev 27589)
+++ 
core3/api/trunk/swing-application-api/src/main/java/org/cytoscape/application/swing/ViewUpdater.java
        2011-11-24 00:23:22 UTC (rev 27590)
@@ -1,89 +0,0 @@
-/*
- Copyright (c) 2008, 2010, The Cytoscape Consortium (www.cytoscape.org)
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2.1 of the License, or
- any later version.
-
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
- documentation provided hereunder is on an "as is" basis, and the
- Institute for Systems Biology and the Whitehead Institute
- have no obligations to provide maintenance, support,
- updates, enhancements or modifications.  In no event shall the
- Institute for Systems Biology and the Whitehead Institute
- be liable to any party for direct, indirect, special,
- incidental or consequential damages, including lost profits, arising
- out of the use of this software and its documentation, even if the
- Institute for Systems Biology and the Whitehead Institute
- have been advised of the possibility of such damage.  See
- the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this library; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-package org.cytoscape.application.swing;
-
-import java.util.Map;
-
-import org.cytoscape.view.model.VisualProperty;
-import org.cytoscape.view.model.View;
-import org.cytoscape.model.CyRow;
-import org.cytoscape.model.events.RowSetRecord;
-import org.cytoscape.model.events.RowsSetEvent;
-import org.cytoscape.model.events.RowsSetListener;
-
-/**
- * A utility class that provides an implementation of {@link RowsSetListener}
- * for a particular column and {@link VisualProperty}.
- * @param <S> The generic type of this ViewUpdater.
- * @CyAPI.Abstract.Class
- */
-public abstract class ViewUpdater<S> implements RowsSetListener {
-
-       /** The {@link VisualProperty} that the {@link RowsSetListener} is 
provided for. */
-       protected final VisualProperty<S> vp;
-       /** The name of the column that the {@link RowsSetListener} is provided 
for.*/
-       protected final String columnName;
-
-       private final Map<CyRow, View<?>> rowViewMap;
-
-       /**
-        * Constructor.
-        * 
-        * @param vp The visual property that should be set on the view when 
the row
-        * is changed.
-        * @param columnName The name of the column within the row that is being
-        * listened to.
-        * @param rowViewMap a map between the row that is being listened to 
and the
-        * view that the visual property should be set when the row is changed.
-        */
-       public ViewUpdater(VisualProperty<S> vp, String columnName, Map<CyRow, 
View<?>> rowViewMap) {
-               this.vp = vp;
-               this.columnName = columnName;
-               this.rowViewMap = rowViewMap;
-       }
-
-       /**
-        * Called whenever {@link CyRow}s are changed. Will attempt to set the
-        * visual property on the view with the new value that has been set in 
the
-        * row.
-        * 
-        * @param e The {@link RowsSetEvent} to be processed.
-        */
-       @SuppressWarnings("unchecked")
-       public void handleEvent(RowsSetEvent e) {
-               for (RowSetRecord record : e.getPayloadCollection()) {
-                       if (columnName != record.getColumn())
-                               continue;
-
-                       View<?> v = rowViewMap.get(record.getRow());
-
-                       if (v != null)
-                               v.setVisualProperty(vp, (S) record.getValue());
-               }
-       }
-}

Modified: 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectEdgeViewUpdater.java
===================================================================
--- 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectEdgeViewUpdater.java
      2011-11-24 00:16:28 UTC (rev 27589)
+++ 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectEdgeViewUpdater.java
      2011-11-24 00:23:22 UTC (rev 27590)
@@ -38,11 +38,11 @@
 
 import static 
org.cytoscape.view.presentation.property.MinimalVisualLexicon.EDGE_SELECTED;
 
-import org.cytoscape.application.swing.ViewUpdater;
+import org.cytoscape.application.swing.AbstractViewUpdater;
 import org.cytoscape.model.CyNetwork;
 
 
-public class SelectEdgeViewUpdater extends ViewUpdater<Boolean> {
+public class SelectEdgeViewUpdater extends AbstractViewUpdater<Boolean> {
 
        public SelectEdgeViewUpdater(RowViewTracker tracker) {
                super(EDGE_SELECTED, CyNetwork.SELECTED, 
tracker.getRowViewMap());

Modified: 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectNodeViewUpdater.java
===================================================================
--- 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectNodeViewUpdater.java
      2011-11-24 00:16:28 UTC (rev 27589)
+++ 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/select/SelectNodeViewUpdater.java
      2011-11-24 00:23:22 UTC (rev 27590)
@@ -36,10 +36,10 @@
 
 import static 
org.cytoscape.view.presentation.property.MinimalVisualLexicon.NODE_SELECTED;
 
-import org.cytoscape.application.swing.ViewUpdater;
+import org.cytoscape.application.swing.AbstractViewUpdater;
 import org.cytoscape.model.CyNetwork;
 
-public class SelectNodeViewUpdater extends ViewUpdater<Boolean> {
+public class SelectNodeViewUpdater extends AbstractViewUpdater<Boolean> {
 
        public SelectNodeViewUpdater(RowViewTracker tracker) {
                super(NODE_SELECTED, CyNetwork.SELECTED, 
tracker.getRowViewMap());

-- 
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