Package com.nomagic.magicdraw.ui
Class ElementActivationManager
- java.lang.Object
-
- com.nomagic.magicdraw.ui.ElementActivationManager
-
@OpenApiAll public final class ElementActivationManager extends java.lang.Object
RegisterElementActivator
instances.- See Also:
ElementActivator
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ElementActivator>
mActivators
private static ElementActivationManager
mInstance
-
Constructor Summary
Constructors Modifier Constructor Description private
ElementActivationManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
activate(Element element)
Activate given element with registered activators.void
addActivator(ElementActivator activator)
Register given activator.static ElementActivationManager
getInstance()
Get singleton instance.void
removeActivator(ElementActivator activator)
Remove given registered activator.
-
-
-
Field Detail
-
mInstance
private static final ElementActivationManager mInstance
-
mActivators
private java.util.List<ElementActivator> mActivators
-
-
Method Detail
-
getInstance
public static ElementActivationManager getInstance()
Get singleton instance.- Returns:
- manager.
-
addActivator
public void addActivator(ElementActivator activator)
Register given activator.- Parameters:
activator
- activator to register.
-
removeActivator
public void removeActivator(ElementActivator activator)
Remove given registered activator.- Parameters:
activator
- activator to remove.
-
activate
public boolean activate(Element element)
Activate given element with registered activators.- Parameters:
element
- element to activate.- Returns:
- true if activated, otherwise - false.
-
-