Author: mes
Date: 2009-11-23 14:03:03 -0800 (Mon, 23 Nov 2009)
New Revision: 18546

Added:
   corelibs/trunk/phoebe.dnd/
   corelibs/trunk/phoebe.dnd/build.xml
   corelibs/trunk/phoebe.dnd/lib/
   corelibs/trunk/phoebe.dnd/src/
   corelibs/trunk/phoebe.dnd/src/phoebe/
   corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropEvent.java
   corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropListener.java
   corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDroppable.java
Modified:
   corelibs/trunk/build.xml
Log:
added the phoebe dnd interfaces to corelibs

Modified: corelibs/trunk/build.xml
===================================================================
--- corelibs/trunk/build.xml    2009-11-23 22:09:33 UTC (rev 18545)
+++ corelibs/trunk/build.xml    2009-11-23 22:03:03 UTC (rev 18546)
@@ -58,6 +58,9 @@
     <ant dir="undo.support"/>
     <copy todir="${build.dir}" file="undo.support/undo.support.jar"/>
 
+    <ant dir="phoebe.dnd"/>
+    <copy todir="${build.dir}" file="phoebe.dnd/phoebe.dnd.jar"/>
+
   </target>
 
   <!-- clean all corelib projects  -->
@@ -78,6 +81,7 @@
     <ant dir="task" target="clean"/>
     <ant dir="util.intr" target="clean"/>
     <ant dir="undo.support" target="clean"/>
+    <ant dir="phoebe.dnd" target="clean"/>
     <delete dir="${build.dir}"/>
   </target>
 

Added: corelibs/trunk/phoebe.dnd/build.xml
===================================================================
--- corelibs/trunk/phoebe.dnd/build.xml                         (rev 0)
+++ corelibs/trunk/phoebe.dnd/build.xml 2009-11-23 22:03:03 UTC (rev 18546)
@@ -0,0 +1,204 @@
+
+<project name="phoebe.dnd" default="all" basedir=".">
+
+  <!-- =================================================================== -->
+  <!-- Initialization target                                               -->
+  <!-- =================================================================== -->
+  <target name="init">
+    <tstamp/>
+    <property name="name" value="phoebe.dnd"/>
+    <property name="version" value="1.0.1"/>
+
+    <echo message="Building ${name} version ${version} ..."/>
+
+    <!-- Inheritable properties -->
+    <property name="debug" value="on"/>
+    <property name="optimize" value="off"/>
+    <property name="deprecation" value="on"/>
+    <property name="fork" value="false"/>
+
+    <!-- Define the directories -->
+    <property name="root.dir" value="."/>
+    <property name="lib.dir" value="${root.dir}/lib"/>
+    <property name="src.dir" value="${root.dir}/src"/>
+    <property name="tests.dir" value="${root.dir}/tests"/>
+    <property name="build.dir" value="${root.dir}/build"/>
+    <property name="javadoc.dir" value="${root.dir}/API"/>
+    <property name="log.dir" value="${build.dir}/logs" />
+    <property name="junit.report.dir" value="${log.dir}/junit-reports" />
+
+    <!-- Define the relevant files -->
+    <property name="project.jar" value="${name}.jar"/>
+    <property name="test.jar" value="${name}-tests.jar"/>
+
+    <!-- Define the class path - Defaults to everything in the lib.dir -->
+    <path id="project.class.path">
+      <fileset dir="${lib.dir}">
+        <include name="*.jar"/>
+      </fileset>
+    </path>
+   
+    <!-- Define the junit class path - It needs to find what we just built --> 
+    <path id="junit.class.path" >
+      <fileset dir="${root.dir}">
+        <include name="*.jar"/>
+      </fileset>
+      <fileset dir="${lib.dir}">
+        <include name="*.jar"/>
+      </fileset>
+    </path>
+
+    <!-- Make sure tests is in the right place -->
+    <condition property="tests.ok">
+      <and>
+        <available file="${tests.dir}" />
+      </and>
+    </condition>
+
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Compiles the project                                                -->
+  <!-- =================================================================== -->
+  <target name="compile" 
+          depends="init" >
+    <mkdir dir="${build.dir}"/>
+    <mkdir dir="${log.dir}"/>
+    <javac srcdir="${src.dir}"
+           classpathref="project.class.path"
+           destdir="${build.dir}"
+           debug="${debug}"
+           deprecation="${deprecation}" 
+           optimize="${optimize}"
+                  source="1.5"
+           target="1.5"
+           fork="${fork}">
+<!--
+       <compilerarg line="-Xlint:all -Xlint:-path"/>
+-->
+     </javac>
+     <echo message="Successfully ran compile task!"/>
+  </target>
+
+
+  <!-- =================================================================== -->
+  <!-- Creates the project jar file                                        -->
+  <!-- =================================================================== -->
+  <target name="jar" 
+          depends="compile" >
+    <mkdir dir="${lib.dir}"/>
+    <jar destfile="${project.jar}" >
+      <fileset dir="${build.dir}"
+               includes="**"/>
+    </jar>
+    <echo message="Successfully ran jar task!"/>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Compiles the tests                                                  -->
+  <!-- Note that this compilation occurs AFTER the distribution jar has    -->
+  <!-- been created, so that the tests aren't distributed.                 -->
+  <!-- =================================================================== -->
+  <target name="compile-tests"
+          depends="jar" 
+          if="tests.ok">
+    <javac srcdir="${tests.dir}"
+           classpathref="project.class.path"
+           destdir="${build.dir}"
+           debug="${debug}"
+           deprecation="${deprecation}" 
+           optimize="${optimize}"
+           fork="${fork}">
+      <compilerarg line="-Xlint:all -Xlint:-path"/>
+    </javac>
+    <echo message="Successfully ran compile-tests task!"/>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Creates the project-tests.jar file                                  -->
+  <!-- =================================================================== -->
+  <target name="jar-tests"
+          depends="compile-tests"
+          if="tests.ok">
+    <jar jarfile="${test.jar}"
+         basedir="${build.dir}" >
+    </jar>
+    <echo message="Successfully ran jar-tests task!"/>
+  </target>
+
+
+
+  <!-- =================================================================== -->
+  <!-- Runs the unit tests.                                                --> 
+  <!-- =================================================================== -->
+  <target name="test"
+          depends="jar-tests"
+          if="tests.ok">
+    <junit printsummary="yes"
+           haltonfailure="no"
+           maxmemory="256m" >
+      <classpath refid="junit.class.path"/>
+      <formatter type="plain" 
+                 usefile="true" />
+      <formatter type="xml" 
+                 usefile="true" />
+      <batchtest fork="yes" 
+                 todir="${log.dir}" 
+                 failureProperty="junit.test.failure"
+                 errorProperty="junit.test.failure">
+        <fileset dir="${tests.dir}"
+                 includes="**/*Test.java"
+                 excludes="**/AllTests.java" />
+      </batchtest> 
+    </junit>
+    <mkdir dir="${junit.report.dir}"/>
+    <junitreport todir="${junit.report.dir}">
+      <fileset dir="${log.dir}">
+        <include name="TEST-*.xml"/>
+      </fileset>
+      <report format="frames" todir="${junit.report.dir}"/>
+    </junitreport>
+    <fail message="TEST FAILURE!!! Details: ${junit.report.dir}/index.html"
+          if="junit.test.failure"/>
+    <echo message="Successfully ran test task!"/>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Creates the API documentation                                       -->
+  <!-- =================================================================== -->
+  <target name="docs" 
+          depends="init" > 
+    <mkdir dir="${javadoc.dir}"/>
+    <javadoc sourcepath="${src.dir}"
+             destdir="${javadoc.dir}"
+             packagenames="*"
+             classpathref="project.class.path"
+             author="true"
+             version="true"
+             use="true"
+             splitindex="true"
+             noindex="false"
+             windowtitle="${name} API"
+             doctitle="${name}" />
+    <echo message="Successfully ran docs task!"/>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Do everything                                                       --> 
+  <!-- =================================================================== -->
+  <target name="all" depends="jar,docs,test" /> 
+
+  <!-- =================================================================== -->
+  <!-- Clean up, get back to original state                                -->
+  <!-- =================================================================== -->
+  <target name="clean" 
+          depends="init">
+    <delete dir="${build.dir}"/>
+    <delete dir="${javadoc.dir}"/>
+    <delete file="${project.jar}"/>
+    <delete file="${test.jar}"/>
+    <echo message="Successfully ran clean task!"/>
+  </target>
+
+</project>
+

Added: corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropEvent.java
===================================================================
--- corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropEvent.java             
                (rev 0)
+++ corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropEvent.java     
2009-11-23 22:03:03 UTC (rev 18546)
@@ -0,0 +1,54 @@
+/*
+ * Created on Jun 13, 2005
+ *
+ * extends AWTEvent, forwards the drop event and its location. 
+ */
+package phoebe;
+
+import java.awt.*;
+import java.awt.datatransfer.Transferable;
+
+
+/**
+ * 
+ * @author ajk
+ *
+ */
+
+/**
+ * forwards the drop event and its location
+ */
+public class PhoebeCanvasDropEvent  extends AWTEvent {
+       private final static long serialVersionUID = 1213746928492377L;
+       
+       Transferable transferable;
+       Point location;
+       
+       
+       /**
+        * constructor for PhoebeCanvasDropEvent
+        * @param source the source canvas of the event
+        * @param t the transferable created by the drop event
+        * @param location the location of the drop, in terms of canvas 
coordinates
+        */
+       public PhoebeCanvasDropEvent (PhoebeCanvasDroppable source, 
Transferable t, Point location)
+       {
+               super (source, -1); // from Graphic Java, p 303
+               this.transferable = t;
+               this.location = location;
+               
+       }
+
+       /**
+        * @return Returns the location.
+        */
+       public Point getLocation() {
+               return location;
+       }
+       /**
+        * @return Returns the transferable.
+        */
+       public Transferable getTransferable() {
+               return transferable;
+       }
+}


Property changes on: 
corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropEvent.java
___________________________________________________________________
Added: svn:executable
   + *

Added: corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropListener.java
===================================================================
--- corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropListener.java          
                (rev 0)
+++ corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropListener.java  
2009-11-23 22:03:03 UTC (rev 18546)
@@ -0,0 +1,27 @@
+/*
+ * Created on Jun 13, 2005
+ *
+ * an interface for responding to PhoebeCanvasDropEvents.  
+ */
+package phoebe;
+
+import java.util.EventListener;
+
+/**
+ * @author Allan Kuchinsky
+ *
+ */
+
+/**
+ * an interface for responding to PhoebeCanvasDropEvents.  
+ */
+public interface PhoebeCanvasDropListener extends EventListener {
+
+
+       /**
+        * method for responding to a drop
+        * @param event the PhoebeCanvasDropEvent
+        */
+       void itemDropped(PhoebeCanvasDropEvent event);
+
+}


Property changes on: 
corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDropListener.java
___________________________________________________________________
Added: svn:executable
   + *

Added: corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDroppable.java
===================================================================
--- corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDroppable.java             
                (rev 0)
+++ corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDroppable.java     
2009-11-23 22:03:03 UTC (rev 18546)
@@ -0,0 +1,32 @@
+/*
+ * Created on Jun 13, 2005
+ *
+ * interface for maintaining listeners for PhoebeCanvasDropEvents.  
+ */
+package phoebe;
+
+/**
+ * @author Allan Kuchinsky
+ *
+ *
+ */
+
+ /**
+ * interface for maintaining listeners for PhoebeCanvasDropEvents.  
+ */
+public interface PhoebeCanvasDroppable {
+
+       /**
+        * 
+        * adds a PhoebeCanvasDropListener to the listener store
+        * @param l the PhoebeCanvasDropListener to be added
+        */
+       public void addPhoebeCanvasDropListener (PhoebeCanvasDropListener l);
+       
+    /**
+     * removes a PhoebeCanvasDropListener from the listener store
+     * @param l the PhoebeCanvasDropListener to be deleted
+     */
+       public void removePhoebeCanvasDropListener (PhoebeCanvasDropListener l);
+
+}


Property changes on: 
corelibs/trunk/phoebe.dnd/src/phoebe/PhoebeCanvasDroppable.java
___________________________________________________________________
Added: svn:executable
   + *

--

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


Reply via email to