Interface Cy2DGraphicLayer
- All Superinterfaces:
CustomGraphicLayer
Custom graphic layer interface that allows a custom graphics implementation to draw directly onto the
CyNetworkView's Graphics2D object.- See Also:
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 Summary
Modifier and TypeMethodDescriptionvoiddraw(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.default voiddraw(Graphics2D g, CyTableView tableView, CyColumn column, CyRow row) This method is called by Cytoscape when aCyTableViewis being updated in order to let the custom graphics draw onto its cells.Methods inherited from interface org.cytoscape.view.presentation.customgraphics.CustomGraphicLayer
getBounds2D, getPaint, transform
-
Method Details
-
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)
-
draw
This method is called by Cytoscape when aCyTableViewis being updated in order to let the custom graphics draw onto its cells.- Parameters:
g-networkView- The table view being updatedcolumn-row-
-