站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ReconnectProvider (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.action
Interface ReconnectProvider


public interface ReconnectProvider

This interface controls a reconnect action.


Method Summary
 boolean hasCustomReplacementWidgetResolver(Scene scene)
          Called to check whether the provider has a custom replacement widget resolver.
 ConnectorState 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.
 Widget resolveReplacementWidget(Scene scene, Point sceneLocation)
          Called to find the replacement widget of a possible connection.
 

Method Detail

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

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.