Author: kono
Date: 2009-07-20 12:37:13 -0700 (Mon, 20 Jul 2009)
New Revision: 17489

Added:
   csplugins/trunk/ucsd/kono/ShortestPath2/resources/
   csplugins/trunk/ucsd/kono/ShortestPath2/resources/plugin.props
   csplugins/trunk/ucsd/kono/ShortestPath2/src/
   csplugins/trunk/ucsd/kono/ShortestPath2/src/org/
   
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/internal/
   
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/internal/ShortestPathDialog.java
Removed:
   csplugins/trunk/ucsd/kono/ShortestPath2/org/
   
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/ShortestPathDialog.java
Modified:
   csplugins/trunk/ucsd/kono/ShortestPath2/build.xml
   
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/ShortestPathPlugin.java
Log:


Modified: csplugins/trunk/ucsd/kono/ShortestPath2/build.xml
===================================================================
--- csplugins/trunk/ucsd/kono/ShortestPath2/build.xml   2009-07-20 19:29:52 UTC 
(rev 17488)
+++ csplugins/trunk/ucsd/kono/ShortestPath2/build.xml   2009-07-20 19:37:13 UTC 
(rev 17489)
@@ -1,98 +1,81 @@
 <?xml version = "1.0"?>
-<project name = "ShortestPath" default = "compile_release" basedir = ".">
-   
-   <property name = "src" location = "src"/>
-   <property name = "build" location = "build"/>
-   <property name = "build.compiler" value = "modern"/>
-   <!-- path to Cytoscape under development (CVS) -->
-   <property name = "lib.dev" location = "../../../../cytoscape"/>
-   <!-- path to Cytoscape 2.2 official release -->
-   <!-- <property name = "lib.release" location = "../../../../C2.1/source"/> 
-->
-   <property name = "lib.release" location = "../../../../cytoscape"/>
-   <property name = "jar"  location = "jar"/>
-   <property name = "doc" location = "doc"/>
+<project name="shortestPathPlugin2" default="all" basedir=".">
 
-   <property name="cytoscape.plugin.release" value="${lib.release}/plugins"/>
+       <property name="src" location="src" />
+       <property name="build" location="build" />
+       <property name="build.compiler" value="modern" />
+       <!-- path to Cytoscape under development (CVS) -->
+       <property name="cylib" location="../cytoscape" />
+       <property name="lib" location="lib" />
+       <property name="jar" location="jar" />
+       <property name="doc" location="doc" />
+       <property name="projectName" value="shortestPathPlugin2" />
 
-   <path id = "classpath_dev">
-       <fileset dir = "${lib.dev}">
-          <include name = "**/*.jar"/>
-       </fileset>
-   </path>
+       <property name="cytoscape.plugin" value="${lib}/plugins" />
 
-   <path id = "classpath_release">
-       <fileset dir = "${lib.release}">
-          <include name = "**/*.jar"/>
-       </fileset>
-   </path>
+       <path id="classpath">
+               <fileset dir="${cylib}">
+                       <include name="**/*.jar" />
+               </fileset>
+               <fileset dir="${lib}">
+                       <include name="**/*.jar" />
+               </fileset>
+       </path>
 
-   <target name="prepare" depends="clean">
-      <mkdir dir="${build}"/>
-   </target>
+       <target name="prepare" depends="clean">
+               <mkdir dir="${build}" />
+       </target>
 
-   <target name="compile_dev" depends = "prepare" description="Compile with 
Cytoscape under development">
-   <!-- Compile the java code from ${src} into ${build} -->
-   <javac source = "1.5" debug="true" deprecation="true" srcdir = "${src}" 
destdir="${build}">
-      <classpath refid = "classpath_dev"/>
-   </javac>
-   </target>
+       <target name="compile" depends="prepare" description="Compile with 
Cytoscape under development">
+               <!-- Compile the java code from ${src} into ${build} -->
+               <javac source="1.5" debug="true" deprecation="true" 
srcdir="${src}" destdir="${build}">
+                       <classpath refid="classpath" />
+               </javac>
+       </target>
 
