Class SymbolDrawNotification
- java.lang.Object
-
- com.nomagic.magicdraw.uml.symbols.SymbolDrawNotification
-
@OpenApi public final class SymbolDrawNotification extends java.lang.Object
A manager for registeringSymbolDrawListener
. These listeners are notified when some symbol is drawn in diagram.- See Also:
SymbolDrawListener
-
-
Field Summary
Fields Modifier and Type Field Description private com.nomagic.utils.AList<SymbolDrawListener>
listeners
Listeners for symbol drawing events.
-
Constructor Summary
Constructors Modifier Constructor Description private
SymbolDrawNotification()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSymbolDrawListener(SymbolDrawListener listener)
Registers listener for symbols adding during draw operation.void
fireSymbolDrawEvent(DiagramPresentationElement diagram, PresentationElement symbol, java.lang.String actionId)
Fires symbol draw event.static SymbolDrawNotification
getSymbolDrawNotification(Project project)
Returns a shared instance of this manager for given project.void
removeSymbolDrawListener(SymbolDrawListener listener)
Unregisters listener for symbols adding during draw operation.
-
-
-
Field Detail
-
listeners
@CheckForNull private com.nomagic.utils.AList<SymbolDrawListener> listeners
Listeners for symbol drawing events.
-
-
Method Detail
-
addSymbolDrawListener
@OpenApi public void addSymbolDrawListener(SymbolDrawListener listener)
Registers listener for symbols adding during draw operation.- Parameters:
listener
- the listener to register.
-
removeSymbolDrawListener
@OpenApi public void removeSymbolDrawListener(SymbolDrawListener listener)
Unregisters listener for symbols adding during draw operation.- Parameters:
listener
- the listener to unregister.
-
fireSymbolDrawEvent
public void fireSymbolDrawEvent(DiagramPresentationElement diagram, PresentationElement symbol, java.lang.String actionId)
Fires symbol draw event.- Parameters:
diagram
- the diagram symbol was added into.symbol
- the added symbol.actionId
- the id of action used for symbol adding.
-
getSymbolDrawNotification
@OpenApi public static SymbolDrawNotification getSymbolDrawNotification(Project project)
Returns a shared instance of this manager for given project. Every project has its own notification manager.- Parameters:
project
- project to get manager for.- Returns:
- manager.
-
-