Interface Cy2DGraphicLayer
-
- All Superinterfaces:
CustomGraphicLayer
public interface Cy2DGraphicLayer extends CustomGraphicLayer
Custom graphic layer interface that allows a custom graphics implementation to draw directly onto theCyNetworkView'sGraphics2Dobject.- See Also:
CyCustomGraphics2
Module:
presentation-apiTo 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 (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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddraw(Graphics2D g, Shape shape, CyNetworkView networkView, View<? extends CyIdentifiable> view)This method is called by Cytoscape when aCyNetworkViewis being updated in order to let the custom graphics draw onto itsGraphics2Dobject.-
Methods inherited from interface org.cytoscape.view.presentation.customgraphics.CustomGraphicLayer
getBounds2D, getPaint, transform
-
-
-
-
Method Detail
-
draw
void draw(Graphics2D g, Shape shape, CyNetworkView networkView, View<? extends CyIdentifiable> view)
This method is called by Cytoscape when aCyNetworkViewis being updated in order to let the custom graphics draw onto itsGraphics2Dobject.- Parameters:
g- The graphics object to draw ontoshape- The node view's shape or the edge or network view's bounding boxnetworkView- The network view being updatedview- The view object that has this layer'sCyCustomGraphicsas a visual property value (so far, only CyNode views are supported by Cytoscape's defaultRenderingEngine)
-
-