public class LayoutContextBehavior extends AbstractBehavior<javafx.scene.Node>
LayoutContextBehavior is responsible for initiating layout
passes. It is only applicable to GraphContentPart.activePropertyACTIVE_PROPERTY| Constructor and Description |
|---|
LayoutContextBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyLayout(boolean clean)
Performs one layout pass using the static layout algorithm that is
configured for the layout context.
|
protected void |
doActivate() |
protected void |
doDeactivate() |
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 |
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.
|
activate, activeProperty, addFeedback, addHandles, deactivate, getAdaptable, getFeedbackParts, getHandleParts, isActive, removeFeedback, removeHandles, setAdaptable, switchAdaptableScopespublic void applyLayout(boolean clean)
clean - Whether to fully re-compute the layout or not.protected void doActivate()
doActivate in class AbstractBehavior<javafx.scene.Node>protected void doDeactivate()
doDeactivate 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 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.