|
||||||||||
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.pattern.ReconnectionFeatureForPattern
public class ReconnectionFeatureForPattern
This feature wraps the reconnection functionality of a pattern for calls of the Graphiti framework. Clients should not need to use this class directly.
Field Summary | |
---|---|
private static String |
NAME
|
private IReconnection |
pattern
|
Constructor Summary | |
---|---|
ReconnectionFeatureForPattern(IFeatureProvider fp,
IReconnection pattern)
Creates a new ReconnectionFeatureForPattern . |
Method Summary | |
---|---|
void |
canceledReconnect(IReconnectionContext context)
Will called if the connection reconnect process was canceled after dragging the start or end of the connection. |
boolean |
canExecute(IContext context)
Decides if the current feature can execute with the given context. |
boolean |
canReconnect(IReconnectionContext context)
Can reconnect. |
boolean |
canRedo(IContext context)
Decides if the processed feature can be re-done. |
boolean |
canStartReconnect(IReconnectionContext context)
Can start reconnect. |
boolean |
canUndo(IContext context)
Decides if the current feature can be undone - this is the undo of the execute operation. |
void |
execute(IContext context)
Executes the current feature with the given context. |
String |
getName()
Gets the name. |
boolean |
isAbort()
The Graphiti framework will call this method after ICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext) /
ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext) have
been called and before the actual undo/redo operation is triggered. |
void |
postReconnect(IReconnectionContext context)
Post reconnnect. |
void |
postRedo(IContext context)
This method will be called by the Graphiti framework after the EMF undo has finished. |
void |
postUndo(IContext context)
This method will be called by the Graphiti framework after the EMF undo is finished. |
void |
preReconnect(IReconnectionContext context)
Pre reconnnect. |
void |
preRedo(IContext context)
This method will be called by the Graphiti framework before the EMF undo has triggered. |
void |
preUndo(IContext context)
This method will be called by the Graphiti framework before the EMF undo is triggered. |
void |
reconnect(IReconnectionContext context)
Reconnnect. |
void |
redo(IContext context)
Deprecated. use postRedo(IContext) instead |
void |
undo(IContext context)
Deprecated. use postUndo(IContext) instead |
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
---|
addGraphicalRepresentation, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramBehavior, getFeatureProvider, getProgressCallback, getUserDecision, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, 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 |
---|
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
private IReconnection pattern
Constructor Detail |
---|
public ReconnectionFeatureForPattern(IFeatureProvider fp, IReconnection pattern)
ReconnectionFeatureForPattern
.
fp
- the feature providerpattern
- the patternMethod Detail |
---|
public boolean canReconnect(IReconnectionContext context)
IReconnection
canReconnect
in interface IReconnection
context
- the context
public void postReconnect(IReconnectionContext context)
IReconnection
postReconnect
in interface IReconnection
context
- the contextpublic void preReconnect(IReconnectionContext context)
IReconnection
preReconnect
in interface IReconnection
context
- the contextpublic void reconnect(IReconnectionContext context)
IReconnection
reconnect
in interface IReconnection
context
- the contextpublic void canceledReconnect(IReconnectionContext context)
IReconnection
canceledReconnect
in interface IReconnection
context
- the contextpublic boolean canExecute(IContext context)
IFeature
canExecute
in interface IFeature
context
- this is the general input for this method
IContext
public void execute(IContext context)
IFeature
execute
in interface IFeature
context
- this is the general input for this methodIContext
public String getName()
IName
getName
in interface IName
getName
in class AbstractFeature
public boolean isAbort()
ICustomAbortableUndoRedoFeature
ICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)
/
ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext)
have
been called and before the actual undo/redo operation is triggered. In
case this method returns true
, the operation will be
cancelled by the Graphiti framework by throwing an
OperationCanceledException
that causes am EMF revert of the
operation.
Implementing classes might e.g. set a flag in
ICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)
/
ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext)
as
cancellation indication and check that that flag here.
isAbort
in interface ICustomAbortableUndoRedoFeature
true
in case you want to cancel the current
operation, false
otherwise.public boolean canUndo(IContext context)
IFeature
canUndo
in interface ICustomUndoableFeature
canUndo
in interface ICustomUndoRedoFeature
canUndo
in interface IFeature
canUndo
in class AbstractFeature
context
- this is the general input for this method
IContext
public void preUndo(IContext context)
ICustomUndoRedoFeature
ICustomUndoRedoFeature.postUndo(IContext)
.
preUndo
in interface ICustomUndoRedoFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic void postUndo(IContext context)
ICustomUndoRedoFeature
ICustomUndoRedoFeature.preUndo(IContext)
.
postUndo
in interface ICustomUndoRedoFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic void undo(IContext context)
postUndo(IContext)
instead
ICustomUndoableFeature
undo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic boolean canRedo(IContext context)
ICustomUndoableFeature
Note that as soon as any feature reports false
here, also
all consecutive entries in the command stack are no longer reachable for
redo.
canRedo
in interface ICustomUndoableFeature
canRedo
in interface ICustomUndoRedoFeature
context
- this is the instance of the IContext
object that was
in use when executing the feature
public void preRedo(IContext context)
ICustomUndoRedoFeature
ICustomUndoRedoFeature.postRedo(IContext)
. (Usually it might be
sufficient to delegate to the execution method of the feature.)
preRedo
in interface ICustomUndoRedoFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic void postRedo(IContext context)
ICustomUndoRedoFeature
ICustomUndoRedoFeature.preRedo(IContext)
. (Usually it might be
sufficient to delegate to the execution method of the feature.)
postRedo
in interface ICustomUndoRedoFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic void redo(IContext context)
postRedo(IContext)
instead
ICustomUndoableFeature
redo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic boolean canStartReconnect(IReconnectionContext context)
IReconnection
canStartReconnect
in interface IReconnection
context
- the context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |