Interface ReconnectProvider
public interface ReconnectProvider
This interface controls a reconnect action.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Called to check whether the provider has a custom replacement widget resolver.isReplacementWidget
(ConnectionWidget connectionWidget, Widget replacementWidget, boolean reconnectingSource) Called to check for possible replacement of a connection source/target.boolean
isSourceReconnectable
(ConnectionWidget connectionWidget) Called for checking whether it is possible to reconnection a source of a specified connection widget.boolean
isTargetReconnectable
(ConnectionWidget connectionWidget) Called for checking whether it is possible to reconnection a target of a specified connection widget.void
reconnect
(ConnectionWidget connectionWidget, Widget replacementWidget, boolean reconnectingSource) Called for replacing a source/target with a new one.void
reconnectingFinished
(ConnectionWidget connectionWidget, boolean reconnectingSource) Called to notify about the finish of reconnecting.void
reconnectingStarted
(ConnectionWidget connectionWidget, boolean reconnectingSource) Called to notify about the start of reconnecting.resolveReplacementWidget
(Scene scene, Point sceneLocation) Called to find the replacement widget of a possible connection.
-
Method Details
-
isSourceReconnectable
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
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
Called to notify about the start of reconnecting.- Parameters:
connectionWidget
- the connection widgetreconnectingSource
- if true, then source is being reconnected; if false, then target is being reconnected
-
reconnectingFinished
Called to notify about the finish of reconnecting.- Parameters:
connectionWidget
- the connection widgetreconnectingSource
- 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 widgetreplacementWidget
- the replacement widgetreconnectingSource
- if true, then source is being reconnected; if false, then target is being reconnected
-
hasCustomReplacementWidgetResolver
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
Called to find the replacement widget of a possible connection. Called only when a hasCustomReplacementWidgetResolver returns true.- Parameters:
scene
- the scenesceneLocation
- 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 widgetreplacementWidget
- the replacement widgetreconnectingSource
- if true, then source is being reconnected; if false, then target is being reconnected
-