|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.features.impl.AbstractFeature
org.eclipse.graphiti.features.impl.DefaultReconnectionFeature
public class DefaultReconnectionFeature
The default implementation for the IReconnectionFeature
interface. Is
used by default by the framework for any reconnection requests triggered in
the diagram. May be subclassed and adapted by clients.
Field Summary | |
---|---|
private static String |
NAME
|
Constructor Summary | |
---|---|
DefaultReconnectionFeature(IFeatureProvider fp)
Creates a new DefaultReconnectionFeature . |
Method Summary | |
---|---|
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. |
String |
getName()
Returns the display name of the feature to use e.g. |
protected Anchor |
getNewAnchor(IReconnectionContext context)
Can be overridden by the user to influence the target anchor to use for the reconnect. |
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. |
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
---|
addGraphicalRepresentation, canUndo, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramBehavior, getFeatureProvider, getProgressCallback, getUserDecision, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, manageDefaultFont, manageDefaultFont, manageFont, manageFont, setProgressCallback, toString, updatePictogramElement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.graphiti.features.IFeature |
---|
canUndo, hasDoneChanges, isAvailable |
Methods inherited from interface org.eclipse.graphiti.IDescription |
---|
getDescription |
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
---|
getFeatureProvider |
Field Detail |
---|
private static final String NAME
Constructor Detail |
---|
public DefaultReconnectionFeature(IFeatureProvider fp)
DefaultReconnectionFeature
.
fp
- the feature provider to useMethod Detail |
---|
public boolean canReconnect(IReconnectionContext context)
IReconnectionContext
canReconnect
in interface IReconnection
context
- the context object holding all the reconnection information
true
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.protected Anchor getNewAnchor(IReconnectionContext context)
context
- the context holding the reconnection information
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 information
true
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
.
execute
in interface IFeature
context
- the context object holding all the reconnection informationIContext
public 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 anchor
true
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |