public class FXChangeViewportPolicy extends AbstractTransactionPolicy<javafx.scene.Node>
Constructor and Description |
---|
FXChangeViewportPolicy() |
Modifier and Type | Method and Description |
---|---|
protected ITransactionalOperation |
createOperation()
Creates an
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. |
protected FXChangeViewportOperation |
getChangeViewportOperation()
Returns an
FXChangeViewportOperation that is extracted from the
operation created by createOperation() . |
void |
scrollAbsolute(double translateX,
double translateY)
Advances the viewport's original horizontal and vertical scroll offsets
by the given values.
|
void |
scrollRelative(double deltaTranslateX,
double deltaTranslateY)
Advances the viewport transformation by the given translation values.
|
void |
zoomAbsolute(double relativeZoom,
double sceneX,
double sceneY)
Concatenates a scaling transformation to the original viewport
transformation.
|
void |
zoomRelative(double relativeZoom,
double sceneX,
double sceneY)
Concatenates a scaling transformation to the current viewport
transformation.
|
checkInitialized, commit, getOperation, init, isInitialized, locallyExecuteOperation, rollback
getAdaptable, getHost, setAdaptable
protected ITransactionalOperation createOperation()
AbstractTransactionPolicy
ITransactionalOperation
that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. The created operation should allow for
local execution
at each time.createOperation
in class AbstractTransactionPolicy<javafx.scene.Node>
ITransactionalOperation
to encapsulate all applied
changes.protected FXChangeViewportOperation getChangeViewportOperation()
FXChangeViewportOperation
that is extracted from the
operation created by createOperation()
.FXChangeViewportOperation
that is extracted from the
operation created by createOperation()
.public void scrollAbsolute(double translateX, double translateY)
translateX
- The horizontal translation delta.translateY
- The vertical translation delta.public void scrollRelative(double deltaTranslateX, double deltaTranslateY)
deltaTranslateX
- The horizontal translation delta.deltaTranslateY
- The vertical translation delta.public void zoomAbsolute(double relativeZoom, double sceneX, double sceneY)
relativeZoom
- The scale factor.sceneX
- The pivot x-coordinate.sceneY
- The pivot y-coordinate.public void zoomRelative(double relativeZoom, double sceneX, double sceneY)
relativeZoom
- The scale factor.sceneX
- The pivot x-coordinate.sceneY
- The pivot y-coordinate.Copyright (c) 2014 itemis AG and others. All rights reserved.