public class LayoutContextBehavior extends AbstractBehavior<javafx.scene.Node>
LayoutContextBehavior is responsible for initiating layout
passes. It is only applicable to GraphContentPart.pcsACTIVE_PROPERTY| Constructor and Description |
|---|
LayoutContextBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected void |
applyStaticLayout()
Performs one layout pass using the static layout algorithm that is
configured for the layout context.
|
void |
deactivate() |
protected GraphLayoutContext |
getGraphLayoutContext()
Returns the
GraphLayoutContext that corresponds to the
host. |
GraphContentPart |
getHost() |
protected InfiniteCanvas |
getInfiniteCanvas()
|
protected NodeContentPart |
getNestingPart()
Returns the
NodeContentPart that contains the nested graph to
which the getGraphLayoutContext() corresponds. |
protected void |
onHostPropertyChange(java.beans.PropertyChangeEvent evt)
Called upon property change notifications fired by the
host. |
protected void |
onLayoutContextPropertyChange(java.beans.PropertyChangeEvent evt)
Re-layout when certain properties of the LayoutContext change:
static layout algorithm
layout bounds
|
protected void |
onNestingVisualLayoutBoundsChange(javafx.geometry.Bounds oldLayoutBounds,
javafx.geometry.Bounds newLayoutBounds)
Sets the layout bounds on the layout context for nested graphs.
|
protected void |
onViewportModelPropertyChange(javafx.geometry.Bounds oldScrollableBounds,
javafx.geometry.Bounds newScrollableBounds)
Called upon viewport bounds changes to update the layout bounds.
|
addFeedback, addFeedback, addHandles, addHandles, addPropertyChangeListener, getAdaptable, getFeedbackParts, getHandleParts, isActive, removeFeedback, removeHandles, removePropertyChangeListener, setAdaptable, switchAdaptableScopespublic void activate()
activate in interface IActivatableactivate in class AbstractBehavior<javafx.scene.Node>protected void applyStaticLayout()
public void deactivate()
deactivate in interface IActivatabledeactivate in class AbstractBehavior<javafx.scene.Node>protected GraphLayoutContext getGraphLayoutContext()
GraphLayoutContext that corresponds to the
host.GraphLayoutContext that corresponds to the
host.public GraphContentPart getHost()
getHost in interface IBehavior<javafx.scene.Node>getHost in class AbstractBehavior<javafx.scene.Node>protected InfiniteCanvas getInfiniteCanvas()
InfiniteCanvas of the IViewer of the
host.protected NodeContentPart getNestingPart()
NodeContentPart that contains the nested graph to
which the getGraphLayoutContext() corresponds.NodeContentPart that contains the nested graph to
which the getGraphLayoutContext() corresponds.protected void onHostPropertyChange(java.beans.PropertyChangeEvent evt)
host. Performs a layout pass when either the activation of the host has
finished, or the content synchronization for the host has finished.evt - The PropertyChangeEvent that was fired by the
host.protected void onLayoutContextPropertyChange(java.beans.PropertyChangeEvent evt)
evt - A PropertyChangeEvent that was fired by the layout
context.protected void onNestingVisualLayoutBoundsChange(javafx.geometry.Bounds oldLayoutBounds,
javafx.geometry.Bounds newLayoutBounds)
oldLayoutBounds - The previous nesting node's bounds.newLayoutBounds - The current nesting node's bounds.protected void onViewportModelPropertyChange(javafx.geometry.Bounds oldScrollableBounds,
javafx.geometry.Bounds newScrollableBounds)
oldScrollableBounds - The old Bounds.newScrollableBounds - The new Bounds.Copyright (c) 2014 itemis AG and others. All rights reserved.