Interface GroupAnnotation
- All Superinterfaces:
Annotation
The GroupAnnotation is a container for a collection of
annotations that should be grouped together.
A GroupAnnotation may contain members from either the foreground or background canvas. Changing the canvas of the GroupAnnotation itself will not automatically set its members to the same canvas, each annotation must have its setCanvas() method called individually.
The z-order of member annotations will automatically be set so that the annotations are adjacent within the same canvas. The AnnotationManager is free to change the z-order of annotations in order to maintain this property.
A GroupAnnotation may contain members from either the foreground or background canvas. Changing the canvas of the GroupAnnotation itself will not automatically set its members to the same canvas, each annotation must have its setCanvas() method called individually.
The z-order of member annotations will automatically be set so that the annotations are adjacent within the same canvas. The AnnotationManager is free to change the z-order of annotations in order to maintain this property.
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>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
A comma-separate list of the UUIDs of the annotations that are part of this groupFields inherited from interface org.cytoscape.view.presentation.annotations.Annotation
BACKGROUND, CANVAS, FOREGROUND, NAME, ROTATION, X, Y, Z, ZOOM
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMember(Annotation member)
Add a new annotation to the group.Return the list of members for this groupvoid
removeMember(Annotation member)
Remove an annotation from the groupMethods inherited from interface org.cytoscape.view.presentation.annotations.Annotation
addArrow, getArgMap, getArrows, getBounds, getCanvasName, getName, getNetworkView, getRotatedBounds, getRotation, getSpecificZoom, getUUID, getX, getY, getZ, getZoom, isSelected, moveAnnotation, removeAnnotation, removeArrow, setCanvas, setName, setRotation, setSelected, setSpecificZoom, setZ, setZoom, update
-
Field Details
-
MEMBERS
A comma-separate list of the UUIDs of the annotations that are part of this group- See Also:
- Constant Field Values
-
-
Method Details
-
addMember
Add a new annotation to the group.- Parameters:
member
- the annotation to add to the group- Throws:
IllegalArgumentException
- if the given Annotation is already a member of another group
-
removeMember
Remove an annotation from the group- Parameters:
member
- the annotation to be removed
-
getMembers
List<Annotation> getMembers()Return the list of members for this group- Returns:
- the list of group members
-