Interface Cy2DGraphicLayer

All Superinterfaces:
CustomGraphicLayer

public interface Cy2DGraphicLayer extends CustomGraphicLayer
Custom graphic layer interface that allows a custom graphics implementation to draw directly onto the CyNetworkView's Graphics2D object.
See Also:
CyCustomGraphics2

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

    • draw

      void draw(Graphics2D g, Shape shape, CyNetworkView networkView, View<? extends CyIdentifiable> view)
      This method is called by Cytoscape when a CyNetworkView is being updated in order to let the custom graphics draw onto its Graphics2D object.
      Parameters:
      g - The graphics object to draw onto
      shape - The node view's shape or the edge or network view's bounding box
      networkView - The network view being updated
      view - The view object that has this layer's CyCustomGraphics as a visual property value (so far, only CyNode views are supported by Cytoscape's default RenderingEngine)
    • draw

      default void draw(Graphics2D g, CyTableView tableView, CyColumn column, CyRow row)
      This method is called by Cytoscape when a CyTableView is being updated in order to let the custom graphics draw onto its cells.
      Parameters:
      g -
      networkView - The table view being updated
      column -
      row -