Search this API

y.module
Class EdgeGroupConstraintModule

java.lang.Object
  extended by y.module.YModule
      extended by y.module.LayoutModule
          extended by 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.

 

Field Summary
 
Fields inherited from class y.module.YModule
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS
 
Constructor Summary
EdgeGroupConstraintModule()
           
 
Method Summary
static void createEdgeGroupsAutomatically(Graph2D graph, EdgeCursor positiveEC, EdgeMap sgMap, EdgeMap tgMap, boolean shareGroupAtBothEnds)
          Automatically group edges that share common source or target nodes.
protected  OptionHandler createOptionHandler()
          Creates and initializes the option handler so that a convenient way for manipulating the parameters is at the user's hand.
protected  void mainrun()
          Main execution code to be implemented by any subclassing module.
 
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
 

Constructor Detail

EdgeGroupConstraintModule

public EdgeGroupConstraintModule()
Method Detail

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 graph
positiveEC - - returns edges for which port constraints will be assigned
sgMap - source group id map
tgMap - target group id map
shareGroupAtBothEnds - whether or not to assign the same groupID to both the source and target end of an edge.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.