public class GraphLayoutBehavior extends AbstractLayoutBehavior
GraphLayoutBehavior
is responsible for initiating layout passes.
It is only applicable to GraphPart
.active, adaptable
IAdaptable.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)
|
layoutLabels
activate, 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, updateHandles
public 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 AbstractLayoutBehavior
protected void doDeactivate()
doDeactivate
in class AbstractLayoutBehavior
public GraphPart getHost()
getHost
in interface IBehavior
getHost
in class AbstractBehavior
protected InfiniteCanvas getInfiniteCanvas()
InfiniteCanvas
of the IViewer
of the
host
.protected LayoutContext getLayoutContext()
AbstractLayoutBehavior
LayoutContext
for which AbstractLayoutBehavior.preLayout()
and
AbstractLayoutBehavior.postLayout()
shall be called before or after a layout pass,
respectively.getLayoutContext
in class AbstractLayoutBehavior
LayoutContext
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()
AbstractLayoutBehavior
postLayout
in class AbstractLayoutBehavior
protected void preLayout()
AbstractLayoutBehavior
preLayout
in class AbstractLayoutBehavior
protected void updateBounds()
Copyright (c) 2014 itemis AG and others. All rights reserved.