Package org.cytoscape.view.presentation
Interface RenderingEngine<T>
-
- Type Parameters:
T
- source data object to be visualized. For now we have only one implementation forCyNetwork
, but it can be anything, includingCyTable
.
- 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> Icon
createIcon(VisualProperty<V> vp, V value, int width, int height)
CreateIcon
object for the given VisualProperty value.Image
createImage(int width, int height)
Render an Image object from current visualization.Printable
createPrintable()
For export image function.Properties
getProperties()
Get property values for the rendering engine, like LOD.String
getRendererId()
This method must return the same ID which is returned by the associated implementation of NetworkViewRenderer.View<T>
getViewModel()
Returns View being rendered.VisualLexicon
getVisualLexicon()
Provide all compatible Visual Properties as a VisualLexicon.void
printCanvas(Graphics printCanvas)
Render presentation on the given Java 2D Canvas.-
Methods inherited from interface org.cytoscape.model.CyDisposable
dispose
-
-
-
-
Method Detail
-
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
Properties getProperties()
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.- Parameters:
width
- width of the imageheight
- height of the image- Returns:
- Image object created from current window.
-
createIcon
<V> Icon createIcon(VisualProperty<V> vp, V value, int width, int height)
CreateIcon
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 iconheight
- height of the icon- Returns:
- Icon rendered by this engine.
-
printCanvas
void printCanvas(Graphics printCanvas)
Render presentation on the given Java 2D Canvas.- Parameters:
printCanvas
- Graphics object provided by vector
-
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.
-
-