Author: kono
Date: 2011-05-02 17:45:44 -0700 (Mon, 02 May 2011)
New Revision: 24893

Removed:
   
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/NullCyNetworkView.java
Modified:
   
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkView.java
   
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkViewFactory.java
Log:
NullCyNetworkView is hidden in implementation bundle.  To test null object or 
not, use isNullView() method instead.

Modified: 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkView.java
===================================================================
--- 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkView.java
 2011-05-02 22:32:19 UTC (rev 24892)
+++ 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkView.java
 2011-05-03 00:45:44 UTC (rev 24893)
@@ -95,6 +95,9 @@
        Collection<View<? extends CyTableEntry>> getAllViews();
        
        
+       Boolean isNullView();
+       
+       
        /**
         * Utility method to fit content to the presentation container (usually 
a Swing Window).
         * This fires event to the presentation layer for updating presentation.

Modified: 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkViewFactory.java
===================================================================
--- 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkViewFactory.java
  2011-05-02 22:32:19 UTC (rev 24892)
+++ 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/CyNetworkViewFactory.java
  2011-05-03 00:45:44 UTC (rev 24893)
@@ -40,8 +40,6 @@
 /**
  * Factory for {@linkplain CyNetworkView} objects.
  * Modules which need to create view models should import this as a service.
- * 
- * @author kono
  *
  */
 public interface CyNetworkViewFactory {
@@ -53,4 +51,6 @@
         * @return the view model for the network data model
         */
        public CyNetworkView getNetworkView(final CyNetwork network);
+       
+       public CyNetworkView getNetworkView(final CyNetwork network, final 
Boolean useThreshold);
 }

Deleted: 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/NullCyNetworkView.java
===================================================================
--- 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/NullCyNetworkView.java
     2011-05-02 22:32:19 UTC (rev 24892)
+++ 
core3/viewmodel-api/trunk/src/main/java/org/cytoscape/view/model/NullCyNetworkView.java
     2011-05-03 00:45:44 UTC (rev 24893)
@@ -1,104 +0,0 @@
-package org.cytoscape.view.model;
-
-import java.util.Collection;
-
-import org.cytoscape.model.CyEdge;
-import org.cytoscape.model.CyNetwork;
-import org.cytoscape.model.CyNode;
-import org.cytoscape.model.CyTableEntry;
-import org.cytoscape.model.SUIDFactory;
-
-/**
- * Null object for CyNetworkView.
- * 
- * Network readers may return this null object.
- * 
- */
-public final class NullCyNetworkView implements CyNetworkView {
-
-    private final long suid;
-    private final CyNetwork model;
-
-    public NullCyNetworkView(final CyNetwork model) {
-       this.model = model;
-       this.suid = SUIDFactory.getNextSUID();
-    }
-
-    @Override
-    public CyNetwork getModel() {
-       return model;
-    }
-
-    @Override
-    public long getSUID() {
-       return suid;
-    }
-
-    // All of the methods below are dummy.
-
-    @Override
-    public <T, V extends T> void setVisualProperty(VisualProperty<? extends T> 
vp, V value) {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public <T> T getVisualProperty(VisualProperty<T> vp) {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public <T, V extends T> void setLockedValue(VisualProperty<? extends T> 
vp, V value) {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public boolean isValueLocked(VisualProperty<?> vp) {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public void clearValueLock(VisualProperty<?> vp) {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public View<CyNode> getNodeView(CyNode node) {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public Collection<View<CyNode>> getNodeViews() {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public View<CyEdge> getEdgeView(CyEdge edge) {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public Collection<View<CyEdge>> getEdgeViews() {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public Collection<View<? extends CyTableEntry>> getAllViews() {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public void fitContent() {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public void fitSelected() {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-    @Override
-    public void updateView() {
-       throw new UnsupportedOperationException("This is a null object and does 
not support this method.");
-    }
-
-}

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