Interface RenderingEngine<T>

Type Parameters:
T - source data object to be visualized. For now we have only one implementation for CyNetwork, but it can be anything, including CyTable.
All Superinterfaces:
CyDisposable

public interface RenderingEngine<T> extends CyDisposable
RenderingEngine is an interface for all visualizers which renders. For a given view-model it renders actual view on display, documents, etc.

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 Details

    • getViewModel

      View<T> getViewModel()
      Returns View being rendered.
      Returns:
      view model. This is an immutable object.
    • getVisualLexicon

      VisualLexicon getVisualLexicon()
      Provide all compatible Visual Properties as a VisualLexicon.
      Returns:
      Visual Lexicon of this rendering engine.
    • getProperties

      @Deprecated default Properties getProperties()
      Deprecated.
      Get property values for the rendering engine, like LOD. Users can set each property using the setProperty method in Properties.
      Returns:
      property values.
    • createPrintable

      Printable createPrintable()
      For export image function.
      Returns:
      A Printable object suitable for submission to a printer.
    • createImage

      Image createImage(int width, int height)
      Render an Image object from current visualization.

      Note: If you would like to create an thumbnail image of a network for display in the UI then the NetworkImageFactory service provides a more lightweight and simpler API for that purpose.

      Parameters:
      width - width of the image
      height - height of the image
      Returns:
      Image object created from current window.
    • createIcon

      <V> Icon createIcon(VisualProperty<V> vp, V value, int width, int height)
      Create Icon object for the given VisualProperty value.
      Type Parameters:
      V - Data type, such as Color, String, Double, etc.
      Parameters:
      vp - VisualProperty to be rendered as Icon.
      value - Value for the Icon. For example, if V is shape, this can be rectangle, triangle, and so on.
      width - width of the icon
      height - height of the icon
      Returns:
      Icon rendered by this engine.
    • printCanvas

      void printCanvas(Graphics printCanvas)
      Render presentation on the given Java 2D Canvas.

      Note: If you would like to create an thumbnail image of a network for display in the UI then the NetworkImageFactory service provides a more lightweight and simpler API for that purpose.

      Parameters:
      printCanvas - Graphics object provided by vector
    • printCanvas

      default void printCanvas(Graphics printCanvas, Map<String,String> properties)
      Render presentation on the given Java 2D Canvas.

      Note: If you would like to create an thumbnail image of a network for display in the UI then the NetworkImageFactory service provides a more lightweight and simpler API for that purpose.

      Parameters:
      printCanvas - Graphics object provided by vector
      properties - Used to configure the rendering output.
    • getRendererId

      String getRendererId()
      This method must return the same ID which is returned by the associated implementation of NetworkViewRenderer.
      Returns:
      Must return the same value as NetworkViewRenderer.getId.