public class LayoutContextBehavior extends AbstractBehavior<javafx.scene.Node>
LayoutContextBehavior
is responsible for initiating layout
passes. It is only applicable to GraphContentPart
.pcs
ACTIVE_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 NodeContentPart |
getNestingPart()
Returns the
NodeContentPart that contains the nested graph to
which the getGraphLayoutContext() corresponds. |
protected ViewportModel |
getViewportModel()
|
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(java.beans.PropertyChangeEvent evt)
|
addFeedback, addFeedback, addHandles, addHandles, addPropertyChangeListener, getAdaptable, getFeedbackParts, getHandleParts, isActive, removeFeedback, removeHandles, removePropertyChangeListener, setAdaptable, switchAdaptableScopes
public void activate()
activate
in interface IActivatable
activate
in class AbstractBehavior<javafx.scene.Node>
protected void applyStaticLayout()
public void deactivate()
deactivate
in interface IActivatable
deactivate
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 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 ViewportModel getViewportModel()
ViewportModel
that is installed on the
IViewer
of the host
.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(java.beans.PropertyChangeEvent evt)
ViewportModel
of the IViewer
of the host
. Updates the layout bounds in the GraphLayoutContext
.evt
- The PropertyChangeEvent
that was fired by the
ViewportModel
.Copyright (c) 2014 itemis AG and others. All rights reserved.