Author: scooter
Date: 2012-05-22 09:56:46 -0700 (Tue, 22 May 2012)
New Revision: 29307

Modified:
   
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoscapeMenuPopulator.java
Log:
Respect inMenuBar=false when populating NetworkViewTaskFactory menues


Modified: 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoscapeMenuPopulator.java
===================================================================
--- 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoscapeMenuPopulator.java
       2012-05-22 00:23:52 UTC (rev 29306)
+++ 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoscapeMenuPopulator.java
       2012-05-22 16:56:46 UTC (rev 29307)
@@ -52,7 +52,9 @@
 import org.cytoscape.work.swing.DialogTaskManager;
 import org.cytoscape.work.swing.PanelTaskManager;
 
+import static org.cytoscape.work.ServiceProperties.IN_MENU_BAR;
 
+
 /**
  * Creates the menu and tool bars for a Cytoscape window object. It
  * also provides access to individual menus and items.<BR>
@@ -118,6 +120,9 @@
        }
 
        public void addNetworkViewTaskFactory(NetworkViewTaskFactory factory, 
Map props) {
+               // Check to make sure this is supposed to be in the menus
+               if (props.containsKey(IN_MENU_BAR) && 
!Boolean.parseBoolean(props.get(IN_MENU_BAR).toString()))
+                       return;
                TaskFactory provisioner = factoryProvisioner.createFor(factory);
                provisionerMap.put(factory, provisioner);
                addFactory(new TaskFactoryTunableAction(dialogTaskManager, 
provisioner, props, appManager, networkViewManager), provisioner, props);

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