-   <target name="compile_release" depends = "prepare" description="Compiles 
with current official release of Cytoscape">
-   <!-- Compile the java code from ${src} into ${build} -->
-   <javac source = "1.5" debug="true" srcdir = "${src}" destdir="${build}">
-      <classpath refid = "classpath_release"/>
-   </javac>
-   </target>
-   
-   <target name="clean" description="clean up" >
-      <!-- Delete the ${build} and ${src} directory trees -->
-      <delete dir="${build}"/>
-      <delete dir="${jar}"/>
-   </target>
+       <target name="clean" description="clean up">
+               <!-- Delete the ${build} and ${src} directory trees -->
+               <delete dir="${build}" />
+               <delete dir="${jar}" />
+       </target>
 
-   <target name="jar_release" depends="compile_release" description="makes a 
jar for the current official Cytoscape release">
-   <mkdir dir = "${jar}"/>
-   <jar jarfile="${jar}/ShortestPath.jar">
-      <fileset dir="${build}"/>
-   </jar>
-   </target>
+       <target name="jar" depends="compile" description="makes a jar for 
Cytoscape under development">
+               <mkdir dir="${jar}" />
+               <unzip dest="${build}">
+                       <fileset dir="${lib}" includes="*" />
+               </unzip>
+               <copy todir="build/org/cytoscape/view/ui/networkpanel" 
file="resources/plugin.props" />
+               <mkdir dir="build/org/cytoscape/view/ui/networkpanel/images"/>
+               <copy todir="build/org/cytoscape/view/ui/networkpanel/images">
+                       <fileset dir="images"/>
+               </copy>
+               <jar jarfile="${jar}/${projectName}.jar">
+                       <manifest>
+                               <attribute name="Cytoscape-Plugin" 
value="org.cytoscape.view.ui.networkpanel.NetworkBrowserPlugin" />
+                       </manifest>
+                       <fileset dir="${build}" />
+               </jar>
+       </target>
 
-   <target name="jar_dev" depends="compile_dev" description="makes a jar for 
Cytoscape under development">
-   <mkdir dir = "${jar}"/>
-   <jar jarfile="${jar}/ShortestPath.jar">
-      <fileset dir="${build}"/>
-   </jar>
-   </target>
+       <target name="all" depends="jar" />
 
-   <target name = "run_dev" depends="jar_dev" description = "Run under 
development">
-      <java classname = "cytoscape.CyMain" classpathref = "classpath_dev"
-          fork = "true" maxmemory = "1g">
-         <arg line = "--JLD"/>
-         <arg line = "${jar}/ShortestPath.jar"/>
-         <arg line = "-vt"/>
-         <arg line = "5000"/>
-      </java>
-    </target>
+       <target name="run" depends="jar" description="Run under development">
+               <java classname="cytoscape.CyMain" classpathref="classpath" 
fork="true" maxmemory="1g">
+                       <arg line="--JLD" />
+                       <arg line="${jar}/${projectName}.jar" />
+                       <arg line="-vt" />
+                       <arg line="5000" />
+               </java>
+       </target>
 
 
-     <target name = "run_release" depends="jar_release" description = "Run 
release">
-      <java classname = "cytoscape.CyMain" classpathref = "classpath_release"
-          fork = "true" maxmemory = "1g">
-         <arg line = "--JLD"/>
-         <arg line = "${jar}/ShortestPath.jar"/>
-         <arg line = "--JLD"/>
-         <arg line = "${cytoscape.plugin.release}"/>
-         <arg line = "-vt"/>
-         <arg line = "5000"/>
-      </java>
-    </target>
+       <!-- Target to Run JavaDoc -->
+       <target name="doc" description="Runs JavaDoc.">
+               <javadoc packagenames="cytoscape.groups.results.*" 
sourcepath="src" source="1.5" destdir="doc" classpathref="classpath_release">
+                       <link href="http://java.sun.com/j2se/1.5.0/docs/api/"; />
+                       <link href="http://csbi.sourceforge.net/API/"; />
+                       <link 
href="http://chianti.ucsd.edu/Cyto-2_4_1/javadoc/"; />
+               </javadoc>
+       </target>
 
