public class GraphLayoutBehavior extends AbstractLayoutBehavior
GraphLayoutBehavior is responsible for initiating layout passes.
It is only applicable to GraphPart.active, adaptableIAdaptable.Bound.Impl<T extends IAdaptable>ACTIVE_PROPERTY| Constructor and Description |
|---|
GraphLayoutBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyLayout(boolean clean,
java.lang.Object extra)
Performs one layout pass using the static layout algorithm that is
configured for the layout context.
|
protected Rectangle |
computeLayoutBounds()
Determines the layout bounds for the graph.
|
protected void |
doActivate() |
protected void |
doDeactivate() |
GraphPart |
getHost() |
protected InfiniteCanvas |
getInfiniteCanvas()
|
protected LayoutContext |
getLayoutContext()
Returns the
LayoutContext for which AbstractLayoutBehavior.preLayout() and
AbstractLayoutBehavior.postLayout() shall be called before or after a layout pass,
respectively. |
protected NodePart |
getNestingPart()
Returns the
NodePart that contains the nested graph to which the
behavior corresponds, if this behavior is related to a nested graph. |
protected void |
postLayout()
Called after a layout pass.
|
protected void |
preLayout()
Called before a layout pass.
|
protected void |
updateBounds()
Updates the bounds property from the visual (viewport or nesting node)
|
layoutLabelsactivate, activeProperty, adaptableProperty, addAnchoreds, addAnchoreds, addFeedback, addFeedback, addHandles, addHandles, clearFeedback, clearHandles, deactivate, getAdaptable, getFeedback, getFeedback, getFeedbackPartFactory, getFeedbackPartFactory, getFeedbackPerTargetSet, getHandlePartFactory, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandlespublic void applyLayout(boolean clean,
java.lang.Object extra)
clean - Whether to fully re-compute the layout or not.extra - An extra Object that is passed-on to the
ILayoutAlgorithm.protected Rectangle computeLayoutBounds()
protected void doActivate()
doActivate in class AbstractLayoutBehaviorprotected void doDeactivate()
doDeactivate in class AbstractLayoutBehaviorpublic GraphPart getHost()
getHost in interface IBehaviorgetHost in class AbstractBehaviorprotected InfiniteCanvas getInfiniteCanvas()
InfiniteCanvas of the IViewer of the
host.protected LayoutContext getLayoutContext()
AbstractLayoutBehaviorLayoutContext for which AbstractLayoutBehavior.preLayout() and
AbstractLayoutBehavior.postLayout() shall be called before or after a layout pass,
respectively.getLayoutContext in class AbstractLayoutBehaviorLayoutContext for which AbstractLayoutBehavior.preLayout() and
AbstractLayoutBehavior.postLayout() shall be called before or after a layout
pass, respectively.protected NodePart getNestingPart()
NodePart that contains the nested graph to which the
behavior corresponds, if this behavior is related to a nested graph.NodePart that contains the nested graph to which the
behavior corresponds.protected void postLayout()
AbstractLayoutBehaviorpostLayout in class AbstractLayoutBehaviorprotected void preLayout()
AbstractLayoutBehaviorpreLayout in class AbstractLayoutBehaviorprotected void updateBounds()
Copyright (c) 2014 itemis AG and others. All rights reserved.