public class DefaultReconnectionFeature extends AbstractFeature implements IReconnectionFeature
IReconnectionFeature
interface. Is
used by default by the framework for any reconnection requests triggered in
the diagram. May be subclassed and adapted by clients.Constructor and Description |
---|
DefaultReconnectionFeature(IFeatureProvider fp)
Creates a new
DefaultReconnectionFeature . |
Modifier and Type | Method and Description |
---|---|
void |
canceledReconnect(IReconnectionContext context)
Called by the framework in case a started reconnection operation has been
cancelled, e.g.
|
boolean |
canExecute(IContext context)
Called by the framework to check if this feature can perform the
currently triggered reconnection request.
|
boolean |
canReconnect(IReconnectionContext context)
Called by the framework to check if this feature can perform the
currently triggered reconnection request.
|
boolean |
canStartReconnect(IReconnectionContext context)
Called by the framework after the connection has been selected.
|
void |
execute(IContext context)
Called by the framework to execute this feature to perform the currently
triggered reconnection request.
|
java.lang.String |
getName()
Returns the display name of the feature to use e.g.
|
void |
postReconnect(IReconnectionContext context)
Hook that is called by the
reconnect(IReconnectionContext)
method after the actual reconnect is done. |
void |
preReconnect(IReconnectionContext context)
Hook that is called by the
reconnect(IReconnectionContext)
method before the actual reconnect is done. |
void |
reconnect(IReconnectionContext context)
Called by the framework to perform the currently triggered reconnection
request.
|
canUndo, getDescription, getFeatureProvider, hasDoneChanges, isAvailable, manageFont, manageFont, setProgressCallback, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canUndo, hasDoneChanges, isAvailable
getDescription
getFeatureProvider
public DefaultReconnectionFeature(IFeatureProvider fp)
DefaultReconnectionFeature
.fp
- the feature provider to usepublic boolean canReconnect(IReconnectionContext context)
IReconnectionContext
canReconnect
in interface IReconnection
context
- the context object holding all the reconnection informationtrue
if the feature is able to deal with the
reconnection request, false
otherwise or if the tool
needs to prohibit the reconnection for the given situation.public final void reconnect(IReconnectionContext context)
preReconnect(IReconnectionContext)
and
postReconnect(IReconnectionContext)
hooks. The reconnect is done
by either replacing the start anchor (in case it matches the old anchor
passed in the context) or the end anchor with the new anchor.reconnect
in interface IReconnection
context
- the context object holding all the reconnection informationpublic void preReconnect(IReconnectionContext context)
reconnect(IReconnectionContext)
method before the actual reconnect is done. Can be overridden by clients
to add additional functionality.preReconnect
in interface IReconnection
context
- the context object holding all the reconnection informationpublic void postReconnect(IReconnectionContext context)
reconnect(IReconnectionContext)
method after the actual reconnect is done. Can be overridden by clients
to add additional functionality.postReconnect
in interface IReconnection
context
- the context object holding all the reconnection informationpublic boolean canExecute(IContext context)
canReconnect(IReconnectionContext)
method in case the passed
context is a IReconnectionContext
.canExecute
in interface IFeature
context
- the context object holding all the reconnection informationtrue
if the feature is able to deal with the
reconnection request, false
otherwise or if the tool
needs to prohibit the reconnection for the given situation.IContext
public void execute(IContext context)
reconnect(IReconnectionContext)
method in case the passed
context is a IReconnectionContext
.public java.lang.String getName()
getName
in interface IName
getName
in class AbstractFeature
public void canceledReconnect(IReconnectionContext context)
canceledReconnect
in interface IReconnection
context
- the context object holding all the reconnection informationpublic boolean canStartReconnect(IReconnectionContext context)
canStartReconnect
in interface IReconnection
context
- the context object holding information about the connection
and old anchortrue