-   <!-- Target to Run JavaDoc -->
-    <target name="doc" description="Runs JavaDoc.">
-        <javadoc packagenames="ShortestPath.*" sourcepath="src" source="1.5" 
destdir="doc">
-        <link href = "http://java.sun.com/j2se/1.4.2/docs/api/"/>
-        <link href = "http://csbi.sourceforge.net/API/"/>
-       </javadoc>
-    </target>
-
 </project>

Added: csplugins/trunk/ucsd/kono/ShortestPath2/resources/plugin.props
===================================================================
--- csplugins/trunk/ucsd/kono/ShortestPath2/resources/plugin.props              
                (rev 0)
+++ csplugins/trunk/ucsd/kono/ShortestPath2/resources/plugin.props      
2009-07-20 19:37:13 UTC (rev 17489)
@@ -0,0 +1,34 @@
+#plugin.props 
+
+# This props file should be filled out and included in the plugin jar file.  
This props file will be used 
+# to put information into the Plugin Manager about the plugin 
+
+# -- The following properties are REQUIRED -- #
+
+# The plugin name that will be displayed to users
+pluginName=networkBrowser
+
+# Description used to give users information about the plugin such as what it 
does.  
+# Html tags are encouraged for formatting purposes.
+pluginDescription=Displays a list of groups created in a results panel.
+
+# Plugin version number, this must be two numbers separated by a decimlal.  
Ex. 0.2, 14.03
+pluginVersion=1.0
+
+# Compatible Cytoscape version
+cytoscapeVersion=2.6
+
+# Category, use one of the categories listed on the website or create your own
+pluginCategory=Other
+
+# -- The following properties are OPTIONAL -- #
+
+# URL to a website that gives more information about your plugin, Ex. 
http://my-lab-site.org
+projectURL=http://cytoscape.org
+
+# List of authors.  Note each author and institution pair are separated by a : 
(colon)
+# each additional author institution pair must be separated from other pairs 
bye a ; (semicolon)
+pluginAuthorsIntsitutions=Keiichiro Ono:UCSD
+
+# Date this plugin/plugin version was released
+releaseDate=July 1, 2009

Copied: csplugins/trunk/ucsd/kono/ShortestPath2/src/org (from rev 17487, 
csplugins/trunk/ucsd/kono/ShortestPath2/org)

Deleted: 
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/ShortestPathDialog.java
===================================================================
--- 
csplugins/trunk/ucsd/kono/ShortestPath2/org/cytoscape/analysis/shortestpath/ShortestPathDialog.java
 2009-07-20 19:27:41 UTC (rev 17487)
+++ 
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/ShortestPathDialog.java
     2009-07-20 19:37:13 UTC (rev 17489)
