public class FXResizeOperation extends AbstractOperation implements ITransactionalOperation
FXResizeOperation
can be used to alter the size of a
visual
.Constructor and Description |
---|
FXResizeOperation(javafx.scene.Node visual)
Constructs a new
FXResizeOperation for the manipulation of
the given Node . |
FXResizeOperation(javafx.scene.Node visual,
double dw,
double dh)
Constructs a new
FXResizeOperation for the manipulation of
the given Node . |
FXResizeOperation(java.lang.String label,
javafx.scene.Node visual,
Dimension initialSize,
double dw,
double dh)
Constructs a new
FXResizeOperation from the given values. |
Modifier and Type | Method and Description |
---|---|
IStatus |
execute(IProgressMonitor monitor,
IAdaptable info) |
double |
getDh()
Returns the delta height that is applied when executing this operation.
|
double |
getDw()
Returns the delta width that is applied when executing this operation.
|
Dimension |
getInitialSize()
Returns the dimensions that are applied when undoing this operation.
|
javafx.scene.Node |
getVisual()
Returns the
Node that is manipulated by this operation. |
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 |
setDh(double dh)
Sets the delta height that will be applied when executing this operation
to the given value.
|
void |
setDw(double dw)
Sets the delta width that will be applied when executing this operation
to the given value.
|
IStatus |
undo(IProgressMonitor monitor,
IAdaptable info) |
addContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContext, setLabel, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContext
public FXResizeOperation(javafx.scene.Node visual)
FXResizeOperation
for the manipulation of
the given Node
.visual
- The Node
that is manipulated by this operation.public FXResizeOperation(javafx.scene.Node visual, double dw, double dh)
FXResizeOperation
for the manipulation of
the given Node
. The given delta width and height will be applied
when executing this operation.visual
- The Node
that is manipulated by this operation.dw
- The delta width that is applied when executing this operation.dh
- The delta height that is applied when executing this
operation.public FXResizeOperation(java.lang.String label, javafx.scene.Node visual, Dimension initialSize, double dw, double dh)
FXResizeOperation
from the given values.
Note that the oldLocation does include the layout-bounds minimum.label
- Descriptive title for the operation.visual
- The visual that is resized/relocated.initialSize
- The old size of the visual.dw
- The horizontal size difference.dh
- The vertical size difference.public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException
execute
in interface IUndoableOperation
execute
in class AbstractOperation
ExecutionException
public double getDh()
public double getDw()
public Dimension getInitialSize()
public javafx.scene.Node getVisual()
Node
that is manipulated by this operation.Node
that is manipulated by this operation.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 setDh(double dh)
dh
- The delta height that will be applied when executing this
operation.public void setDw(double dw)
dw
- The delta width that will be applied when executing this
operation.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.