@OpenApiAll
public class AnnotationManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
add(Annotation annotation)
Add single annotation.
|
void |
addListener(AnnotationManagerListener listener) |
java.util.Collection<BaseElement> |
getAnnotatedElements()
Returns a collection of annotated elements
|
java.util.Collection<BaseElement> |
getAnnotatedElements(Annotation.SCOPE scope) |
java.util.Collection<BaseElement> |
getAnnotatedElements(java.util.EnumSet<Annotation.SCOPE> scopes)
Returns a collection of annotated elements.
|
java.util.List<Annotation> |
getAnnotations(BaseElement element)
Get all annotations for particular element.
|
java.util.List<Annotation> |
getAnnotations(BaseElement element,
Annotation.SCOPE scope)
Get all annotations for particular element.
|
java.util.List<Annotation> |
getAnnotations(BaseElement element,
java.util.EnumSet<Annotation.SCOPE> scopes)
Get all annotations for particular element.
|
java.util.List<Annotation> |
getAnnotationsOfChildren(BaseElement element) |
java.util.List<Annotation> |
getAnnotationsOfChildren(BaseElement element,
java.util.EnumSet<Annotation.SCOPE> scopes)
Get all annotations of children of given element.
|
java.util.List<Annotation> |
getAnnotationsOfHiddenChildren(PresentationElement view)
Get all annotations of closest hidden children(recursively) of given symbol.
|
static AnnotationManager |
getInstance()
Get instance of AnnotationManager object.
|
java.util.Iterator<BaseElement> |
getIteratorOfAnnotatedElements(BaseElement owner)
Returns a collection of annotated elements
|
java.util.Iterator<Annotation> |
getIteratorOfAnnotationsOfChildren(BaseElement element) |
boolean |
hasAnnotatedChildren(BaseElement element)
Test if given element has children (recursively) with some annotations.
|
boolean |
hasAnnotatedChildren(BaseElement element,
java.util.EnumSet<Annotation.SCOPE> scopes)
Test if given element has children (recursively) with some annotations.
|
boolean |
hasAnnotations() |
boolean |
remove(Annotation annotation)
Remove single annotation.
|
void |
removeListener(AnnotationManagerListener listener) |
void |
update()
Repaint only opened diagrams of an active project
|
void |
update(java.util.Collection<Annotation> removed,
java.util.Collection<Annotation> added)
Updates annotation manager using specified data.
|
public static AnnotationManager getInstance()
public boolean add(Annotation annotation)
update()
method has been called.annotation
- annotation to addpublic boolean remove(Annotation annotation)
update()
method has been called.annotation
- annotation to removepublic boolean hasAnnotatedChildren(@CheckForNull BaseElement element)
element
- given elementpublic boolean hasAnnotatedChildren(@CheckForNull BaseElement element, java.util.EnumSet<Annotation.SCOPE> scopes)
element
- given elementpublic java.util.List<Annotation> getAnnotationsOfChildren(BaseElement element)
public java.util.List<Annotation> getAnnotationsOfChildren(BaseElement element, java.util.EnumSet<Annotation.SCOPE> scopes)
element
- given elementpublic java.util.Iterator<Annotation> getIteratorOfAnnotationsOfChildren(BaseElement element)
public java.util.List<Annotation> getAnnotationsOfHiddenChildren(PresentationElement view)
view
- symbol of starting PE. dedicated to find closest hidden elements for diagrams.public java.util.List<Annotation> getAnnotations(BaseElement element, Annotation.SCOPE scope)
element
- given elementpublic java.util.List<Annotation> getAnnotations(BaseElement element)
element
- given elementpublic java.util.List<Annotation> getAnnotations(BaseElement element, @CheckForNull java.util.EnumSet<Annotation.SCOPE> scopes)
element
- given elementpublic void update()
public java.util.Collection<BaseElement> getAnnotatedElements()
public java.util.Collection<BaseElement> getAnnotatedElements(Annotation.SCOPE scope)
public java.util.Collection<BaseElement> getAnnotatedElements(@CheckForNull java.util.EnumSet<Annotation.SCOPE> scopes)
public java.util.Iterator<BaseElement> getIteratorOfAnnotatedElements(@CheckForNull BaseElement owner)
public void update(java.util.Collection<Annotation> removed, java.util.Collection<Annotation> added)
removed
- collection of removed annotations.added
- collection of added annotations.public void addListener(AnnotationManagerListener listener)
public void removeListener(AnnotationManagerListener listener)
public boolean hasAnnotations()