public interface IlvAutoLayoutHandler
IlvGraphLayout.performAutoLayout()
to start the automatic layout. A
simple example implementation of the performAutoLayout
method is:
public void performAutoLayout(Object layout, Vector objects) { try { if (layout instanceof IlvGraphLayout) ((IlvGraphLayout)layout).performLayout(true, true); else if (layout instanceof IlvLabelLayout) ((IlvLabelLayout)layout).performLayout(true, true); } catch (Exception e) { } }Advanced usages of this interface can catch the exception
IlvInappropriateLinkException
thrown by the method IlvGraphLayout.performLayout(boolean, boolean)
and to execute the
most appropriate action. The utility method IlvGraphLayoutUtil.EnsureAppropriateLinks(IlvGraphModel,
IlvLayoutProvider)
can be used to replace the inappropriate links,
and then the layout can be restarted.
IlvGraphLayout.setAutoLayoutHandler(ilog.views.graphlayout.IlvAutoLayoutHandler)
,
IlvGraphLayout.performAutoLayout()
Modifier and Type | Method and Description |
---|---|
void |
performAutoLayout(Object layout,
Vector objects)
Performs an automatic layout that was caused by a structural or
geometric change of some graphic objects.
|
void performAutoLayout(Object layout, Vector objects)
layout
- The graph layout or label layout to be performed.objects
- The vector of graphic objects that caused the need for
layout. These objects were added, removed, or have moved. If
null
is passed, the need for layout has no specific
reason (for example, when all nodes and links have moved).© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.