Author: scooter
Date: 2013-01-17 15:43:28 -0800 (Thu, 17 Jan 2013)
New Revision: 31052
Modified:
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphics.java
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
Log:
Update to CustomGraphics API to support View
Modified:
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphics.java
===================================================================
---
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphics.java
2013-01-17 22:36:24 UTC (rev 31051)
+++
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphics.java
2013-01-17 23:43:28 UTC (rev 31052)
@@ -4,17 +4,20 @@
import java.util.List;
import org.cytoscape.model.CyIdentifiable;
-import org.cytoscape.model.CyNetwork;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
/**
* Base interface for all Custom Graphics. Fundamentally, a {@link
CyCustomGraphics}
* object is a container for one or more {@link CustomGraphicLayer} objects.
It is
* the layer objects that will actually create the graphics that are used by
the
- * renderer.
+ * renderer. Implementations should identify the type of layer ({@link
CustomGraphicLayer})
+ * supported as well as the type of graphical view object (currently, only
{@link CyNode} is
+ * supported).
*
*/
-public interface CyCustomGraphics<T extends CustomGraphicLayer> {
+public interface CyCustomGraphics<T extends CustomGraphicLayer, S extends
CyIdentifiable> {
/**
* Immutable session-unique identifier of this custom graphic generated
by the
@@ -66,17 +69,17 @@
/**
* Get layers that belong to this object. Get the list of layers to be
rendered. Each
* layer is rendered in list order, which means that the layers at the
end of the list are
- * rendered last, and are therefore on top. The {@link CyNetwork} and
{@link CyIdentifiable}
- * graph object are passed in case there is information about the
network that is required
+ * rendered last, and are therefore on top. The {@link CyNetworkView}
and {@link View}
+ * graph object view are passed in case there is information about the
network that is required
* to render the layer. For example, a pie chart layer might need to
extract data from the
* {@link CyRow} for this graph object. For other layer types, this
can be safely ignored.
*
- * @param network the network the Renderer is rendering
- * @param grObject the graph object the Renderer is rendering
(currently only nodes are supported)
+ * @param networkView the network view the Renderer is rendering
+ * @param grView the graph object view the Renderer is rendering
(currently only nodes are supported)
* @return List of layer objects
*
*/
- public List<T> getLayers(CyNetwork network, CyIdentifiable grObject);
+ public List<T> getLayers(CyNetworkView networkView, View<S> grView);
/**
Modified:
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
===================================================================
---
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
2013-01-17 22:36:24 UTC (rev 31051)
+++
core3/api/branches/3.0.0-release/presentation-api/src/main/java/org/cytoscape/view/presentation/customgraphics/CyCustomGraphicsFactory.java
2013-01-17 23:43:28 UTC (rev 31052)
@@ -4,7 +4,9 @@
import java.net.URL;
import java.util.List;
+import org.cytoscape.model.CyIdentifiable;
+
/**
* This interface provides the factory to create CyCustomGraphics objects.
* CyCustomGraphicsFactory objects should be registered as services in
@@ -21,7 +23,7 @@
*
*
*/
-public interface CyCustomGraphicsFactory<T extends CustomGraphicLayer> {
+public interface CyCustomGraphicsFactory<T extends CustomGraphicLayer, S
extends CyIdentifiable> {
/**
* Return the prefix to identify this custom graphics factory. This
* is used by the passthrough mapping logic to figure out if a
@@ -49,7 +51,7 @@
* @param url the url that points to the CyCustomGraphics data
* @return the new instance, or null if URL references are not supported
*/
- public CyCustomGraphics<T> getInstance(URL url);
+ public CyCustomGraphics<T, S> getInstance(URL url);
/**
* Get a new instance of the CyCustomGraphics. The string argument may
@@ -64,14 +66,14 @@
* instance. Not all implementations will use this.
* @return the new instance
*/
- public CyCustomGraphics<T> getInstance(String input);
+ public CyCustomGraphics<T,S> getInstance(String input);
/**
* Create a new CyCustomGraphics object by parsing the string
* resulting from the toSerializableString() method. This method
* will be used to suport serialization of discrete mappings.
*/
- public CyCustomGraphics<T> parseSerializableString(String string);
+ public CyCustomGraphics<T,S> parseSerializableString(String string);
/**
* Return the class that this factory creates. This is used by the
deserialization
--
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.