Author: clopes
Date: 2011-07-15 10:54:34 -0700 (Fri, 15 Jul 2011)
New Revision: 26192

Added:
   csplugins/trunk/toronto/clopes/mcode/build.xml
   csplugins/trunk/toronto/clopes/mcode/default.properties
   csplugins/trunk/toronto/clopes/mcode/osgi.bnd
   csplugins/trunk/toronto/clopes/mcode/pom.xml
   csplugins/trunk/toronto/clopes/mcode/src/
   csplugins/trunk/toronto/clopes/mcode/src/main/
   csplugins/trunk/toronto/clopes/mcode/src/main/java/
   csplugins/trunk/toronto/clopes/mcode/src/main/java/org/
   csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/
   csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEAboutAction.java
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEHelpAction.java
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEStartAction.java
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/util/
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/util/MCODEResources.java
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/view/
   
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/view/MCODEAboutDialog.java
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/
   
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context-osgi.xml
   
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context.xml
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/
   
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/arrow_collapsed.gif
   
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/arrow_expanded.gif
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo.png
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo1.png
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo2.png
   csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/note.gif
   csplugins/trunk/toronto/clopes/mcode/src/test/
   csplugins/trunk/toronto/clopes/mcode/src/test/java/
Modified:
   csplugins/trunk/toronto/clopes/mcode/
Log:
MCODE plugin port over to Cytoscape 3 (initial import)


Property changes on: csplugins/trunk/toronto/clopes/mcode
___________________________________________________________________
Added: svn:ignore
   + .settings
local.properties
.classpath
.project
target


Added: csplugins/trunk/toronto/clopes/mcode/build.xml
===================================================================
--- csplugins/trunk/toronto/clopes/mcode/build.xml                              
(rev 0)
+++ csplugins/trunk/toronto/clopes/mcode/build.xml      2011-07-15 17:54:34 UTC 
(rev 26192)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project name="MCODE Plugin" basedir="." default="install">
+    
+    <!-- 
+         This file should be created by each user when he/she needs to 
override particular values. 
+         Do NOT place it under version control.
+    -->
+    <property file="local.properties"/>
+       <!-- 
+            This file should be placed under version control.
+       -->
+    <property file="default.properties"/>
+    
+    <property environment="env"/>
+    
+    <property name="build.dir" value="target"/>
+    <property name="cytoscape.plugin.dir" value="${cytoscape.home}/plugins"/>
+
+    <target name="install">
+        <copy todir="${cytoscape.plugin.dir}" overwrite="true">
+            <fileset dir="${build.dir}" includes="*.jar"/>
+        </copy>
+    </target>
+    
+    <target name="info">
+        
<echo>*******************************************************************</echo>
+        <echo>*   This script installs the Cytoscape plugin                    
 *</echo>
+        
<echo>*******************************************************************</echo>
+    </target>
+    
+</project>
\ No newline at end of file

Added: csplugins/trunk/toronto/clopes/mcode/default.properties
===================================================================
--- csplugins/trunk/toronto/clopes/mcode/default.properties                     
        (rev 0)
+++ csplugins/trunk/toronto/clopes/mcode/default.properties     2011-07-15 
17:54:34 UTC (rev 26192)
@@ -0,0 +1,2 @@
+# Overwrite it in your local.properties file
+cytoscape.home=/Applications/Cytoscape_v3.0
\ No newline at end of file

Added: csplugins/trunk/toronto/clopes/mcode/osgi.bnd
===================================================================
--- csplugins/trunk/toronto/clopes/mcode/osgi.bnd                               
(rev 0)
+++ csplugins/trunk/toronto/clopes/mcode/osgi.bnd       2011-07-15 17:54:34 UTC 
(rev 26192)
@@ -0,0 +1,7 @@
+#-----------------------------------------------------------------
+# Use this file to add customized Bnd instructions for the bundle
+#-----------------------------------------------------------------
+
+Import-Package: *
+Private-Package: ${bundle.namespace}.internal.*
+Export-Package: ${bundle.namespace}

Added: csplugins/trunk/toronto/clopes/mcode/pom.xml
===================================================================
--- csplugins/trunk/toronto/clopes/mcode/pom.xml                                
(rev 0)
+++ csplugins/trunk/toronto/clopes/mcode/pom.xml        2011-07-15 17:54:34 UTC 
(rev 26192)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+       <properties>
+               
<bundle.symbolicName>org.cytoscape.mcode.mcode-plugin</bundle.symbolicName>
+               <bundle.namespace>org.cytoscape.mcode</bundle.namespace>
+       </properties>
+
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.cytoscape.mcode</groupId>
+       <artifactId>mcode-plugin</artifactId>
+       <version>1.4.0-alpha1-SNAPSHOT</version>
+
+       <name>${bundle.symbolicName} [${bundle.namespace}]</name>
+
+       <packaging>bundle</packaging>
+
+       <build>
+               <resources>
+                       <resource>
+                               <directory>src/main/resources</directory>
+                       </resource>
+               </resources>
+               <!-- Cytoscape requires Java 1.6 -->
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <configuration>
+                                       <source>1.6</source>
+                                       <target>1.6</target>
+                                       <optimize>true</optimize>
+                                       <showWarnings>true</showWarnings>
+                                       <showDeprecation>true</showDeprecation>
+                                       <compilerArguments>
+                                               <Xmaxwarns>10000</Xmaxwarns>
+                                               <Xmaxerrs>10000</Xmaxerrs>
+                                       </compilerArguments>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <configuration>
+                                       
<redirectTestOutputToFile>true</redirectTestOutputToFile>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.ops4j</groupId>
+                               <artifactId>maven-pax-plugin</artifactId>
+                               <version>1.5</version>
+                               <extensions>true</extensions>
+                       </plugin>
+                       <!-- Generates the OSGi metadata based on the osgi.bnd 
file. -->
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <version>2.3.4</version>
+                               <configuration>
+                                       <instructions>
+                                               
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
+                                               
<Bundle-Version>${project.version}</Bundle-Version>
+                                               <_include>-osgi.bnd</_include>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <!-- Links to the Cytoscape Maven repositories. -->
+       <repositories>
+               <repository>
+                       <id>cytoscape_snapshots</id>
+                       <snapshots>
+                       </snapshots>
+                       <releases>
+                               <enabled>false</enabled>
+                       </releases>
+                       <name>Cytoscape Snapshots</name>
+                       
<url>http://cytoscape.wodaklab.org/nexus/content/repositories/snapshots/</url>
+               </repository>
+               <repository>
+                       <id>cytoscape_releases</id>
+                       <snapshots>
+                               <enabled>false</enabled>
+                       </snapshots>
+                       <releases>
+                       </releases>
+                       <name>Cytoscape Releases</name>
+                       
<url>http://cytoscape.wodaklab.org/nexus/content/repositories/releases/</url>
+               </repository>
+       </repositories>
+
+       <!-- Dependencies needed to compile this project. -->
+       <dependencies>
+          <!-- Cytoscape -->
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>swing-application-api</artifactId>
+                       <version>3.0.0-alpha3-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>session-api</artifactId>
+                       <version>3.0.0-alpha6-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>swing-util-api</artifactId>
+                       <version>3.0.0-alpha3-SNAPSHOT</version>
+               </dependency>
+
+               <!-- Logging -->
+               <dependency>
+                       <groupId>org.ops4j.pax.logging</groupId>
+                       <artifactId>pax-logging-api</artifactId>
+                       <version>1.5.2</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <!-- Unit Testing -->
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.8.2</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>test-support</artifactId>
+                       <version>3.0.0-alpha2</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+
+</project>

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEAboutAction.java
===================================================================
--- 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEAboutAction.java
                               (rev 0)
+++ 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEAboutAction.java
       2011-07-15 17:54:34 UTC (rev 26192)
@@ -0,0 +1,78 @@
+package org.cytoscape.mcode.internal;
+
+import java.awt.event.ActionEvent;
+
+import org.cytoscape.application.swing.AbstractCyAction;
+import org.cytoscape.application.swing.CySwingApplication;
+import org.cytoscape.mcode.internal.util.MCODEResources;
+import org.cytoscape.mcode.internal.view.MCODEAboutDialog;
+import org.cytoscape.session.CyApplicationManager;
+import org.cytoscape.util.swing.OpenBrowser;
+
+/**
+ * * Copyright (c) 2004 Memorial Sloan-Kettering Cancer Center
+ * *
+ * * Code written by: Gary Bader
+ * * Authors: Gary Bader, Ethan Cerami, Chris Sander
+ * *
+ * * 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
+ * * Memorial Sloan-Kettering Cancer Center
+ * * has no obligations to provide maintenance, support,
+ * * updates, enhancements or modifications.  In no event shall the
+ * * Memorial Sloan-Kettering Cancer Center
+ * * 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
+ * * Memorial Sloan-Kettering Cancer Center
+ * * has 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.
+ * *
+ * * User: Gary Bader
+ * * Date: Jun 25, 2004
+ * * Time: 5:38:52 PM
+ * * Description: The action to show the About dialog box
+ */
+
+/**
+ * The action to show the About dialog box
+ */
+public class MCODEAboutAction extends AbstractCyAction {
+
+       private static final long serialVersionUID = -8445425993916988045L;
+
+       private final CySwingApplication swingApplication;
+       private final OpenBrowser openBrowser;
+       private final MCODEResources resources;
+
+       public MCODEAboutAction(final String menuTitle,
+                                                       final 
CyApplicationManager applicationManager,
+                                                       final 
CySwingApplication swingApplication,
+                                                       final OpenBrowser 
openBrowser,
+                                                       final MCODEResources 
resources) {
+               super(menuTitle, applicationManager);
+               this.swingApplication = swingApplication;
+               this.openBrowser = openBrowser;
+               this.resources = resources;
+               setPreferredMenu("Plugins.MCODE");
+       }
+
+       @Override
+       public void actionPerformed(ActionEvent e) {
+               //display about box
+               MCODEAboutDialog aboutDialog = new 
MCODEAboutDialog(swingApplication, openBrowser, resources);
+               aboutDialog.pack();
+               aboutDialog.setVisible(true);
+       }
+}

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEHelpAction.java
===================================================================
--- 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEHelpAction.java
                                (rev 0)
+++ 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEHelpAction.java
        2011-07-15 17:54:34 UTC (rev 26192)
@@ -0,0 +1,67 @@
+package org.cytoscape.mcode.internal;
+
+import java.awt.event.ActionEvent;
+
+import org.cytoscape.application.swing.AbstractCyAction;
+import org.cytoscape.session.CyApplicationManager;
+import org.cytoscape.util.swing.OpenBrowser;
+
+/**
+ * Copyright (c) 2004 Memorial Sloan-Kettering Cancer Center
+ * *
+ * * Code written by: Gary Bader
+ * * Authors: Gary Bader, Ethan Cerami, Chris Sander
+ * *
+ * * 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
+ * * Memorial Sloan-Kettering Cancer Center
+ * * has no obligations to provide maintenance, support,
+ * * updates, enhancements or modifications.  In no event shall the
+ * * Memorial Sloan-Kettering Cancer Center
+ * * 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
+ * * Memorial Sloan-Kettering Cancer Center
+ * * has 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.
+ * *
+ * * User: vukpavlovic
+ * * Date: Jan 10, 2007
+ * * Time: 5:55:40 PM
+ * * Description: Opens a browser with the MCODE wiki page.
+ */
+
+/**
+ * Opens a browser with the MCODE wiki page.
+ */
+
+public class MCODEHelpAction extends AbstractCyAction {
+
+       private static final long serialVersionUID = -8129187221346920847L;
+
+       private final OpenBrowser openBrowser;
+
+       public MCODEHelpAction(final String menuTitle,
+                                                  final CyApplicationManager 
applicationManager,
+                                                  final OpenBrowser 
openBrowser) {
+               super(menuTitle, applicationManager);
+               this.openBrowser = openBrowser;
+               setPreferredMenu("Plugins.MCODE");
+       }
+
+       @Override
+       public void actionPerformed(ActionEvent actionEvent) {
+               openBrowser.openURL("http://www.baderlab.org/Software/MCODE/";);
+       }
+}

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEStartAction.java
===================================================================
--- 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEStartAction.java
                               (rev 0)
+++ 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/MCODEStartAction.java
       2011-07-15 17:54:34 UTC (rev 26192)
@@ -0,0 +1,27 @@
+package org.cytoscape.mcode.internal;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JOptionPane;
+
+import org.cytoscape.application.swing.AbstractCyAction;
+import org.cytoscape.session.CyApplicationManager;
+
+/**
+ * Creates a new menu item under Plugins menu section.
+ */
+public class MCODEStartAction extends AbstractCyAction {
+
+       private static final long serialVersionUID = 3521389398662580589L;
+
+       public MCODEStartAction(final String menuTitle, final 
CyApplicationManager applicationManager) {
+               super(menuTitle, applicationManager);
+               setPreferredMenu("Plugins.MCODE");
+       }
+
+       @Override
+       public void actionPerformed(ActionEvent e) {
+               // TODO...
+               JOptionPane.showMessageDialog(null, "TODO...");
+       }
+}

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/util/MCODEResources.java
===================================================================
--- 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/util/MCODEResources.java
                            (rev 0)
+++ 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/util/MCODEResources.java
    2011-07-15 17:54:34 UTC (rev 26192)
@@ -0,0 +1,31 @@
+package org.cytoscape.mcode.internal.util;
+
+import java.net.URL;
+
+public class MCODEResources {
+
+       public static enum Image {
+               LOGO("/img/logo1.png"),
+               LOGO_SMALL("/img/logo2.png"),
+               LOGO_SIMPLE("/img/logo.png"),
+               ARROW_EXPANDED("/img/arrow_expanded.gif"),
+               ARROW_COLLAPSED("/img/arrow_collapsed.gif"),
+               NOTE("/img/note.gif");
+
+               private final String name;
+
+               private Image(final String name) {
+                       this.name = name;
+               }
+
+               @Override
+               public String toString() {
+                       return name;
+               }
+       }
+
+       public URL getUrl(Image img) {
+               return this.getClass().getResource(img.toString());
+       }
+
+}

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/view/MCODEAboutDialog.java
===================================================================
--- 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/view/MCODEAboutDialog.java
                          (rev 0)
+++ 
csplugins/trunk/toronto/clopes/mcode/src/main/java/org/cytoscape/mcode/internal/view/MCODEAboutDialog.java
  2011-07-15 17:54:34 UTC (rev 26192)
@@ -0,0 +1,122 @@
+package org.cytoscape.mcode.internal.view;
+
+import java.awt.Insets;
+import java.net.URL;
+
+import javax.swing.JDialog;
+import javax.swing.JEditorPane;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import javax.swing.text.html.HTMLEditorKit;
+
+import org.cytoscape.application.swing.CySwingApplication;
+import org.cytoscape.mcode.internal.util.MCODEResources;
+import org.cytoscape.mcode.internal.util.MCODEResources.Image;
+import org.cytoscape.util.swing.OpenBrowser;
+
+/**
+ * * Copyright (c) 2004 Memorial Sloan-Kettering Cancer Center
+ * *
+ * * Code written by: Gary Bader
+ * * Authors: Gary Bader, Ethan Cerami, Chris Sander
+ * *
+ * * 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
+ * * Memorial Sloan-Kettering Cancer Center
+ * * has no obligations to provide maintenance, support,
+ * * updates, enhancements or modifications.  In no event shall the
+ * * Memorial Sloan-Kettering Cancer Center
+ * * 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
+ * * Memorial Sloan-Kettering Cancer Center
+ * * has 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.
+ * *
+ * * User: Gary Bader
+ * * Date: Jun 25, 2004
+ * * Time: 5:47:31 PM
+ * * Description: An about dialog box for MCODE
+ */
+
+/**
+ * An about dialog box for MCODE
+ */
+public class MCODEAboutDialog extends JDialog {
+
+       private static final long serialVersionUID = 635333288924094273L;
+
+       private final OpenBrowser openBrowser;
+       private final MCODEResources resources;
+
+       /** Main panel for dialog box */
+       private JEditorPane mainContainer;
+
+       public MCODEAboutDialog(final CySwingApplication swingApplication,
+                                                       final OpenBrowser 
openBrowser,
+                                                       final MCODEResources 
resources) {
+               super(swingApplication.getJFrame(), "About MCODE", false);
+               this.openBrowser = openBrowser;
+               this.resources = resources;
+
+               setResizable(false);
+               setContentPane(getMainContainer());
+       }
+
+       private JEditorPane getMainContainer() {
+               if (mainContainer == null) {
+                       mainContainer = new JEditorPane();
+                       mainContainer.setMargin(new Insets(10, 10, 10, 10));
+                       mainContainer.setEditable(false);
+                       mainContainer.setEditorKit(new HTMLEditorKit());
+                       mainContainer.addHyperlinkListener(new 
HyperlinkAction());
+
+                       URL logoURL = resources.getUrl(Image.LOGO);
+                       String logoCode = "";
+
+                       if (logoURL != null) {
+                               logoCode = "<center><img src='" + logoURL + 
"'></center>";
+                       }
+
+                       String text = "<html><body>" +
+                                                 logoCode +
+                                                 "<P align=center><b>MCODE 
(Molecular Complex Detection) v1.32 (Jun 2011)</b><BR>" +
+                                                 "A Cytoscape PlugIn<BR><BR>" +
+
+                                                 "Version 1.32 by <a 
href='http://www.baderlab.org/'>Bader Lab</a>, University of Toronto<BR>" +
+                                                 "Version 1.2 by Vuk Pavlovic 
(<a href='http://www.baderlab.org/'>Bader Lab</a>, University of Toronto)<BR>" +
+                                                 "Version 1.1 and 1.0 by Gary 
Bader (while in the <a href='http://cbio.mskcc.org/'>Sander Lab</a>,<BR>" +
+                                                 "Memorial Sloan-Kettering 
Cancer Center)<BR><BR>" +
+
+                                                 "If you use this plugin in 
your research, please cite:<BR>" +
+                                                 "Bader GD, Hogue CW<BR>" +
+                                                 "<a 
href='http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=12525261&dopt=Abstract'>An
 automated method for finding molecular complexes<BR>" +
+                                                 "in large protein interaction 
networks.</a><BR>" +
+                                                 "<i>BMC Bioinformatics</i>. 
2003 Jan 13;4(1):2</P></body></html>";
+
+                       mainContainer.setText(text);
+               }
+
+               return mainContainer;
+       }
+
+       private class HyperlinkAction implements HyperlinkListener {
+
+               public void hyperlinkUpdate(HyperlinkEvent event) {
+                       if (event.getEventType() == 
HyperlinkEvent.EventType.ACTIVATED) {
+                               openBrowser.openURL(event.getURL().toString());
+                       }
+               }
+       }
+}

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
--- 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context-osgi.xml
                             (rev 0)
+++ 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context-osgi.xml
     2011-07-15 17:54:34 UTC (rev 26192)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
+       xsi:schemaLocation="
+               http://www.springframework.org/schema/beans 
+               http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+               http://www.springframework.org/schema/osgi 
+               http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
+       default-lazy-init="false">
+
+
+       <!-- ================= Import =========================== -->
+
+       <!-- Import OSGi service from service registry -->
+       <!--
+               <osgi:reference id="pluginAdapterServiceRef"
+               interface="org.cytoscape.plugin.CyPluginAdapter" />
+       -->
+
+       <osgi:reference id="cyApplicationManagerServiceRef"
+               interface="org.cytoscape.session.CyApplicationManager" />
+
+       <osgi:reference id="cySwingApplicationServiceRef"
+               interface="org.cytoscape.application.swing.CySwingApplication" 
/>
+
+       <osgi:reference id="openBrowserServiceRef"
+               interface="org.cytoscape.util.swing.OpenBrowser" />
+
+
+       <!-- ================= Export =========================== -->
+
+       <!-- Export the instance as an OSGi service -->
+       <osgi:service id="startMenuActionService" ref="startMenuAction"
+               interface="org.cytoscape.application.swing.CyAction" />
+               
+       <osgi:service id="helpMenuActionService" ref="helpMenuAction"
+               interface="org.cytoscape.application.swing.CyAction" />
+               
+       <osgi:service id="aboutMenuActionService" ref="aboutMenuAction"
+               interface="org.cytoscape.application.swing.CyAction" />
+
+
+</beans>

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
--- 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context.xml
                          (rev 0)
+++ 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/META-INF/spring/bundle-context.xml
  2011-07-15 17:54:34 UTC (rev 26192)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:context="http://www.springframework.org/schema/context";
+       xsi:schemaLocation="
+               http://www.springframework.org/schema/beans
+               http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+               http://www.springframework.org/schema/context
+               
http://www.springframework.org/schema/context/spring-context-2.5.xsd";>
+
+       <!-- Create an instance (bean) of the class -->
+
+       <!--<bean id="plugin" class="org.cytoscape.mcode.internal.MCODEPlugin">
+               <constructor-arg ref="pluginAdapterServiceRef" />
+               <constructor-arg ref="openBrowserServiceRef" />
+        <constructor-arg ref="resources" />
+       </bean>-->
+       
+       <bean id="startMenuAction" 
class="org.cytoscape.mcode.internal.MCODEStartAction">
+               <constructor-arg value="Start MCODE" />
+               <constructor-arg ref="cyApplicationManagerServiceRef" />
+       </bean>
+
+       <bean id="helpMenuAction" 
class="org.cytoscape.mcode.internal.MCODEHelpAction">
+               <constructor-arg value="Help" />
+               <constructor-arg ref="cyApplicationManagerServiceRef" />
+               <constructor-arg ref="openBrowserServiceRef" />
+       </bean>
+       
+       <bean id="aboutMenuAction" 
class="org.cytoscape.mcode.internal.MCODEAboutAction">
+               <constructor-arg value="About" />
+               <constructor-arg ref="cyApplicationManagerServiceRef" />
+               <constructor-arg ref="cySwingApplicationServiceRef" />
+               <constructor-arg ref="openBrowserServiceRef" />
+               <constructor-arg ref="resources" />
+       </bean>
+
+       <bean id="resources" 
class="org.cytoscape.mcode.internal.util.MCODEResources" />
+
+</beans>

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/arrow_collapsed.gif
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/arrow_collapsed.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/arrow_expanded.gif
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/arrow_expanded.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo.png
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo1.png
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo1.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo2.png
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/logo2.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/note.gif
===================================================================
(Binary files differ)


Property changes on: 
csplugins/trunk/toronto/clopes/mcode/src/main/resources/img/note.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

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