Interface CustomGraphicLayer

All Known Subinterfaces:
Cy2DGraphicLayer, ImageCustomGraphicLayer, PaintedShape

public interface CustomGraphicLayer
This interface defines the minimum interface to add a custom graphics to a CyNode.

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

    • getBounds2D

      Rectangle2D getBounds2D()
      Return the bounds of the area covered by this CustomGraphicLayer as a java.awt.Rectangle2D
      Returns:
      the java.awt.Rectangle2D
    • getPaint

      Paint getPaint(Rectangle2D bounds)
      Return the Paint to be used to fill the Shape.
      Parameters:
      bounds - the bounding box of the CyNode.
      Returns:
      the fill Paint
    • transform

      Return a new CustomGraphicLayer that has been transformed by the provided AffineTransform.
      Parameters:
      xform - transform to perform on the shape
      Returns:
      the transformed CustomGraphicLayer