Class ProjectionAnnotationModel

    • Constructor Detail

      • ProjectionAnnotationModel

        public ProjectionAnnotationModel()
        Creates a new, empty projection annotation model.
    • Method Detail

      • collapse

        public void collapse​(Annotation annotation)
        Changes the state of the given annotation to collapsed. An appropriate annotation model change event is sent out.
        Parameters:
        annotation - the annotation
      • expand

        public void expand​(Annotation annotation)
        Changes the state of the given annotation to expanded. An appropriate annotation model change event is sent out.
        Parameters:
        annotation - the annotation
      • toggleExpansionState

        public void toggleExpansionState​(Annotation annotation)
        Toggles the expansion state of the given annotation. An appropriate annotation model change event is sent out.
        Parameters:
        annotation - the annotation
      • expandAll

        public boolean expandAll​(int offset,
                                 int length)
        Expands all annotations that overlap with the given range and are collapsed.
        Parameters:
        offset - the range offset
        length - the range length
        Returns:
        true if any annotation has been expanded, false otherwise
      • collapseAll

        public boolean collapseAll​(int offset,
                                   int length)
        Collapses all annotations that overlap with the given range and are collapsed.
        Parameters:
        offset - the range offset
        length - the range length
        Returns:
        true if any annotation has been collapse, false otherwise
        Since:
        3.2
      • expandAll

        protected boolean expandAll​(int offset,
                                    int length,
                                    boolean fireModelChanged)
        Expands all annotations that overlap with the given range and are collapsed. Fires a model change event if requested.
        Parameters:
        offset - the offset of the range
        length - the length of the range
        fireModelChanged - true if a model change event should be fired, false otherwise
        Returns:
        true if any annotation has been expanded, false otherwise
      • modifyAnnotations

        public void modifyAnnotations​(Annotation[] deletions,
                                      Map<? extends Annotation,​? extends Position> additions,
                                      Annotation[] modifications)
        Modifies the annotation model.
        Parameters:
        deletions - the list of deleted annotations
        additions - the set of annotations to add together with their associated position
        modifications - the list of modified annotations