@@ -1,100 +0,0 @@
-package org.cytoscape.analysis.shortestpath;
-
-
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.*;
-import javax.swing.WindowConstants.*;
-import javax.swing.border.*;
-import java.awt.Frame;
-import java.awt.GridLayout;
-import java.awt.event.*;
-
-import cytoscape.Cytoscape;
-import cytoscape.data.CyAttributes;
-import cytoscape.view.CyNetworkView;
-import cytoscape.plugin.CytoscapePlugin;
-
-/**
- * Plugin for Cytoscape to find the shortest path between 2 nodes in a network.
- * It is possible to find the shortest path in directed and undirected networks
- * 
- * @author mrsva
- *
- */
-public class ShortestPathDialog extends JDialog implements ActionListener {
-       String selectedAttribute = null;
-       JCheckBox dirButton;
-       JCheckBox logButton;
-
-       public ShortestPathDialog (Frame parent, String attribute) {
-               super(parent, false);
-               this.selectedAttribute = attribute;
-               setDefaultCloseOperation(DISPOSE_ON_CLOSE);
-               setTitle("Find Shorted Path using "+selectedAttribute);
-
-               JPanel dataPanel = new JPanel();
-               BoxLayout layout = new BoxLayout(dataPanel, 
BoxLayout.PAGE_AXIS);
-    dataPanel.setLayout(layout);
-
-               JPanel checkBoxes = new JPanel(new GridLayout(2,1));
-               // Set up our radio buttons (Directed vs Undirected)
-               dirButton = new JCheckBox("Calculate path assuming directed 
edges");
-               dirButton.setSelected(false);
-               checkBoxes.add(dirButton);
-
-               logButton = new JCheckBox("Weights are expectation values (will 
use negative log)");
-               {
-                       logButton.setSelected(false);
-                       checkBoxes.add(logButton);
-                       // Is the negative log option available?
-                       CyAttributes EdgeAttributes = 
Cytoscape.getEdgeAttributes();
-                       byte type = EdgeAttributes.getType(selectedAttribute);
-                       if(type == EdgeAttributes.TYPE_INTEGER) {
-                               // No
-                               logButton.setEnabled(false);
-                       }
-               }
-               checkBoxes.add(logButton);
-               checkBoxes.setBorder(new CompoundBorder(
-                  BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
-                  new EmptyBorder(10,10,10,10)));
-
-               dataPanel.add(checkBoxes);
-
-    // Create the button box
-    JPanel buttonBox = new JPanel();
-    JButton doneButton = new JButton("Done");
-    doneButton.setActionCommand("done");
-    doneButton.addActionListener(this);
-
-    JButton findButton = new JButton("Find Shortest Path");
-    findButton.setActionCommand("find");
-    findButton.addActionListener(this);
-    buttonBox.add(doneButton);
-    buttonBox.add(findButton);
-    
buttonBox.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
-
-    dataPanel.add(buttonBox);
-    setContentPane(dataPanel);
-       }
-       
-       public void actionPerformed(ActionEvent e) {
-               if ("done".equals(e.getActionCommand())) {
-                       setVisible(false);
-               } else if ("find".equals(e.getActionCommand())) {
-                       ShortestPath sp = new ShortestPath();
-                       if (logButton.isSelected()) {
-                               sp.setNegativeLog(true);
-                       } else {
-                               sp.setNegativeLog(false);
-                       }
-                       if (dirButton.isSelected()) {
-                               sp.calculate(true,selectedAttribute); 
-                       } else {
-                               sp.calculate(false,selectedAttribute); 
-                       }
-               }
-       }
-}

Modified: 
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/ShortestPathPlugin.java
===================================================================
--- 
csplugins/trunk/ucsd/kono/ShortestPath2/org/cytoscape/analysis/shortestpath/ShortestPathPlugin.java
 2009-07-20 19:27:41 UTC (rev 17487)
+++ 
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/ShortestPathPlugin.java
     2009-07-20 19:37:13 UTC (rev 17489)
@@ -12,6 +12,8 @@
 import javax.swing.SwingUtilities;
 import javax.swing.JOptionPane;
 
+import org.cytoscape.analysis.shortestpath.internal.ShortestPathDialog;
+
 import cytoscape.Cytoscape;
 import cytoscape.data.CyAttributes;
 import cytoscape.view.CyNetworkView;

Copied: 
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/internal/ShortestPathDialog.java
 (from rev 17487, 
csplugins/trunk/ucsd/kono/ShortestPath2/org/cytoscape/analysis/shortestpath/ShortestPathDialog.java)
===================================================================
--- 
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/internal/ShortestPathDialog.java
                            (rev 0)
+++ 
csplugins/trunk/ucsd/kono/ShortestPath2/src/org/cytoscape/analysis/shortestpath/internal/ShortestPathDialog.java
    2009-07-20 19:37:13 UTC (rev 17489)
@@ -0,0 +1,103 @@
+package org.cytoscape.analysis.shortestpath.internal;
+
+
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.*;
+import javax.swing.WindowConstants.*;
+import javax.swing.border.*;
+
+import org.cytoscape.analysis.shortestpath.ShortestPath;
+
+import java.awt.Frame;
+import java.awt.GridLayout;
+import java.awt.event.*;
+
+import cytoscape.Cytoscape;
+import cytoscape.data.CyAttributes;
+import cytoscape.view.CyNetworkView;
+import cytoscape.plugin.CytoscapePlugin;
+
+/**
+ * Plugin for Cytoscape to find the shortest path between 2 nodes in a network.
+ * It is possible to find the shortest path in directed and undirected networks
+ * 
+ * @author mrsva
+ *
+ */
+public class ShortestPathDialog extends JDialog implements ActionListener {
+       String selectedAttribute = null;
+       JCheckBox dirButton;
+       JCheckBox logButton;
+
+       public ShortestPathDialog (Frame parent, String attribute) {
+               super(parent, false);
+               this.selectedAttribute = attribute;
+               setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+               setTitle("Find Shorted Path using "+selectedAttribute);
+
+               JPanel dataPanel = new JPanel();
+               BoxLayout layout = new BoxLayout(dataPanel, 
BoxLayout.PAGE_AXIS);
+    dataPanel.setLayout(layout);
+
+               JPanel checkBoxes = new JPanel(new GridLayout(2,1));
+               // Set up our radio buttons (Directed vs Undirected)
+               dirButton = new JCheckBox("Calculate path assuming directed 
edges");
+               dirButton.setSelected(false);
+               checkBoxes.add(dirButton);
+
+               logButton = new JCheckBox("Weights are expectation values (will 
use negative log)");
+               {
+                       logButton.setSelected(false);
+                       checkBoxes.add(logButton);
+                       // Is the negative log option available?
+                       CyAttributes EdgeAttributes = 
Cytoscape.getEdgeAttributes();
+                       byte type = EdgeAttributes.getType(selectedAttribute);
+                       if(type == EdgeAttributes.TYPE_INTEGER) {
+                               // No
+                               logButton.setEnabled(false);
+                       }
+               }
+               checkBoxes.add(logButton);
+               checkBoxes.setBorder(new CompoundBorder(
+                  BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
+                  new EmptyBorder(10,10,10,10)));
+
+               dataPanel.add(checkBoxes);
+
+    // Create the button box
+    JPanel buttonBox = new JPanel();
+    JButton doneButton = new JButton("Done");
+    doneButton.setActionCommand("done");
+    doneButton.addActionListener(this);
+
+    JButton findButton = new JButton("Find Shortest Path");
+    findButton.setActionCommand("find");
+    findButton.addActionListener(this);
+    buttonBox.add(doneButton);
+    buttonBox.add(findButton);
+    
buttonBox.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
+
+    dataPanel.add(buttonBox);
+    setContentPane(dataPanel);
+       }
+       
+       public void actionPerformed(ActionEvent e) {
+               if ("done".equals(e.getActionCommand())) {
+                       setVisible(false);
+               } else if ("find".equals(e.getActionCommand())) {
+                       ShortestPath sp = new ShortestPath();
+                       if (logButton.isSelected()) {
+                               sp.setNegativeLog(true);
+                       } else {
+                               sp.setNegativeLog(false);
+                       }
+                       if (dirButton.isSelected()) {
+                               sp.calculate(true,selectedAttribute); 
+                       } else {
+                               sp.calculate(false,selectedAttribute); 
+                       }
+               }
+       }
+}


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