Interface Handle


  • public interface Handle
    Defines a handle, an anchor point in the edge.

    Module: presentation-api

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

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>presentation-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
    • Method Detail

      • calculateHandleLocation

        Point2D calculateHandleLocation​(CyNetworkView netView,
                                        View<CyEdge> edgeView)
        Calculate absolute position of this handle for the given edge view.
        Parameters:
        netView - graph view for this handle
        edgeView - The handle belongs to this edge view.
        Returns:
        Absolute position of this handle in the network view.
      • defineHandle

        void defineHandle​(CyNetworkView netView,
                          View<CyEdge> edgeView,
                          double x,
                          double y)
        Define this handle. Handle will be described as a relative location from source and target node. NOTE: in the implementation, the given (x, y) values will be converted to relative position. The conversion equation is exchangeable.
        Parameters:
        netView - graph view for this handle
        edgeView - The handle belongs to this edge view.
        x - Absolute value for X-location.
        y - Absolute value for Y-location.
      • getSerializableString

        String getSerializableString()
        Create string representation of this object for parsing.
        Returns:
        String representation of this Handle.