public interface Annotation
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>
Modifier and Type | Field and Description |
---|---|
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 |
NAME
Arg map key to initialize the name of this annotation
|
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 |
Z
Arg map key to initialize the z location for this annotation.
|
static String |
ZOOM
Arg map key to initialize the zoom value for this annotation
|
Modifier and Type | Method and Description |
---|---|
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
|
default String |
getName()
Get the name for this annotation.
|
CyNetworkView |
getNetworkView()
Return the view that this Annotation is for
|
double |
getSpecificZoom()
Get the specific zoom for this annotation
|
UUID |
getUUID()
Get the UUID of 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 |
removeAnnotation()
Deprecated.
Use
AnnotationManager#removeAnnotation() instead. |
void |
removeArrow(ArrowAnnotation arrow)
Remove an arrow from this annotation.
|
void |
setCanvas(String canvas)
Set the canvas for this annotation.
|
default void |
setName(String name)
Set the name 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
|
void |
update()
Update the annotation.
|
static final String BACKGROUND
static final String FOREGROUND
static final String ZOOM
static final String CANVAS
static final String X
static final String Y
static final String Z
static final String NAME
CyNetworkView getNetworkView()
String getCanvasName()
void setCanvas(String canvas)
canvas
- the canvas to move the annotation todefault String getName()
default void setName(String name)
void 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()
.UUID getUUID()
@Deprecated void removeAnnotation()
AnnotationManager#removeAnnotation()
instead.void update()
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.