public interface ShapeAnnotation extends Annotation
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 |
ShapeAnnotation.ShapeType |
Modifier and Type | Field and Description |
---|---|
static String |
CUSTOMSHAPE
A flag that this is a "custom" shape
|
static String |
EDGECOLOR
The color of the border
|
static String |
EDGEOPACITY
The opacity of the border
|
static String |
EDGETHICKNESS
The thickness of the border
|
static String |
FILLCOLOR
The fill color of the shape
|
static String |
FILLOPACITY
The opacity of the shape fill
|
static String |
HEIGHT
The height of the shape
|
static String |
SHAPETYPE
The shape type
|
static String |
WIDTH
The width of the shape
|
BACKGROUND, CANVAS, FOREGROUND, NAME, X, Y, Z, ZOOM
Modifier and Type | Method and Description |
---|---|
Paint |
getBorderColor()
Get the border (stroke) color.
|
double |
getBorderOpacity()
Get the border (stroke) opacity.
|
double |
getBorderWidth()
Get the border (stroke) width.
|
Paint |
getFillColor()
Get the fill color.
|
double |
getFillOpacity()
Return the fill opacity, a value between 0.0 (fully transparent) and 100.0 (fully opaque).
|
Shape |
getShape()
Get the current shape as a
Shape object |
String |
getShapeType()
Get the current shape type as a String
|
List<String> |
getSupportedShapes()
Get the list of supported shapes.
|
void |
setBorderColor(Paint border)
Set the border (stroke) color.
|
void |
setBorderOpacity(double opacity)
Set the border (stroke) opacity.
|
void |
setBorderWidth(double width)
Set the border (stroke) width.
|
void |
setCustomShape(Shape shape)
Set a custom shape to be drawn.
|
void |
setFillColor(Paint fill)
Set the fill color.
|
void |
setFillOpacity(double opacity)
Set the fill opacity, a value between 0.0 (fully transparent) and 100.0 (fully opaque).
|
void |
setShapeType(String type)
Set the current shape type
|
void |
setSize(double width,
double height)
Set the size of the shape.
|
addArrow, getArgMap, getArrows, getCanvasName, getName, getNetworkView, getSpecificZoom, getUUID, getZoom, isSelected, moveAnnotation, removeAnnotation, removeArrow, setCanvas, setName, setSelected, setSpecificZoom, setZoom, update
static final String WIDTH
static final String HEIGHT
static final String EDGECOLOR
static final String EDGETHICKNESS
static final String EDGEOPACITY
static final String FILLCOLOR
static final String FILLOPACITY
static final String SHAPETYPE
static final String CUSTOMSHAPE
List<String> getSupportedShapes()
void setSize(double width, double height)
width
- the shape widthheight
- the shape heightString getShapeType()
void setShapeType(String type)
type
- the shape typedouble getBorderWidth()
void setBorderWidth(double width)
width
- the border widthPaint getBorderColor()
double getBorderOpacity()
Paint getFillColor()
double getFillOpacity()
void setBorderColor(Paint border)
border
- the border colorvoid setBorderOpacity(double opacity)
opacity
- the border opacityvoid setFillColor(Paint fill)
fill
- the fill colorvoid setFillOpacity(double opacity)
void setCustomShape(Shape shape)
shape
- the custom shape to be drawnCopyright 2011-2015 Cytoscape Consortium. All rights reserved.