public interface CyCustomGraphics<T extends CustomGraphicLayer>
CyCustomGraphics
object is a container for one or more CustomGraphicLayer
objects. It is
the layer objects that will actually create the graphics that are used by the
renderer.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>
Modifier and Type | Method and Description |
---|---|
String |
getDisplayName()
Display name is a simple description of this image object.
|
float |
getFitRatio()
Get the fit ratio for this custom graphic.
|
int |
getHeight()
Returns height of current object.
|
Long |
getIdentifier()
Immutable session-unique identifier of this custom graphic generated by the
custom graphics manager.
|
List<T> |
getLayers(CyNetworkView networkView,
View<? extends CyIdentifiable> grView)
Get layers that belong to this object.
|
Image |
getRenderedImage()
From layers of graphics objects, render a composite scaled Image object.
|
int |
getWidth()
Returns width of current object.
|
void |
setDisplayName(String displayName)
Set human readable display name.
|
void |
setFitRatio(float ratio)
Set the fit ratio for this custom graphic.
|
void |
setHeight(int height)
Set height of Custom Graphics.
|
void |
setIdentifier(Long id)
Set the session-unique identifier of this custom graphics.
|
void |
setWidth(int width)
Set width of Custom Graphics.
|
String |
toSerializableString()
Generate a string suitable for serializing the state of this
custom graphic.
|
Long getIdentifier()
void setIdentifier(Long id)
id
- Immutable ID as Long.String getDisplayName()
void setDisplayName(String displayName)
displayName
- String toSerializableString()
CyCustomGraphicsFactory#parseSerializableString()
.List<T> getLayers(CyNetworkView networkView, View<? extends CyIdentifiable> grView)
CyNetworkView
and View
graph object view are passed in case there is information about the network that is required
to render the layer. For example, a pie chart layer might need to extract data from the
CyRow
for this graph object. For other layer types, this can be safely ignored.networkView
- the network view the Renderer is renderinggrView
- the graph object view the Renderer is rendering (currently only nodes are supported)int getWidth()
int getHeight()
void setWidth(int width)
width
- void setHeight(int height)
height
- float getFitRatio()
void setFitRatio(float ratio)
ratio
- the fit ratioImage getRenderedImage()
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.