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
InfiniteCanvas of the FXViewer and vice versa.pcsACTIVE_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 InfiniteCanvas of the
host's FXViewer. |
void |
deactivate() |
protected InfiniteCanvas |
getCanvas()
|
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
addFeedback, addFeedback, addHandles, addHandles, addPropertyChangeListener, getAdaptable, getFeedbackParts, getHandleParts, getHost, isActive, removeFeedback, removeHandles, removePropertyChangeListener, setAdaptable, switchAdaptableScopespublic void activate()
activate in interface IActivatableactivate in class AbstractBehavior<javafx.scene.Node>protected void applyViewport(double translateX,
double translateY,
double width,
double height,
AffineTransform contentsTransform)
ViewportModel) to the InfiniteCanvas 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 IActivatabledeactivate in class AbstractBehavior<javafx.scene.Node>protected InfiniteCanvas getCanvas()
InfiniteCanvas of the host's
FXViewer.public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerCopyright (c) 2014 itemis AG and others. All rights reserved.