|
Cytoscape 3.1.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Annotation
This is the base interface for all Annotations. An annotation is a graphical object that
is displayed on the network, but is not part of the graph model. Example annotations are
shapes, text, and images that annotate the contents of the network to elucidate aspects of
the network for presentation or explanatory purposes. In general, annotations are drawn
either on top of the network (FOREGROUND
) or behind (BACKGROUND
) the network
canvas. Arg map initialization parameters (for AnnotationFactory#createAnnotation()
)
include: ZOOM
, CANVAS
, X
, and Y
.
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>
Field Summary | |
---|---|
static String |
BACKGROUND
The background canvas |
static String |
CANVAS
Arg map key to initialize the canvas to draw this annotation on |
static String |
FOREGROUND
The foreground canvas |
static String |
X
Arg map key to initialize the x location for this annotation |
static String |
Y
Arg map key to initialize the y location for this annotation |
static String |
ZOOM
Arg map key to initialize the zoom value for this annotation |
Method Summary | |
---|---|
void |
addArrow(ArrowAnnotation arrow)
Add an arrow annotation to this annotation. |
Map<String,String> |
getArgMap()
Get the argument map that is used to serialize this annotation. |
Set<ArrowAnnotation> |
getArrows()
Get all arrows that are currently linked to this annotation. |
String |
getCanvasName()
Return the canvas that this Annotation is on |
CyNetworkView |
getNetworkView()
Return the view that this Annotation is for |
double |
getSpecificZoom()
Get the specific zoom for this annotation |
double |
getZoom()
Get the current zoom for this annotation |
boolean |
isSelected()
Return true if this annotation is currently selected |
void |
moveAnnotation(Point2D location)
Move an annotation to the specified location |
void |
removeArrow(ArrowAnnotation arrow)
Remove an arrow from this annotation. |
void |
setCanvas(String canvas)
Set the canvas for this annotation. |
void |
setSelected(boolean selected)
Set the selected state for this annotation |
void |
setSpecificZoom(double zoom)
Set the specific zoom for this annotation |
void |
setZoom(double zoom)
Set the current zoom for this annotation |
Field Detail |
---|
static final String BACKGROUND
static final String FOREGROUND
static final String ZOOM
static final String CANVAS
static final String X
static final String Y
Method Detail |
---|
CyNetworkView getNetworkView()
String getCanvasName()
void setCanvas(String canvas)
canvas
- the canvas to move the annotation tovoid moveAnnotation(Point2D location)
location
- the location to move the annotation todouble getZoom()
void setZoom(double zoom)
zoom
- the zoom to setdouble getSpecificZoom()
void setSpecificZoom(double zoom)
zoom
- the specific zoom for this annotationboolean isSelected()
void setSelected(boolean selected)
selected
- select if truevoid addArrow(ArrowAnnotation arrow)
arrow
- the arrow annotation to addvoid removeArrow(ArrowAnnotation arrow)
arrow
- the arrow annotation to removeSet<ArrowAnnotation> getArrows()
Map<String,String> getArgMap()
AnnotationFactory#createAnnotation()
.
|
Cytoscape 3.1.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |