Interface DataManipulationHandler


  • public interface DataManipulationHandler
    Handler for network chart's structure manipulation. It can react on adding, removing and editing nodes and edges.
    • Method Detail

      • onAdd

        default NetworkUpdates onAdd​(Node node,
                                     NetworkChartContext context)
        Handles event which is triggered after clicking on 'add node' button.
        Parameters:
        node - - newly created node. Usually contain only information about its coordinates on a canvas.
        context - - with additional information
        Returns:
        NetworkUpdates changes which should be applied on view.
      • onEdit

        default NetworkUpdates onEdit​(Node node,
                                      NetworkChartContext context)
        Handles event which is triggered after clicking on 'edit node' button.
        Parameters:
        node - - edited node.
        context - - with additional information
        Returns:
        NetworkUpdates changes which should be applied on view.
      • onRemove

        default NetworkUpdates onRemove​(Nodes nodes,
                                        NetworkChartContext context)
        Handles event which is triggered after clicking on 'remove nodes' button.
        Parameters:
        nodes - - list of nodes which should be removed.
        context - - with additional information
        Returns:
        NetworkUpdates changes which should be applied on view.
      • onAdd

        default NetworkUpdates onAdd​(Edge edge,
                                     NetworkChartContext context)
        Handles event which is triggered after clicking on 'add edge' button.
        Parameters:
        edge - - newly created edge.
        context - - with additional information
        Returns:
        NetworkUpdates changes which should be applied on view.
      • onEdit

        default NetworkUpdates onEdit​(EdgeUpdate edgeUpdate,
                                      NetworkChartContext context)
        Handles event which is triggered after clicking on 'edit edge' button.
        Parameters:
        edgeUpdate - - object contains information about previous connection between two nodes and current connection.
        context - - with additional information
        Returns:
        NetworkUpdates changes which should be applied on view.
      • onRemove

        default NetworkUpdates onRemove​(Edges edges,
                                        NetworkChartContext context)
        Handles event which is triggered after clicking on 'remove edges' button.
        Parameters:
        edges - - list of edges which should be removed.
        context - - with additional information
        Returns:
        NetworkUpdates changes which should be applied on view.
      • onAddNodeButtonClick

        default NetworkUpdates onAddNodeButtonClick​(ClickOnAddNodeButtonEvent event,
                                                    NetworkChartContext context)
        Handles event which is triggered after clicking on 'add node' button. The event is emit only when customAddNodeButton (on Network Chart Widget) setting is set to true.
        Parameters:
        event - - represents event which contains element which has been clicked
        context - - with additional information
        Returns:
        NetworkUpdates changes which should be applied on view.
      • onSave

        default NetworkUpdates onSave​(NetworkChartContext context)
        Handles event which is triggered after clicking on 'save' control button.
        Parameters:
        context - with additional information
      • onRefresh

        default NetworkUpdates onRefresh​(NetworkChartContext context)
        Handles event which is triggered after clicking on 'refresh' control button.
        Parameters:
        context - with additional information