public class FXBendConnectionOperation extends AbstractOperation implements ITransactionalOperation
FXBendConnectionOperation can be used to manipulate an
Connection in an undo-context.| Constructor and Description |
|---|
FXBendConnectionOperation(Connection connection)
Constructs a new operation from the given connection.
|
| Modifier and Type | Method and Description |
|---|---|
IStatus |
execute(IProgressMonitor monitor,
IAdaptable info) |
Connection |
getConnection()
Returns the
Connection which is manipulated by this operation. |
int |
getConnectionIndex(int explicitAnchorIndex)
Returns the index within the Connection's anchors for the given explicit
anchor index.
|
java.util.List<IAnchor> |
getInitialAnchors()
Returns the list of
IAnchors which will replace the connection's
anchors upon undoing. |
java.util.List<IAnchor> |
getNewAnchors()
Returns the list of
IAnchors which will replace the connection's
anchors upon execution. |
boolean |
isContentRelevant()
Returns
true if this ITransactionalOperation is
actually changing model data (instead of only affecting the
visualization). |
boolean |
isNoOp()
Returns
true if this ITransactionalOperation has no
effect (in comparison to its initial state). |
IStatus |
redo(IProgressMonitor monitor,
IAdaptable info) |
void |
setNewAnchors(java.util.List<IAnchor> newAnchors)
Sets the list of
IAnchors which will replace the connection's
anchors upon execution. |
java.lang.String |
toString() |
IStatus |
undo(IProgressMonitor monitor,
IAdaptable info) |
addContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContext, setLabelclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContextpublic FXBendConnectionOperation(Connection connection)
IAnchors are initialized based on the connection.connection - The Connection which will be modified by this
operation.public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
execute in interface IUndoableOperationexecute in class AbstractOperationExecutionExceptionpublic Connection getConnection()
Connection which is manipulated by this operation.Connection which is manipulated by this operation.public int getConnectionIndex(int explicitAnchorIndex)
explicitAnchorIndex - The explicit anchor index for which to return the connection
index.public java.util.List<IAnchor> getInitialAnchors()
IAnchors which will replace the connection's
anchors upon undoing.IAnchors which will replace the connection's
anchors upon undoing.public java.util.List<IAnchor> getNewAnchors()
IAnchors which will replace the connection's
anchors upon execution.IAnchors which will replace the connection's
anchors upon execution.public boolean isContentRelevant()
ITransactionalOperationtrue if this ITransactionalOperation is
actually changing model data (instead of only affecting the
visualization). Otherwise returns false. The content
relevancy of an ITransactionalOperation can be checked to
determine if the execution of the operation will affect the model, for
example, to set an editor's dirty flag.isContentRelevant in interface ITransactionalOperationtrue if this ITransactionalOperation is
actually changing model data, otherwise false.public boolean isNoOp()
ITransactionalOperationtrue if this ITransactionalOperation has no
effect (in comparison to its initial state). Otherwise returns
false.isNoOp in interface ITransactionalOperationtrue if this ITransactionalOperation has no
effect, otherwise false.public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
redo in interface IUndoableOperationredo in class AbstractOperationExecutionExceptionpublic void setNewAnchors(java.util.List<IAnchor> newAnchors)
IAnchors which will replace the connection's
anchors upon execution.newAnchors - The list of IAnchors which will replace the
connection's anchors upon execution.public java.lang.String toString()
toString in class AbstractOperationpublic IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
undo in interface IUndoableOperationundo in class AbstractOperationExecutionExceptionCopyright (c) 2014 itemis AG and others. All rights reserved.