Author: ruschein
Date: 2011-04-04 15:52:11 -0700 (Mon, 04 Apr 2011)
New Revision: 24666

Added:
   
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/shutdown/PropertyWriter.java
Log:
Work in progress.

Copied: 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/shutdown/PropertyWriter.java
 (from rev 24663, 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/io/ViewWriter.java)
===================================================================
--- 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/shutdown/PropertyWriter.java
                                (rev 0)
+++ 
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/shutdown/PropertyWriter.java
        2011-04-04 22:52:11 UTC (rev 24666)
@@ -0,0 +1,41 @@
+package org.cytoscape.internal.shutdown;
+
+
+import org.cytoscape.io.CyFileFilter;
+import org.cytoscape.io.write.AbstractCyWriter;
+import org.cytoscape.io.write.CyPropertyWriterManager;
+import org.cytoscape.io.write.CyWriter;
+import org.cytoscape.property.CyProperty;
+
+import java.io.File;
+
+
+/**
+ * A utility Task implementation that will write the specified View to the
+ * the specified image file using the specified RenderingEngine.
+ */
+public final class PropertyWriter extends 
AbstractCyWriter<CyPropertyWriterManager> {
+       private final CyProperty property;
+
+       /**
+        * @param writerManager The {@link 
org.cytoscape.io.write.PresentationWriterManager} used to determine which type 
of
+        * file should be written.
+        * @param view The View object to be written to the specified file.
+        * @param re The RenderingEngine used to generate the image to be 
written to the file.  
+        */
+       public PropertyWriter(final CyPropertyWriterManager writerManager, 
final CyProperty property) {
+               super(writerManager);
+               this.property = property;
+       }
+
+       protected String getExportFileFormat() {
+               return "props";
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       protected CyWriter getWriter(final CyFileFilter filter, final File 
file) throws Exception {
+               return writerManager.getWriter(property, filter, file);
+       }
+}

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to cytoscape-cvs@googlegroups.com.
To unsubscribe from this group, send email to 
cytoscape-cvs+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to