public interface ArrowAnnotation extends Annotation
CyNode
or a point on the canvas. The end of the
arrow will move with its source annotation or its target (unless it's target is a
point).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 | Interface and Description |
---|---|
static class |
ArrowAnnotation.AnchorType
This enum is used to indicate how the arrow is anchored to the
source or target.
|
static class |
ArrowAnnotation.ArrowEnd
This enum is used to indicate which end of the arrow the
operation is referring to.
|
BACKGROUND, CANVAS, FOREGROUND, NAME, X, Y, Z, ZOOM
Modifier and Type | Method and Description |
---|---|
ArrowAnnotation.AnchorType |
getAnchorType(ArrowAnnotation.ArrowEnd end)
Get the anchor type for one end of the arrow
|
Paint |
getArrowColor(ArrowAnnotation.ArrowEnd end)
Get the color of one end of the arrow
|
double |
getArrowSize(ArrowAnnotation.ArrowEnd end)
Get the size of one end of the arrow
|
String |
getArrowType(ArrowAnnotation.ArrowEnd end)
Get the type of one end of the arrow
|
Paint |
getLineColor()
Set the line color for this arrow
|
double |
getLineWidth()
Get the line width for this arrow
|
Annotation |
getSource()
Return the source
Annotation for this arrow. |
List<String> |
getSupportedArrows()
Get the list of supported arrow shapes
|
Object |
getTarget()
Return the target object for this arrow.
|
void |
setAnchorType(ArrowAnnotation.ArrowEnd end,
ArrowAnnotation.AnchorType type)
Set the anchor type for one end of the arrow
|
void |
setArrowColor(ArrowAnnotation.ArrowEnd end,
Paint color)
Set the color of one end of the arrow
|
void |
setArrowSize(ArrowAnnotation.ArrowEnd end,
double width)
Set the size of one end of the arrow
|
void |
setArrowType(ArrowAnnotation.ArrowEnd end,
String type)
Set the type of one end of the arrow
|
void |
setLineColor(Paint color)
Set the line color for this arrow
|
void |
setLineWidth(double width)
Set the line width for this arrow
|
void |
setSource(Annotation source)
Set the source
Annotation for this arrow. |
void |
setTarget(Annotation target)
Set the target for this arrow assuming the target is an
Annotation |
void |
setTarget(CyNode target)
Set the target for this arrow assuming the target is a
CyNode |
void |
setTarget(Point2D target)
Set the target for this arrow assuming the target is a point on the canvas
|
addArrow, getArgMap, getArrows, getCanvasName, getName, getNetworkView, getSpecificZoom, getUUID, getZoom, isSelected, moveAnnotation, removeAnnotation, removeArrow, setCanvas, setName, setSelected, setSpecificZoom, setZoom, update
Annotation getSource()
Annotation
for this arrow.Annotation
void setSource(Annotation source)
Annotation
for this arrow.source
- the Annotation
for the arrow sourceObject getTarget()
Annotation
s, CyNode
s, and arbitrary
points on the canvas.void setTarget(Annotation target)
Annotation
target
- the target for this arrowvoid setTarget(CyNode target)
CyNode
target
- the target for this arrowvoid setTarget(Point2D target)
target
- the target for this arrowdouble getLineWidth()
void setLineWidth(double width)
width
- of the line as a doublePaint getLineColor()
void setLineColor(Paint color)
color
- of the linedouble getArrowSize(ArrowAnnotation.ArrowEnd end)
end
- the end of the arrow we're getting the size forvoid setArrowSize(ArrowAnnotation.ArrowEnd end, double width)
end
- the end of the arrow we're setting the size forwidth
- the arrow sizePaint getArrowColor(ArrowAnnotation.ArrowEnd end)
end
- the end of the arrow we're getting the color forvoid setArrowColor(ArrowAnnotation.ArrowEnd end, Paint color)
end
- the end of the arrow we're setting the color forcolor
- the arrow colorList<String> getSupportedArrows()
String getArrowType(ArrowAnnotation.ArrowEnd end)
end
- the end of the arrow we're getting the size forvoid setArrowType(ArrowAnnotation.ArrowEnd end, String type)
end
- the end of the arrow we're setting the type forwidth
- the arrow sizeArrowAnnotation.AnchorType getAnchorType(ArrowAnnotation.ArrowEnd end)
end
- the end of the arrow we're getting the anchor type forvoid setAnchorType(ArrowAnnotation.ArrowEnd end, ArrowAnnotation.AnchorType type)
end
- the end of the arrow we're setting the anchor type fortype
- the anchor type for this end of the arrowCopyright 2011-2015 Cytoscape Consortium. All rights reserved.