public class FXViewportBehavior extends AbstractBehavior<javafx.scene.Node> implements java.beans.PropertyChangeListener
FXViewportBehavior
can be registered on an FXRootPart
in
order to keep the ViewportModel
in sync with the ScrollPaneEx
of the FXViewer
and vice versa.Modifier and Type | Field and Description |
---|---|
protected javafx.scene.transform.Affine |
contentsTx
The
Affine which is used to temporarily store the contents
transformation. |
pcs
ACTIVE_PROPERTY
Constructor and Description |
---|
FXViewportBehavior() |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
protected void |
applyViewport(double translateX,
double translateY,
double width,
double height,
AffineTransform contentsTransform)
Applies the given translation, size, and transformation (provided by the
ViewportModel ) to the ScrollPaneEx of the
host's FXViewer . |
void |
deactivate() |
protected ScrollPaneEx |
getScrollPane()
|
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
protected void |
setTx(javafx.scene.transform.Affine tx,
AffineTransform at)
Transfers the values of the given
AffineTransform
to the given Affine . |
addFeedback, addFeedback, addHandles, addHandles, addPropertyChangeListener, getAdaptable, getFeedbackParts, getHandleParts, getHost, isActive, removeFeedback, removeHandles, removePropertyChangeListener, setAdaptable, switchAdaptableScopes
protected final javafx.scene.transform.Affine contentsTx
Affine
which is used to temporarily store the contents
transformation.public void activate()
activate
in interface IActivatable
activate
in class AbstractBehavior<javafx.scene.Node>
protected void applyViewport(double translateX, double translateY, double width, double height, AffineTransform contentsTransform)
ViewportModel
) to the ScrollPaneEx
of the
host's
FXViewer
.translateX
- The horizontal translation.translateY
- The vertical translation.width
- The viewport width.height
- The viewport height.contentsTransform
- The contents transformation.public void deactivate()
deactivate
in interface IActivatable
deactivate
in class AbstractBehavior<javafx.scene.Node>
protected ScrollPaneEx getScrollPane()
ScrollPaneEx
of the host's
FXViewer
.public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
protected void setTx(javafx.scene.transform.Affine tx, AffineTransform at)
AffineTransform
to the given Affine
.tx
- The Affine
to which the transformation values are
transfered.at
- The AffineTransform
which is transfered.Copyright (c) 2014 itemis AG and others. All rights reserved.