Interface GroupAnnotation

All Superinterfaces:
Annotation

public interface GroupAnnotation extends 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.

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 Details

    • MEMBERS

      static final String 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

      void addMember(Annotation member)
      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

      void removeMember(Annotation member)
      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