y.module
Class EdgeGroupConstraintModule
java.lang.Object
y.module.YModule
y.module.LayoutModule
y.module.EdgeGroupConstraintModule
public class EdgeGroupConstraintModule
- extends LayoutModule
A module that allows to configure edge group constraints, interactively. Edge group constraints
are interpreted by some automatic layout algorithms like HierarchicLayouter
to combine edges that are grouped to bus-like structures.
-
-
Methods inherited from class y.module.LayoutModule |
backupDataProvider, createAnimationPlayer, createLayoutExecutor, createLayoutMorpher, getBufferedMode, getLayoutExecutor, isAbortable, isMorphingEnabled, isPortIntersectionCalculatorEnabled, launchLayouter, launchLayouter, restoreDataProvider, setBufferedMode, setLayoutExecutor, setMorphingEnabled, setPortIntersectionCalculatorEnabled, useEventDispatchThread |
Methods inherited from class y.module.YModule |
addModuleListener, createThread, dispose, exceptionHappened, fitGraph2DView, getAuthor, getDescription, getExitStatus, getGraph2D, getGraph2DView, getModuleListeners, getModuleName, getOptionHandler, getTimer, getView, init, initGuiFactory, isBackupRealizersEnabled, removeModuleListener, run, setBackupRealizersEnabled, setExitStatus, setGraph2D, setModuleName, setOptionHandler, start, startAsThread |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EdgeGroupConstraintModule
public EdgeGroupConstraintModule()
createOptionHandler
protected OptionHandler createOptionHandler()
- Creates and initializes the option handler so that a convenient way for
manipulating the parameters is at the user's hand.
- Overrides:
createOptionHandler
in class YModule
- Returns:
- The option handler for this module,
null
by default.
mainrun
protected void mainrun()
- Description copied from class:
YModule
- Main execution code to be implemented by any subclassing module.
- Specified by:
mainrun
in class YModule
createEdgeGroupsAutomatically
public static void createEdgeGroupsAutomatically(Graph2D graph,
EdgeCursor positiveEC,
EdgeMap sgMap,
EdgeMap tgMap,
boolean shareGroupAtBothEnds)
- Automatically group edges that share common source or target nodes. To avoid ambiguities, this method
will never assign edge A and edge B to the same group, if there is an edge C, that is grouped with either edge A, or node B,
but not with both.
- Parameters:
graph
- input graphpositiveEC
- - returns edges for which port constraints will be assignedsgMap
- source group id maptgMap
- target group id mapshareGroupAtBothEnds
- whether or not to assign the same groupID to both the source and target end of an edge.