Interface NetworkViewLocationTaskFactory

  • All Known Implementing Classes:
    AbstractNetworkViewLocationTaskFactory

    public interface NetworkViewLocationTaskFactory
    An extension of TaskFactory that provides support for tasks that need to know the a location within a CyNetworkView to perform their task. An example would be task that adds a node to a network in a specific location.

    Module: core-task-api

    To use this in your app, include the following dependency in your POM:

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>core-task-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.
    • Method Detail

      • createTaskIterator

        TaskIterator createTaskIterator​(CyNetworkView networkView,
                                        Point2D javaPt,
                                        Point2D xformPt)
        Creates a task iterator using the specified network view and points.
        Parameters:
        networkView - The network view.
        javaPt - The raw Java point within the network view.
        xformPt - The raw Java point transformed into Cytoscape coordinates.
        Returns:
        A TaskIterator object containing one or more Task objects to execute.
      • isReady

        boolean isReady​(CyNetworkView networkView,
                        Point2D javaPt,
                        Point2D xformPt)
        Returns true if this task factory is ready to produce a TaskIterator.
        Parameters:
        networkView - The network view.
        javaPt - The raw Java point within the network view.
        xformPt - The raw Java point transformed into Cytoscape coordinates.
        Returns:
        true if this task factory is ready to produce a TaskIterator.