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.

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.

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>
  • Method Details

    • 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.
    • isOn

      default boolean isOn(CyNetworkView networkView, Point2D javaPt, Point2D xformPt)
      If this task factory implements the Togglable interface then this method determines if the button or check box is on or off.
      Since:
      3.9