public class IltCompositeGrapher extends IltcCompositeGrapher implements IltGraphicManager
IlvGrapher
for IltCompositeGraphic
objects.
It manages composite objects, each of which takes the role of either a node
or a link. It also notifies up to two IlvGraphLayouts
when some nodes or
links change.Modifier and Type | Class and Description |
---|---|
static class |
IltCompositeGrapher.LayerPolicy
This class implements the layer policy for JTGO objects.
|
Modifier and Type | Field and Description |
---|---|
protected IlvLinkLayout |
_defaultLinkLayout
This is the default link layout created for this composite grapher.
|
protected IltGrapherAdapter |
_grapherAdapter
The connection to the graph layouts.
|
protected Map |
_grapherAdapters |
protected Map |
_graphers
Only used for toplevel graphers.
|
protected IlvGraphLayout[] |
_graphLayouts
The current node layout, as specified by the user.
|
protected IlvGraphLayout |
_internalLinkLayout
The current link layout, derived from _linkLayout and _graphLayouts.
|
protected IlvGraphLayout |
_internalNodeLayout
The current node layout, derived from _graphLayouts and _linkLayout.
|
protected IlvRecursiveMultipleLayout |
_labelLayout
reference to the label layout instance
|
protected IlvDefaultLayoutProvider |
_layoutProvider
The layout provider for node and link layout.
|
protected ilog.tgo.graphic.internal.IltLinkConnectorPolicy |
_linkConnectorPolicy
The link connector policy.
|
protected IlvGraphLayout |
_linkLayout
The current link layout, as specified by the user.
|
protected boolean |
_useGraphLayoutPerObjectParameters
Indicates if per-object layout parameters are enabled
|
protected boolean |
_useLinkLayoutPerObjectParameters
Indicates if per-object layout parameters are enabled
for the link layout
|
protected static IltcLayerPolicyFactory |
DefaultLayerPolicy
This is the default layer policy factory for
IltCompositeGrapher
instances. |
protected static ilog.tgo.graphic.internal.IltLinkConnectorPolicy |
DefaultLinkConnectorPolicy
Link connector policy.
|
_context, _layerPolicy, _macroLayers, _manager, _managers, _parent
Constructor and Description |
---|
IltCompositeGrapher(IlpContext appContext,
IlvGrapher grapher)
Creates a new grapher for
IltCompositeGraphic objects. |
IltCompositeGrapher(IlpContext appContext,
IlvGrapher grapher,
boolean uniqueInIlvGrapher)
Creates a new grapher for
IltCompositeGraphic objects. |
IltCompositeGrapher(IlvGrapher grapher)
Creates a new grapher for
IltCompositeGraphic objects. |
Modifier and Type | Method and Description |
---|---|
void |
addGrapher(IltCompositeGrapher cg)
Adds a composite subgrapher to this composite grapher.
|
void |
addGraphic(IltGraphic graphic)
Inserts a new graphic representation in the list.
|
protected void |
addLayoutProxyObject(IltcCompositeGraphic graphic)
Adds a composite object's proxy object to the IlvManager.
|
void |
addSelectionListener(IltSelectionListener listener)
Adds a selection listener.
|
void |
addTreeSelectionListener(IltSelectionListener listener)
Adds a selection listener.
|
protected void |
attachLayout(IlvGraphLayout layout)
Attaches ourselves to a layout.
|
void |
clearGrapher(IltObject object) |
void |
computeGraphic(IltObject object,
Object position,
ilog.tgo.graphic.internal.IltComputeAmount amount)
Creates a graphic representation in this manager, if necessary, and
sets the object position for the graphic representation in this manager.
|
protected IltGrapherAdapter |
createDefaultGraphModel()
Creates the graph model used for the manager content.
|
IltGraphic |
createGraphic(IltObject object)
Ensures that this object has a graphic representation in a given
IltGraphicManager . |
protected void |
detachLayout(IlvGraphLayout layout)
Detaches ourselves from a layout.
|
void |
dispose()
Deprecated.
Please use the
IlpGraphView.dispose() instead. |
void |
disposeLayout()
Cleans up the internal layout structures preparing for complete
disposal.
|
protected void |
doOptimizeLayout()
Call this only when _blockingDepth == 0.
|
void |
endDelayingOptimizeLayout()
Undoes a call to
startDelayingOptimizeLayout() . |
void |
endDelayingUpdates()
Terminates delaying redraws and updates.
|
void |
fireSelectionChanged(IltCompositeGraphic graphic,
boolean selected)
Broadcasts a selection change event.
|
void |
fireSelectionEventSeriesBegin()
Broadcasts the beginning of a series of selection change events.
|
void |
fireSelectionEventSeriesEnd()
Broadcasts the end of a series of selection change events.
|
void |
fireTreeSelectionChanged(IltCompositeGraphic graphic,
boolean selected)
Broadcasts a selection change event
to this and all parent graphers.
|
void |
fireTreeSelectionEventSeriesBegin()
Broadcasts the beginning of a series of selection change events
to this and all parent graphers.
|
void |
fireTreeSelectionEventSeriesEnd()
Broadcasts the end of a series of selection change events
to this and all parent graphers.
|
static IltCompositeGrapher |
FromNetworkView(IlpGraphicView graphView)
Returns the top-level grapher of a given
IlpGraphView . |
Collection |
getAttachedNodeLayouts()
Returns the node layouts that are attached to this grapher in
the whole up hierarchy.
|
protected void |
getAttachedNodeLayouts(IltCompositeGrapher grapher,
Collection layouts,
int maxIndex)
Adds to the given layout collection that node layouts that are
configured to the given grapher recursively to the top of the
hierarchy and considering the maximum index that is already configured.
|
int |
getAutoLayoutIndex()
Returns the index of the layout that is automatically
performed for this grapher.
|
IltCompositeGraphic |
getFrom(IltCompositeGraphic link)
Deprecated.
Please use the Network Component graphic holder instead.
|
IltCompositeGrapher |
getGrapher(IltObject object)
Returns the grapher holding the graphic representation
of a given
IltObject . |
IlvGraphLayout[] |
getGraphLayouts()
Returns the layouts that have been configured to this grapher.
|
IlvGraphLayout |
getGraphLayouts(int index)
Returns the graph layout configured in the given index.
|
IlvGraphModel |
getGraphModel()
Returns the graph model used for the manager content.
|
IlvLabelLayout |
getLabelLayout()
Returns the current label layout object.
|
IltcLayerPolicy |
getLayerPolicy()
Returns the layer policy used in this instance.
|
boolean |
getLayoutVerbosity()
Returns the graph layout verbosity.
|
ilog.tgo.graphic.internal.IltLinkConnectorPolicy |
getLinkConnectorPolicy()
Returns this manager's link connector policy.
|
IlvGraphLayout |
getLinkLayout()
Deprecated.
Use
IlpGraphView instead. |
Enumeration |
getLinks()
Deprecated.
Please use the Network Component model instead.
|
IlvGraphLayout |
getNodeLayout()
Deprecated.
Use
IlpGraphView instead. |
Enumeration |
getNodes()
Deprecated.
Please use the Network Component model instead.
|
Enumeration |
getObjects()
Deprecated.
Please use the Network Component model instead.
|
IltCompositeGrapher |
getParentGrapher()
Returns the parent of this composite grapher.
|
IlvGraphModel |
getRootModel() |
IltCompositeGraphic |
getTo(IltCompositeGraphic link)
Deprecated.
Please use the Network Component graphic holder instead.
|
IltCompositeGrapher |
getTopLevelGrapher()
Returns the top-level grapher of this composite grapher.
|
void |
grapherChanged(IlvGrapher grapher) |
IlvGraphModel |
initializeLayout(IlvGraphModel model)
Initializes the layout with the given model.
|
void |
linkAdded(IltcCompositeGraphic graphic)
This function is called when a link in the manager is added.
|
void |
linkChanged(IltcCompositeGraphic graphic,
boolean mustLayout)
This function is called when a link in the manager is changed or moved.
|
void |
linkRemoved(IltcCompositeGraphic graphic)
This function is called when a link in the manager is removed.
|
protected boolean |
mustUpdateAdjacentLinks(IltcCompositeGraphic node)
Override from IltcCompositeGrapher.
|
void |
nodeAdded(IltcCompositeGraphic graphic)
This function is called when a node is added in the manager.
|
void |
nodeChanged(IltcCompositeGraphic graphic,
boolean mustLayout)
This function is called when a node in the manager is changed or moved.
|
void |
nodeRemoved(IltcCompositeGraphic graphic)
This function is called when a node in the manager is removed.
|
void |
objectChanged(IltcCompositeGraphic object,
boolean mustLayout)
This method is called when an object has changed in the composite
grapher.
|
void |
optimizeLayout()
Deprecated.
|
void |
optimizeLayoutNonAdjusting()
Optimize layout, ignoring the manager's isContentsAdjusting() state.
|
void |
performAttachedLayout(int index)
Executes the graph layout that is configured in the given index.
|
void |
performLabelLayout() |
void |
performLayoutOnce(IlvGraphLayout layout)
Deprecated.
|
void |
performLayoutOnce(IlvGraphLayout layout,
Runnable initializations)
Deprecated.
|
void |
performLayoutOnce(IlvGraphLayout layout,
Runnable initializations,
Runnable postprocessing)
Deprecated.
|
protected void |
removeAdjacentLinks(IltcCompositeGraphic node,
Vector links)
Removes a set of links, all incident with the same node, from the
grapher, and notifies the world about it.
|
void |
removeAllGraphics()
Deprecated.
Please remove all objects from the Network component model instead.
|
void |
removeGrapher(IltCompositeGrapher cg)
Removes a composite subgrapher from this composite grapher.
|
void |
removeGraphic(IltGraphic graphic)
Removes a graphic representation from the list.
|
void |
removeLinkNotify(IltcCompositeGraphic link)
Removes a link from the grapher, and notifies the world about it.
|
void |
removeSelectionListener(IltSelectionListener listener)
Removes a selection listener.
|
void |
removeTreeSelectionListener(IltSelectionListener listener)
Removes a selection listener.
|
protected void |
replaceChildGraphModel(IlvGraphModel toplevelmodel,
IltCompositeGrapher parent) |
void |
replaceGraphModel(IlvGraphModel toplevelmodel)
Replaces the layout structures according to the new graph model.
|
void |
setAutoLayoutIndex(int index)
Sets the index of the layout that is automatically performed
for this grapher.
|
void |
setGrapher(IltObject object) |
void |
setGraphLayouts(IlvGraphLayout[] layouts)
Changes the layouts that can be applied to this grapher.
|
void |
setGraphLayouts(int index,
IlvGraphLayout layout)
Sets a new layout to this grapher
|
protected void |
setInternalLayouts(IlvDefaultLayoutProvider layoutProvider)
Changes the internal layouts according to _graphLayouts, _autoLayoutIndex
and _linkLayout.
|
void |
setLabelLayout(IlvLabelLayout layout)
Attaches a label layout to this grapher, it must be an instance of
IltAnnealingLabelLayout . |
void |
setLayerPolicy(IltcLayerPolicy policy)
Changes this manager's layer policy.
|
void |
setLayoutVerbosity(boolean verbosity)
Changes the graph layout verbosity.
|
void |
setLinkConnectorPolicy(ilog.tgo.graphic.internal.IltLinkConnectorPolicy policy)
Changes this manager's link connector policy.
|
void |
setLinkLayout(IlvGraphLayout layout)
Deprecated.
|
void |
setLinkLayout(IlvGraphLayout layout,
boolean relayout)
Deprecated.
|
void |
setLinkSkeleton(IltCompositeGraphic graphic,
IlpPolyline newshape)
Deprecated.
Use the three-argument
setLinkSkeleton instead. |
void |
setLinkSkeleton(IltCompositeGraphic graphic,
IlpPolyline newshape,
IlpPositionSource reason)
Changes the shape of a link.
|
void |
setNodeLayout(IlvGraphLayout layout)
Deprecated.
|
void |
setNodeLayout(IlvGraphLayout layout,
boolean relayout)
Deprecated.
|
protected void |
setParent(IltcCompositeManager parent) |
void |
setUseGraphLayoutPerObjectParameters(boolean flag)
Indicates if per-object parameters will be used in the
graph layout configuration.
|
void |
setUseLinkLayoutPerObjectParameters(boolean flag)
Indicates if per-object parameters will be used in the
link layout configuration.
|
void |
startDelayingOptimizeLayout()
Temporarily suspends layout optimization.
|
void |
startDelayingUpdates()
Starts delaying redraws and updates.
|
void |
translateObject(IltCompositeGraphic graphic,
double dx,
double dy)
Moves a node.
|
void |
updateSubnetworkLayout(IlvGraphModel childLayoutModel)
This method is called when the composite grapher is added to the
parent hierarchy to adjust the layout information taking the
hierarchy into account.
|
addInteractiveProxyObject, addLink, addLink, addNode, addNode, addObject, applyToLayoutProxy, getAllLinks, getAllNodes, getFrom, getLinks, getLinksFrom, getLinksTo, getTo, isLink, isNode, removeInteractiveProxyObject, removeLayoutProxyObject, removeLink, removeNode, removeObject
_composeZoomTransformer, _getInverseZoomTransformer, _getZoomTransformer, _setZoomTransformer, addIlvManagerLayerBelow, addIlvManagerLayerBelow, addIlvManagerLayerOnTop, addIlvManagerLayerOnTop, addLayerAtBottom, addLayerBelow, addLayerBelow, addLayerOnTop, addLayerOnTop, addLayerOnTop, addManager, addObject, addObject, AddZoomListener, AddZoomSupport, applyToObject, applyToObject, applyToObject, applyTransformObject, ApplyTransformObject, attachView, composeInverseZoomTransformerWith, detachView, GetCompositeGraphic, GetCompositeGraphicFromProxy, GetCompositeManagers, getContext, getInsertionLayer, getInteractiveProxyLayer, getInvisibleLayer, getLayer, GetLayer, getLayerCloseBelow, getLayerCloseOnTop, getLayers, getManager, getManagers, getManagersCount, GetObject, GetObjectOnlyJTGO, getParentManager, getProxyLayer, getRelativeTransformer, getTopLevelManager, getTopLevelTransformer, getZoomPolicy, getZoomTransformer, isManaged, isVisible, isVisible, layerFullName, reDrawObject, removeLayer, removeLayer, removeManager, removeObject, RemoveZoomListener, removeZoomPolicy, RemoveZoomSupport, replaceHierarchyRoot, ReplaceHierarchyRoot, setForcedInvisible, setInsertionLayer, setVisible, setVisible, translateObject, TranslateObject, updatePositions, UpdatePositions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getZoomTransformer
protected static IltcLayerPolicyFactory DefaultLayerPolicy
IltCompositeGrapher
instances. It creates instances of IltCompositeGrapher.LayerPolicy
.protected static ilog.tgo.graphic.internal.IltLinkConnectorPolicy DefaultLinkConnectorPolicy
protected ilog.tgo.graphic.internal.IltLinkConnectorPolicy _linkConnectorPolicy
protected IlvGraphLayout[] _graphLayouts
protected IlvGraphLayout _linkLayout
This link layout may be null
if the current
attached node layout in automatic layout mode is also able
to route links.
protected IlvGraphLayout _internalNodeLayout
This is node layout that is executed in automatic mode.
protected IlvGraphLayout _internalLinkLayout
This is the link layout that is executed in automatic mode.
protected IlvLinkLayout _defaultLinkLayout
protected IlvDefaultLayoutProvider _layoutProvider
IlvMultipleLayout
,
where the first graph layout corresponds to the node layout
and the second graph layout corresponds to the link layout.protected boolean _useGraphLayoutPerObjectParameters
protected boolean _useLinkLayoutPerObjectParameters
protected IltGrapherAdapter _grapherAdapter
protected Map _grapherAdapters
protected Map _graphers
protected IlvRecursiveMultipleLayout _labelLayout
public IltCompositeGrapher(IlvGrapher grapher)
IltCompositeGraphic
objects. The leaves
of the composite objects will be inserted into the given IlvGrapher
.public IltCompositeGrapher(IlpContext appContext, IlvGrapher grapher)
IltCompositeGraphic
objects. The leaves
of the composite objects will be inserted into the given IlvGrapher
.appContext
- Application contextgrapher
- grapher where the IltCompositeGraphic
objects will be managed.public IltCompositeGrapher(IlpContext appContext, IlvGrapher grapher, boolean uniqueInIlvGrapher)
IltCompositeGraphic
objects. The leaves
of the composite objects will be inserted into the given IlvGrapher
.appContext
- Application contextgrapher
- grapher where the IltCompositeGraphic
objects will be managed.uniqueInIlvGrapher
- true if this IltcCompositeManager will be the only one in the IlvGrapherpublic void disposeLayout()
public IlvGraphModel initializeLayout(IlvGraphModel model)
model
- Graph modelpublic void updateSubnetworkLayout(IlvGraphModel childLayoutModel)
public void replaceGraphModel(IlvGraphModel toplevelmodel)
toplevelmodel
- Graph model for the top level grapherprotected void replaceChildGraphModel(IlvGraphModel toplevelmodel, IltCompositeGrapher parent)
toplevelmodel
- parent
- @Deprecated public Enumeration getNodes()
Note: Objects marked as invisible through the use of
IltObject.setVisible
are not listed in the enumeration.
IltObject
nodes.IltcCompositeGrapher.getAllNodes()
,
getObjects()
@Deprecated public Enumeration getLinks()
Note: Objects marked as invisible through the use of
IltObject.setVisible
are not listed in the enumeration.
IltObject
links.IltcCompositeGrapher.getLinks(ilog.tgo.composite.IltcCompositeGraphic)
,
getObjects()
@Deprecated public Enumeration getObjects()
Note: Objects marked as invisible through the use of
IltObject.setVisible
are not listed in the enumeration.
IltObject
s.getNodes()
,
getLinks()
@Deprecated public IltCompositeGraphic getFrom(IltCompositeGraphic link)
@Deprecated public IltCompositeGraphic getTo(IltCompositeGraphic link)
@Deprecated public void removeAllGraphics()
IltCompositeGrapher
instance.
After the call, this IltCompositeGrapher
does not contain
any IltObject
graphic representation.dispose()
@Deprecated public void dispose()
IlpGraphView.dispose()
instead.Other hints to help garbage collection are:
IltJLegendInspector
to browse the
legend hierarchy.IlvGrapher
, use IlvGrapher.deleteAll()
.IlvGrapher
used by an IlvManagerView
,
use IlvManagerView.setManager
with an empty
grapher.IlvManagerView
used by an
IlvJScrollManagerView
, use
scrollview.remove(scrollview.getView())
.dispose
in class IltcCompositeManager
public IltcLayerPolicy getLayerPolicy()
getLayerPolicy
in class IltcCompositeManager
public ilog.tgo.graphic.internal.IltLinkConnectorPolicy getLinkConnectorPolicy()
public void setLinkConnectorPolicy(ilog.tgo.graphic.internal.IltLinkConnectorPolicy policy)
@Deprecated public IlvGraphLayout getNodeLayout()
IlpGraphView
instead.When more than one layout is configured for this grapher, the one used automatically is returned
null
if none has been specified.@Deprecated public IlvGraphLayout getLinkLayout()
IlpGraphView
instead.null
if none has been specified
and no default link layout has been substituted, or if the
specified link layout is the same as the specified node layout.protected void attachLayout(IlvGraphLayout layout)
protected void detachLayout(IlvGraphLayout layout)
protected void setInternalLayouts(IlvDefaultLayoutProvider layoutProvider)
public void setLayerPolicy(IltcLayerPolicy policy)
When this method is called, the old layer policy is detached and replaced by the new layer policy. The layer policy implementation is responsible for removing the layers that have been previously allocated.
setLayerPolicy
in class IltcCompositeManager
policy
- The new layer policy.IltLayerPolicy.attach(ilog.tgo.composite.IltcCompositeManager)
,
IltLayerPolicy.detach(ilog.tgo.composite.IltcCompositeManager)
public void setGraphLayouts(IlvGraphLayout[] layouts)
layouts
- Graph layoutsgetGraphLayouts()
public IlvGraphLayout[] getGraphLayouts()
setGraphLayouts(IlvGraphLayout[])
public void setGraphLayouts(int index, IlvGraphLayout layout)
index
- Layout indexlayout
- Graph layoutpublic IlvGraphLayout getGraphLayouts(int index)
index
- Layout indexnull
if such a graph layout does not exist.public void setAutoLayoutIndex(int index)
index
- Layout indexpublic int getAutoLayoutIndex()
@Deprecated public void setNodeLayout(IlvGraphLayout layout)
layout
- A graph layout or null
.setLinkLayout(ilog.views.graphlayout.IlvGraphLayout)
,
performLayoutOnce(ilog.views.graphlayout.IlvGraphLayout)
@Deprecated public void setNodeLayout(IlvGraphLayout layout, boolean relayout)
Use this function with relayout
set to false
if you need to set some layout parameters after the layout has been
attached. This is needed for setting the layout region and for passing
any layout proxies to the graph layout (for example, using
IlvBusLayout.setBus
, IlvTreeLayout.setRoot
,
IlvCircularLayout.setClusterId
).
layout
- A graph layout or null
.relayout
- Specifies whether the layout optimizers should be called
immediately.@Deprecated public void setLinkLayout(IlvGraphLayout layout)
If layout
is null
, and the node layout does
not update links, a default link layout is substituted. It can be
obtained using getLinkLayout()
.
The layout optimizers are called automatically.
layout
- A graph layout or null
.setNodeLayout(ilog.views.graphlayout.IlvGraphLayout)
,
performLayoutOnce(ilog.views.graphlayout.IlvGraphLayout)
@Deprecated public void setLinkLayout(IlvGraphLayout layout, boolean relayout)
If layout
is null
, and the node layout does
not update links, a default link layout is substituted. It can be
obtained using getLinkLayout()
.
layout
- A graph layout or null
.relayout
- Specifies whether the layout optimizers should be called
immediately.public void setUseGraphLayoutPerObjectParameters(boolean flag)
flag
- Indicates if per-object parameters are
used.public void setUseLinkLayoutPerObjectParameters(boolean flag)
flag
- Indicates if per-object parameters are
used.public Collection getAttachedNodeLayouts()
protected void getAttachedNodeLayouts(IltCompositeGrapher grapher, Collection layouts, int maxIndex)
For instance, support we have the following hierarchy:
If this method is initially called for grapher_1_1_1, the returned collection would contain: layoutG, layoutF and layoutC.
If this method is initially called for grapher_1_1, the returned collection would contain: layoutE, layoutF and layoutC
If this method is initially called for grapher_1, the returned collection would contain: layoutD, layoutB and layoutC
grapher
- grapherlayouts
- node layout collectionmaxIndex
- index of the node layouts that have been configured
for a grapher in the hierarchy.public boolean getLayoutVerbosity()
public void setLayoutVerbosity(boolean verbosity)
protected void doOptimizeLayout()
public void optimizeLayoutNonAdjusting()
public void startDelayingOptimizeLayout()
startDelayingOptimizeLayout
in class IltcCompositeManager
public void endDelayingOptimizeLayout()
startDelayingOptimizeLayout()
. Also calls the layout
optimizer if it was requested while suspended.endDelayingOptimizeLayout
in class IltcCompositeManager
@Deprecated public void optimizeLayout()
protected boolean mustUpdateAdjacentLinks(IltcCompositeGraphic node)
mustUpdateAdjacentLinks
in class IltcCompositeGrapher
public void objectChanged(IltcCompositeGraphic object, boolean mustLayout)
objectChanged
in class IltcCompositeGrapher
object
- the graphic object which has changedmustLayout
- whether the layout proxy's size has changedprotected IltGrapherAdapter createDefaultGraphModel()
This is a low-level facility. The preferred way to use graph layout is through the Network Component layout methods.
IltGrapherAdapter
public IlvGraphModel getGraphModel()
This is a low-level facility. The preferred way to use graph layout is
through the functions setNodeLayout
,
setLinkLayout
and performLayoutOnce
.
public IlvGraphModel getRootModel()
@Deprecated public void performLayoutOnce(IlvGraphLayout layout)
In contrast to the node and link layout optimizers which are registered in the grapher and called automatically when needed, this function allows you to call a layout only once. It is useful when the layout takes a lot of time.
layout
- A graph layout which is not attached to any grapher
or graph model.@Deprecated public void performLayoutOnce(IlvGraphLayout layout, Runnable initializations)
In contrast to the node and link layout optimizers which are registered in the grapher and called automatically when needed, this function allows you to call a layout only once. It is useful when the layout takes a lot of time.
layout
- A graph layout which is not attached to any grapher
or graph model.initializations
- Code that performs initializations of the layout
after the layout has been attached but before it is run.@Deprecated public void performLayoutOnce(IlvGraphLayout layout, Runnable initializations, Runnable postprocessing)
In contrast to the node and link layout optimizers that are registered in the grapher and called automatically when needed, this function allows you to call a layout once only. It is useful when the layout takes a lot of time.
layout
- A graph layout that is not attached to any grapher
or graph model.initializations
- Code that performs initializations of the layout
after the layout has been attached but before it is run.postprocessing
- Code that performs postprocessing of the layout
after the layout has been run, but before it is detached.public void performAttachedLayout(int index)
index
- Layout indexgetGraphLayouts()
,
getGraphLayouts(int)
public void translateObject(IltCompositeGraphic graphic, double dx, double dy)
This function is meant to be called only by layout optimizers.
An application which aims at changing a network element position
should use the IltNetworkElement.setCenterPoint
method instead.
@Deprecated public void setLinkSkeleton(IltCompositeGraphic graphic, IlpPolyline newshape)
setLinkSkeleton
instead.This function is meant to be called only by layout optimizers.
An application which aims at changing a link shape should use
the IltObject.setPosition(IlpPosition)
instead.
graphic
- The link graphic.newshape
- New shape, in manager coordinates.public void setLinkSkeleton(IltCompositeGraphic graphic, IlpPolyline newshape, IlpPositionSource reason)
This function is meant to be called only by layout optimizers.
An application which aims at changing a link shape should use
the IltObject.setPosition(IlpPosition)
method instead.
graphic
- The link graphic.newshape
- New shape, in manager coordinates.reason
- The reason for the shape change, or null
if unknown.public IltCompositeGrapher getTopLevelGrapher()
public void addGrapher(IltCompositeGrapher cg)
cg
- A composite grapherpublic void removeGrapher(IltCompositeGrapher cg)
cg
- A composite grapherprotected void setParent(IltcCompositeManager parent)
setParent
in class IltcCompositeManager
public IltCompositeGrapher getParentGrapher()
public IltCompositeGrapher getGrapher(IltObject object)
IltObject
.public void setGrapher(IltObject object)
public void clearGrapher(IltObject object)
protected void addLayoutProxyObject(IltcCompositeGraphic graphic)
IltcCompositeManager
addLayoutProxyObject
in class IltcCompositeGrapher
public void removeLinkNotify(IltcCompositeGraphic link)
removeLinkNotify
in class IltcCompositeGrapher
protected void removeAdjacentLinks(IltcCompositeGraphic node, Vector links)
When a container (like a LinkBundle) is removed, its overview object (which is also an abstract link with the same endpoints) goes away as well. Therefore a single removeLinkNotify call can decrease nodeV.size() by more than 1. We need a more complex function.
removeAdjacentLinks
in class IltcCompositeGrapher
public void nodeAdded(IltcCompositeGraphic graphic)
In this implementation, it notifies the layout optimizer.
nodeAdded
in class IltcCompositeGrapher
public void nodeChanged(IltcCompositeGraphic graphic, boolean mustLayout)
In this implementation, it notifies the layout optimizer.
nodeChanged
in class IltcCompositeGrapher
graphic
- the graphic object which has changedmustLayout
- whether the layout proxy's size has changedpublic void nodeRemoved(IltcCompositeGraphic graphic)
In this implementation, it notifies the layout optimizer.
nodeRemoved
in class IltcCompositeGrapher
public void linkAdded(IltcCompositeGraphic graphic)
In this implementation, it notifies the layout optimizer.
linkAdded
in class IltcCompositeGrapher
public void linkChanged(IltcCompositeGraphic graphic, boolean mustLayout)
In this implementation, it notifies the layout optimizer.
linkChanged
in class IltcCompositeGrapher
graphic
- the graphic object which has changedmustLayout
- whether the layout proxy's shape and size have changedpublic void linkRemoved(IltcCompositeGraphic graphic)
In this implementation, it notifies the layout optimizer.
linkRemoved
in class IltcCompositeGrapher
public void grapherChanged(IlvGrapher grapher)
public void addSelectionListener(IltSelectionListener listener)
public void removeSelectionListener(IltSelectionListener listener)
public void addTreeSelectionListener(IltSelectionListener listener)
public void removeTreeSelectionListener(IltSelectionListener listener)
public void fireTreeSelectionEventSeriesBegin()
fireTreeSelectionEventSeriesBegin
in class IltcCompositeManager
public void fireTreeSelectionChanged(IltCompositeGraphic graphic, boolean selected)
public void fireTreeSelectionEventSeriesEnd()
fireTreeSelectionEventSeriesEnd
in class IltcCompositeManager
public void fireSelectionEventSeriesBegin()
fireSelectionEventSeriesBegin
in class IltcCompositeManager
public void fireSelectionChanged(IltCompositeGraphic graphic, boolean selected)
public void fireSelectionEventSeriesEnd()
fireSelectionEventSeriesEnd
in class IltcCompositeManager
public IltGraphic createGraphic(IltObject object)
IltGraphicManager
. If no graphic representation
exists in this view, an invisible graphic representation is created.
Creates an instance of IltCompositeGraphic
.createGraphic
in interface IltGraphicManager
public void addGraphic(IltGraphic graphic)
addGraphic
in interface IltGraphicManager
public void removeGraphic(IltGraphic graphic)
removeGraphic
in interface IltGraphicManager
public void computeGraphic(IltObject object, Object position, ilog.tgo.graphic.internal.IltComputeAmount amount)
computeGraphic
in interface IltGraphicManager
public void startDelayingUpdates()
endDelayingUpdates
.startDelayingUpdates
in interface IltGraphicManager
startDelayingUpdates
in class IltcCompositeManager
public void endDelayingUpdates()
startDelayingUpdates
.endDelayingUpdates
in interface IltGraphicManager
endDelayingUpdates
in class IltcCompositeManager
public IlvLabelLayout getLabelLayout()
public void setLabelLayout(IlvLabelLayout layout)
Attaches a label layout to this grapher, it must be an instance of
IltAnnealingLabelLayout
.
The label layout must be attached to a grapher in order to work,
otherwise invoking IlvLabelLayout.performLayout()
will have
no effect.
layout
- The label layout to be attached to this grapher,
it must be an instance of IltAnnealingLabelLayout
.public void performLabelLayout()
public static IltCompositeGrapher FromNetworkView(IlpGraphicView graphView)
IlpGraphView
.graphView
- An instance of ilog.cpl.graph.IlpGraphView
.IlpGraphView
,
IlpEquipment
,
IlpNetwork
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.