Class AbstractCanvasHandler<D extends org.kie.workbench.common.stunner.core.diagram.Diagram,​C extends AbstractCanvas>

  • Type Parameters:
    D - The diagram type.
    C - The handled canvas type.
    All Implemented Interfaces:
    org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D,​C>, org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener>, org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener>
    Direct Known Subclasses:
    BaseCanvasHandler

    public abstract class AbstractCanvasHandler<D extends org.kie.workbench.common.stunner.core.diagram.Diagram,​C extends AbstractCanvas>
    extends Object
    implements org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D,​C>, org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener>, org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener>
    This type is the canvas handler type used as default by Stunner, most of the component implementations rely on this public API handler type. If you need to provide a custom canvas handler for you Definition Set, is a good idea to create the handler as a subtype for AbstractCanvasHandler, so most of the different IOC resolutions that Stunner requires on other areas will be, at least, resolved with the default implementations that rely on subtypes for AbstractCanvasHandler.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void addChild​(org.kie.workbench.common.stunner.core.graph.Element parent, org.kie.workbench.common.stunner.core.graph.Element child)
      This method sets the given child instance as children for the given given parent instance.
      abstract void addChild​(org.kie.workbench.common.stunner.core.graph.Element parent, org.kie.workbench.common.stunner.core.graph.Element child, int index)
      This method sets the given child instance as children for the given given parent instance at the given index.
      org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener> addDomainObjectListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener instance)  
      org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener> addRegistrationListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener instance)
      Adds a listener instance in order to be notified about graph element structure updates.
      abstract void applyElementMutation​(org.kie.workbench.common.stunner.core.client.shape.Shape shape, org.kie.workbench.common.stunner.core.graph.Element candidate, boolean applyPosition, boolean applyProperties, org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)  
      void applyElementMutation​(org.kie.workbench.common.stunner.core.graph.Element candidate, boolean applyPosition, boolean applyProperties, org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)  
      void applyElementMutation​(org.kie.workbench.common.stunner.core.graph.Element element, org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
      When an element has been changed, this method produces to update the handler and the canvas and mutates the shape bind to the given element using new properties and/or values.
      org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D,​C> clear()
      Clears this handler state and the handled canvas instance.
      void clearCanvas()  
      org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener> clearDomainObjectListeners()  
      org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener> clearRegistrationListeners()
      Clears all the registered listeners.
      abstract void deregister​(org.kie.workbench.common.stunner.core.client.shape.Shape shape, org.kie.workbench.common.stunner.core.graph.Element element, boolean fireEvents)  
      void deregister​(org.kie.workbench.common.stunner.core.graph.Element element)
      Deregisters an element from the graph structure and from the canvas.
      void deregister​(org.kie.workbench.common.stunner.core.graph.Element element, boolean fireEvents)
      De-registers an element from the graph structure and from the canvas.
      void destroy()
      Destroys this handler state and the handled canvas instance.
      void doBatchUpdate​(List<org.kie.workbench.common.stunner.core.graph.Element> queue)
      Does Batch update
      abstract boolean dock​(org.kie.workbench.common.stunner.core.graph.Element parent, org.kie.workbench.common.stunner.core.graph.Element child)
      This method sets the given child instance as docked child for the given given parent instance.
      abstract org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D,​C> doClear()
      Subtypes must clear this instance's state here.
      abstract void doDestroy()
      Subtypes must destroy this instance's state here.
      boolean equals​(Object o)  
      AbstractCanvas getAbstractCanvas()
      Used to avoid forcing specifying the generic for the canvas type from other beans.
      abstract org.kie.workbench.common.stunner.core.api.DefinitionManager getDefinitionManager()
      Provides a definition manager instance in this context.
      abstract Optional<org.kie.workbench.common.stunner.core.graph.Element> getElementAt​(double x, double y)
      Gets the Element at the specified Canvas coordinates
      org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext getGraphExecutionContext()
      Should return a graph execution context to perform the model updates applied by the graph command executions.
      abstract org.kie.workbench.common.stunner.core.graph.processing.index.Index<?,​?> getGraphIndex()
      Returns the graph index instance to perform lookups over the graph structure foe this canvas handler's diagram instance loaded.
      abstract org.kie.workbench.common.stunner.core.rule.RuleManager getRuleManager()
      Provides the rule manager instance.
      abstract org.kie.workbench.common.stunner.core.rule.RuleSet getRuleSet()
      Provides the ruleSet instance for this handler.
      abstract org.kie.workbench.common.stunner.core.client.shape.factory.ShapeFactory<Object,​org.kie.workbench.common.stunner.core.client.shape.Shape> getShapeFactory​(String shapeSetId)  
      abstract TextPropertyProviderFactory getTextPropertyProviderFactory()
      Provides a Text Property Provider Factory instance in this context.
      String getUuid()  
      int hashCode()  
      boolean isCanvasRoot​(org.kie.workbench.common.stunner.core.graph.Element parent)  
      void notifyCanvasClear()
      Notifies a clean canvas to the listeners.
      void notifyCanvasDomainObjectAdded​(org.kie.workbench.common.stunner.core.domainobject.DomainObject domainObject)
      Notifies CanvasDomainObjectListeners that a DomainObject has been added.
      void notifyCanvasDomainObjectClear()
      Notifies CanvasDomainObjectListeners that the Canvas has been cleared.
      void notifyCanvasDomainObjectRemoved​(org.kie.workbench.common.stunner.core.domainobject.DomainObject domainObject)
      Notifies CanvasDomainObjectListeners that a DomainObject has been removed.
      void notifyCanvasDomainObjectUpdated​(org.kie.workbench.common.stunner.core.domainobject.DomainObject domainObject)
      Notifies CanvasDomainObjectListeners that a DomainObject has been updated.
      void notifyCanvasElementAdded​(org.kie.workbench.common.stunner.core.graph.Element candidate)
      Notifies an element added to the listeners.
      void notifyCanvasElementRemoved​(org.kie.workbench.common.stunner.core.graph.Element candidate)
      Notifies an element removed to the listeners.
      void notifyCanvasElementUpdated​(org.kie.workbench.common.stunner.core.graph.Element candidate)
      Notifies an element updated to the listeners.
      void register​(String shapeSetId, org.kie.workbench.common.stunner.core.graph.Element<org.kie.workbench.common.stunner.core.graph.content.view.View<?>> candidate)
      It does: - Registers a new graph element into the structure - Creates the shape for the element to register, using the shape factory provided for the given shapeSetId value.
      void register​(org.kie.workbench.common.stunner.core.client.shape.factory.ShapeFactory<Object,​org.kie.workbench.common.stunner.core.client.shape.Shape> factory, org.kie.workbench.common.stunner.core.graph.Element<org.kie.workbench.common.stunner.core.graph.content.view.View<?>> candidate, boolean fireEvents)
      It does: - Registers a new graph element into the structure - Creates the shape for the element to register, using the given shape factory.
      abstract void register​(org.kie.workbench.common.stunner.core.client.shape.Shape shape, org.kie.workbench.common.stunner.core.graph.Element<org.kie.workbench.common.stunner.core.graph.content.view.View<?>> candidate, boolean fireEvents)  
      abstract void removeChild​(org.kie.workbench.common.stunner.core.graph.Element parent, org.kie.workbench.common.stunner.core.graph.Element child)
      This method removes the given child instance as children for the given given parent instance.
      org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener> removeDomainObjectListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener instance)  
      org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener> removeRegistrationListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener instance)
      Removes a previously register listener instance.
      void setGraphExecutionContext​(Supplier<org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext> commandExecutionContextSupplier)  
      void setStaticContext​(org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext graphContext)
      Sets the Graphic Context to be used for multiple operations
      String toString()  
      abstract void undock​(org.kie.workbench.common.stunner.core.graph.Element parent, org.kie.workbench.common.stunner.core.graph.Element child)
      This method removes the given child instance as docked child for the given given parent instance.
      void updateElementPosition​(org.kie.workbench.common.stunner.core.graph.Element element, org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
      When an element has been changed, this method produces to update the coordinates for the shape bind to the given element.
      void updateElementProperties​(org.kie.workbench.common.stunner.core.graph.Element element, org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
      When an element has been changed, this method produces to update the handler and the canvas and mutates the shape bind to the given element using new properties and/or values.
      • Methods inherited from interface org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler

        draw, getCanvas, getDiagram, handle
    • Constructor Detail

      • AbstractCanvasHandler

        public AbstractCanvasHandler()
    • Method Detail

      • getDefinitionManager

        public abstract org.kie.workbench.common.stunner.core.api.DefinitionManager getDefinitionManager()
        Provides a definition manager instance in this context.
      • getTextPropertyProviderFactory

        public abstract TextPropertyProviderFactory getTextPropertyProviderFactory()
        Provides a Text Property Provider Factory instance in this context.
      • getRuleManager

        public abstract org.kie.workbench.common.stunner.core.rule.RuleManager getRuleManager()
        Provides the rule manager instance.
      • getRuleSet

        public abstract org.kie.workbench.common.stunner.core.rule.RuleSet getRuleSet()
        Provides the ruleSet instance for this handler.
      • getGraphIndex

        public abstract org.kie.workbench.common.stunner.core.graph.processing.index.Index<?,​?> getGraphIndex()
        Returns the graph index instance to perform lookups over the graph structure foe this canvas handler's diagram instance loaded. Implementation can provide custom graph index types, if necessary targeted and optimized for a concrete graph structure.
      • getGraphExecutionContext

        public org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext getGraphExecutionContext()
        Should return a graph execution context to perform the model updates applied by the graph command executions. If the implementation is not going to perform model updates, the graph execution context can be either null or an empty context type.
      • addChild

        public abstract void addChild​(org.kie.workbench.common.stunner.core.graph.Element parent,
                                      org.kie.workbench.common.stunner.core.graph.Element child)
        This method sets the given child instance as children for the given given parent instance. It sets the shape for the child instance as child shape for the parent instance's shape.
        Parameters:
        parent - The parent graph element.
        child - The graph element to set as child.
      • addChild

        public abstract void addChild​(org.kie.workbench.common.stunner.core.graph.Element parent,
                                      org.kie.workbench.common.stunner.core.graph.Element child,
                                      int index)
        This method sets the given child instance as children for the given given parent instance at the given index. The default implementation adds the child to the parent and index is unused. The Child's Shape is also set as a sibling of the Parent Shape.
        Parameters:
        parent - The parent graph element.
        child - The graph element to set as child.
        index - The index of the child in the parent.
      • removeChild

        public abstract void removeChild​(org.kie.workbench.common.stunner.core.graph.Element parent,
                                         org.kie.workbench.common.stunner.core.graph.Element child)
        This method removes the given child instance as children for the given given parent instance. It removes the shape for the child instance as child shape for the parent instance's shape.
        Parameters:
        parent - The parent graph element.
        child - The element to remove as a child from the parent.
      • getElementAt

        public abstract Optional<org.kie.workbench.common.stunner.core.graph.Element> getElementAt​(double x,
                                                                                                   double y)
        Gets the Element at the specified Canvas coordinates
        Parameters:
        x - The X canvas coordinate
        y - The Y canvas coordinate
        Returns:
        Element at the coordinate
      • dock

        public abstract boolean dock​(org.kie.workbench.common.stunner.core.graph.Element parent,
                                     org.kie.workbench.common.stunner.core.graph.Element child)
        This method sets the given child instance as docked child for the given given parent instance. It sets the shape for the child instance as a docked child shape for the parent instance's shape.
        Parameters:
        parent - The parent graph element.
        child - The graph element to set as a docked child.
      • undock

        public abstract void undock​(org.kie.workbench.common.stunner.core.graph.Element parent,
                                    org.kie.workbench.common.stunner.core.graph.Element child)
        This method removes the given child instance as docked child for the given given parent instance. It removes the shape for the child instance as a docked child shape for the parent instance's shape.
        Parameters:
        parent - The parent graph element.
        child - The element to remove as a docked child from the parent.
      • doClear

        public abstract org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D,​C> doClear()
        Subtypes must clear this instance's state here.
      • doDestroy

        public abstract void doDestroy()
        Subtypes must destroy this instance's state here.
      • register

        public abstract void register​(org.kie.workbench.common.stunner.core.client.shape.Shape shape,
                                      org.kie.workbench.common.stunner.core.graph.Element<org.kie.workbench.common.stunner.core.graph.content.view.View<?>> candidate,
                                      boolean fireEvents)
      • deregister

        public abstract void deregister​(org.kie.workbench.common.stunner.core.client.shape.Shape shape,
                                        org.kie.workbench.common.stunner.core.graph.Element element,
                                        boolean fireEvents)
      • applyElementMutation

        public abstract void applyElementMutation​(org.kie.workbench.common.stunner.core.client.shape.Shape shape,
                                                  org.kie.workbench.common.stunner.core.graph.Element candidate,
                                                  boolean applyPosition,
                                                  boolean applyProperties,
                                                  org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
      • getShapeFactory

        public abstract org.kie.workbench.common.stunner.core.client.shape.factory.ShapeFactory<Object,​org.kie.workbench.common.stunner.core.client.shape.Shape> getShapeFactory​(String shapeSetId)
      • register

        public void register​(String shapeSetId,
                             org.kie.workbench.common.stunner.core.graph.Element<org.kie.workbench.common.stunner.core.graph.content.view.View<?>> candidate)
        It does: - Registers a new graph element into the structure - Creates the shape for the element to register, using the shape factory provided for the given shapeSetId value.
        Parameters:
        shapeSetId - The identifier for the ShapeSet to use.
        candidate - The graph element to register.
      • register

        public void register​(org.kie.workbench.common.stunner.core.client.shape.factory.ShapeFactory<Object,​org.kie.workbench.common.stunner.core.client.shape.Shape> factory,
                             org.kie.workbench.common.stunner.core.graph.Element<org.kie.workbench.common.stunner.core.graph.content.view.View<?>> candidate,
                             boolean fireEvents)
        It does: - Registers a new graph element into the structure - Creates the shape for the element to register, using the given shape factory.
        Parameters:
        factory - The shape factory to use.
        candidate - The graph element to register.
        fireEvents - If canvas and canvas handled registration events must be fired.
      • deregister

        public void deregister​(org.kie.workbench.common.stunner.core.graph.Element element)
        Deregisters an element from the graph structure and from the canvas.
        Parameters:
        element - The element to deregister and remove from the canvas.
      • deregister

        public void deregister​(org.kie.workbench.common.stunner.core.graph.Element element,
                               boolean fireEvents)
        De-registers an element from the graph structure and from the canvas.
        Parameters:
        element - The element to de-register and remove from the canvas.
        fireEvents - If canvas and canvas handled registration events must be fired.
      • applyElementMutation

        public void applyElementMutation​(org.kie.workbench.common.stunner.core.graph.Element element,
                                         org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
        When an element has been changed, this method produces to update the handler and the canvas and mutates the shape bind to the given element using new properties and/or values. This method checks all available element properties and can potentially change the shape coordinates, size,or whatever property that produces any visual effect on the canvas.
        Parameters:
        element - The element that has been updated.
        mutationContext - The context for the shape mutations.
      • updateElementPosition

        public void updateElementPosition​(org.kie.workbench.common.stunner.core.graph.Element element,
                                          org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
        When an element has been changed, this method produces to update the coordinates for the shape bind to the given element.
        Parameters:
        element - The element that has been updated.
        mutationContext - The context for the shape mutations.
      • updateElementProperties

        public void updateElementProperties​(org.kie.workbench.common.stunner.core.graph.Element element,
                                            org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
        When an element has been changed, this method produces to update the handler and the canvas and mutates the shape bind to the given element using new properties and/or values. This method checks all available element properties and can potentially change whatever property that produces any visual effect on the canvas, but no produces coordinates or bounds size updates.
        Parameters:
        element - The element that has been updated.
        mutationContext - The context for the shape mutations.
      • applyElementMutation

        public void applyElementMutation​(org.kie.workbench.common.stunner.core.graph.Element candidate,
                                         boolean applyPosition,
                                         boolean applyProperties,
                                         org.kie.workbench.common.stunner.core.client.shape.MutationContext mutationContext)
      • setGraphExecutionContext

        public void setGraphExecutionContext​(Supplier<org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext> commandExecutionContextSupplier)
      • addRegistrationListener

        public org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener> addRegistrationListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener instance)
        Adds a listener instance in order to be notified about graph element structure updates.
        Specified by:
        addRegistrationListener in interface org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<D extends org.kie.workbench.common.stunner.core.diagram.Diagram>
        Parameters:
        instance - The listener instance.
      • removeRegistrationListener

        public org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener> removeRegistrationListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener instance)
        Removes a previously register listener instance.
        Specified by:
        removeRegistrationListener in interface org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<D extends org.kie.workbench.common.stunner.core.diagram.Diagram>
        Parameters:
        instance - The listener instance.
      • clearRegistrationListeners

        public org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasElementListener> clearRegistrationListeners()
        Clears all the registered listeners.
        Specified by:
        clearRegistrationListeners in interface org.kie.workbench.common.stunner.core.client.canvas.listener.HasCanvasListeners<D extends org.kie.workbench.common.stunner.core.diagram.Diagram>
      • addDomainObjectListener

        public org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener> addDomainObjectListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener instance)
        Specified by:
        addDomainObjectListener in interface org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<D extends org.kie.workbench.common.stunner.core.diagram.Diagram>
      • removeDomainObjectListener

        public org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener> removeDomainObjectListener​(org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener instance)
        Specified by:
        removeDomainObjectListener in interface org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<D extends org.kie.workbench.common.stunner.core.diagram.Diagram>
      • clearDomainObjectListeners

        public org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<org.kie.workbench.common.stunner.core.client.canvas.listener.CanvasDomainObjectListener> clearDomainObjectListeners()
        Specified by:
        clearDomainObjectListeners in interface org.kie.workbench.common.stunner.core.client.canvas.listener.HasDomainObjectListeners<D extends org.kie.workbench.common.stunner.core.diagram.Diagram>
      • notifyCanvasElementAdded

        public void notifyCanvasElementAdded​(org.kie.workbench.common.stunner.core.graph.Element candidate)
        Notifies an element added to the listeners.
      • notifyCanvasElementRemoved

        public void notifyCanvasElementRemoved​(org.kie.workbench.common.stunner.core.graph.Element candidate)
        Notifies an element removed to the listeners.
      • setStaticContext

        public void setStaticContext​(org.kie.workbench.common.stunner.core.graph.command.GraphCommandExecutionContext graphContext)
        Sets the Graphic Context to be used for multiple operations
        Parameters:
        graphContext - Graph context to be set
      • notifyCanvasElementUpdated

        public void notifyCanvasElementUpdated​(org.kie.workbench.common.stunner.core.graph.Element candidate)
        Notifies an element updated to the listeners.
      • doBatchUpdate

        public void doBatchUpdate​(List<org.kie.workbench.common.stunner.core.graph.Element> queue)
        Does Batch update
        Parameters:
        queue - Queue to be sent to be updated
      • notifyCanvasClear

        public void notifyCanvasClear()
        Notifies a clean canvas to the listeners.
      • notifyCanvasDomainObjectAdded

        public void notifyCanvasDomainObjectAdded​(org.kie.workbench.common.stunner.core.domainobject.DomainObject domainObject)
        Notifies CanvasDomainObjectListeners that a DomainObject has been added.
      • notifyCanvasDomainObjectRemoved

        public void notifyCanvasDomainObjectRemoved​(org.kie.workbench.common.stunner.core.domainobject.DomainObject domainObject)
        Notifies CanvasDomainObjectListeners that a DomainObject has been removed.
      • notifyCanvasDomainObjectUpdated

        public void notifyCanvasDomainObjectUpdated​(org.kie.workbench.common.stunner.core.domainobject.DomainObject domainObject)
        Notifies CanvasDomainObjectListeners that a DomainObject has been updated.
      • notifyCanvasDomainObjectClear

        public void notifyCanvasDomainObjectClear()
        Notifies CanvasDomainObjectListeners that the Canvas has been cleared.
      • clearCanvas

        public void clearCanvas()
      • clear

        public org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D,​C> clear()
        Clears this handler state and the handled canvas instance. Other further diagrams can be loaded and displayed using this handler.
        Specified by:
        clear in interface org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D extends org.kie.workbench.common.stunner.core.diagram.Diagram,​C extends AbstractCanvas>
      • destroy

        public void destroy()
        Destroys this handler state and the handled canvas instance. This instance cannot be longer used and should be eligible by the garbage collector.
        Specified by:
        destroy in interface org.kie.workbench.common.stunner.core.client.canvas.CanvasHandler<D extends org.kie.workbench.common.stunner.core.diagram.Diagram,​C extends AbstractCanvas>
      • getAbstractCanvas

        public AbstractCanvas getAbstractCanvas()
        Used to avoid forcing specifying the generic for the canvas type from other beans.
      • isCanvasRoot

        public boolean isCanvasRoot​(org.kie.workbench.common.stunner.core.graph.Element parent)
      • getUuid

        public String getUuid()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object