Author: scooter
Date: 2012-09-14 14:18:15 -0700 (Fri, 14 Sep 2012)
New Revision: 30370
Modified:
core3/api/trunk/custom-graphics-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
Log:
Added methods to support the idea of a prefix for a CyCustomGraphicsFactory
and some support for fetching CustomGraphics data from a URL
Modified:
core3/api/trunk/custom-graphics-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
===================================================================
---
core3/api/trunk/custom-graphics-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
2012-09-14 19:46:28 UTC (rev 30369)
+++
core3/api/trunk/custom-graphics-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
2012-09-14 21:18:15 UTC (rev 30370)
@@ -1,6 +1,7 @@
package org.cytoscape.view.presentation.customgraphics;
import java.awt.Image;
+import java.net.URL;
import java.util.List;
@@ -13,6 +14,34 @@
*/
public interface CyCustomGraphicsFactory<T extends CustomGraphicLayer> {
/**
+ * Return the prefix to delineate this custom graphics factory. This
+ * is used by the passthrough mapping logic to figure out if a
+ * given String value should be mapped to this factory.
+ *
+ * @return the prefix for this CyCustomGraphics
+ */
+ public String getPrefix();
+
+ /**
+ * Given a mime type, return true if this CyCustomGraphicsFactory can
+ * utilize this type of data. If this factory doesn't support URL
+ * resources a tall, this should just always return false.
+ *
+ * @param mimeType the mime type string
+ * @return true if this mimeType is supported, false otherwise
+ */
+ public boolean supportsMime(String mimeType);
+
+ /**
+ * Get a new instance of the CyCustomGraphics based on pulling the data
+ * from a URL.
+ *
+ * @param url the url that points to the CyCustomGraphics data
+ * @return the new instance
+ */
+ public CyCustomGraphics<T> getInstance(URL url);
+
+ /**
* Get a new instance of the CyCustomGraphics. The string argument may
* be used by some implementations to create the initial graphics
objects.
* For example, a bitmap graphic implementation might use the input
argument
--
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.