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. |
java.util.List<IAnchor> |
getInitialAnchors()
Returns the list of
IAnchor s which will replace the connection's
anchors upon undoing. |
java.util.List<IAnchor> |
getNewAnchors()
Returns the list of
IAnchor s 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
IAnchor s 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, setLabel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContext
public FXBendConnectionOperation(Connection connection)
IAnchor
s 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 IUndoableOperation
execute
in class AbstractOperation
ExecutionException
public Connection getConnection()
Connection
which is manipulated by this operation.Connection
which is manipulated by this operation.public java.util.List<IAnchor> getInitialAnchors()
IAnchor
s which will replace the connection's
anchors upon undoing.IAnchor
s which will replace the connection's
anchors upon undoing.public java.util.List<IAnchor> getNewAnchors()
IAnchor
s which will replace the connection's
anchors upon execution.IAnchor
s which will replace the connection's
anchors upon execution.public boolean isContentRelevant()
ITransactionalOperation
true
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 ITransactionalOperation
true
if this ITransactionalOperation
is
actually changing model data, otherwise false
.public boolean isNoOp()
ITransactionalOperation
true
if this ITransactionalOperation
has no
effect (in comparison to its initial state). Otherwise returns
false
.isNoOp
in interface ITransactionalOperation
true
if this ITransactionalOperation
has no
effect, otherwise false
.public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
redo
in interface IUndoableOperation
redo
in class AbstractOperation
ExecutionException
public void setNewAnchors(java.util.List<IAnchor> newAnchors)
IAnchor
s which will replace the connection's
anchors upon execution.newAnchors
- The list of IAnchor
s which will replace the
connection's anchors upon execution.public java.lang.String toString()
toString
in class AbstractOperation
public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
undo
in interface IUndoableOperation
undo
in class AbstractOperation
ExecutionException
Copyright (c) 2014 itemis AG and others. All rights reserved.