Interface ReconnectProvider


public interface ReconnectProvider
This interface controls a reconnect action.
  • Method Details

    • isSourceReconnectable

      boolean isSourceReconnectable(ConnectionWidget connectionWidget)
      Called for checking whether it is possible to reconnection a source of a specified connection widget.
      Parameters:
      connectionWidget - the connection widget
      Returns:
      if true, then it is possible to reconnection the source; if false, then is not allowed
    • isTargetReconnectable

      boolean isTargetReconnectable(ConnectionWidget connectionWidget)
      Called for checking whether it is possible to reconnection a target of a specified connection widget.
      Parameters:
      connectionWidget - the connection widget
      Returns:
      if true, then it is possible to reconnection the target; if false, then is not allowed
    • reconnectingStarted

      void reconnectingStarted(ConnectionWidget connectionWidget, boolean reconnectingSource)
      Called to notify about the start of reconnecting.
      Parameters:
      connectionWidget - the connection widget
      reconnectingSource - if true, then source is being reconnected; if false, then target is being reconnected
    • reconnectingFinished

      void reconnectingFinished(ConnectionWidget connectionWidget, boolean reconnectingSource)
      Called to notify about the finish of reconnecting.
      Parameters:
      connectionWidget - the connection widget
      reconnectingSource - if true, then source is being reconnected; if false, then target is being reconnected
    • isReplacementWidget

      ConnectorState isReplacementWidget(ConnectionWidget connectionWidget, Widget replacementWidget, boolean reconnectingSource)
      Called to check for possible replacement of a connection source/target. Called only when the hasCustomReplacementWidgetResolver method return false.
      Parameters:
      connectionWidget - the connection widget
      replacementWidget - the replacement widget
      reconnectingSource - if true, then source is being reconnected; if false, then target is being reconnected
    • hasCustomReplacementWidgetResolver

      boolean hasCustomReplacementWidgetResolver(Scene scene)
      Called to check whether the provider has a custom replacement widget resolver.
      Parameters:
      scene - the scene where the resolver will be called
      Returns:
      if true, then the resolveReplacementWidget method is called for resolving the replacement widget; if false, then the isReplacementWidget method is called for resolving the replacement widget
    • resolveReplacementWidget

      Widget resolveReplacementWidget(Scene scene, Point sceneLocation)
      Called to find the replacement widget of a possible connection. Called only when a hasCustomReplacementWidgetResolver returns true.
      Parameters:
      scene - the scene
      sceneLocation - the scene location
      Returns:
      the replacement widget; null if no replacement widget found
    • reconnect

      void reconnect(ConnectionWidget connectionWidget, Widget replacementWidget, boolean reconnectingSource)
      Called for replacing a source/target with a new one. This method is called only when the possible replacement is found and an user approves it.
      Parameters:
      connectionWidget - the connection widget
      replacementWidget - the replacement widget
      reconnectingSource - if true, then source is being reconnected; if false, then target is being reconnected