Search this API

y.module
Class HierarchicLayoutModule

java.lang.Object
  extended by y.module.YModule
      extended by y.module.LayoutModule
          extended by y.module.HierarchicLayoutModule

public class HierarchicLayoutModule
extends LayoutModule

This module represents an interactive configurator and launcher for HierarchicLayouter and HierarchicGroupLayouter.

 

Field Summary
protected static java.lang.String ITEM_ACT_ON_SELECTION_ONLY
           
protected static java.lang.String ITEM_BACKLOOP_ROUTING
           
protected static java.lang.String ITEM_EDGE_LABEL_MODEL
           
protected static java.lang.String ITEM_EDGE_LABELING
           
protected static java.lang.String ITEM_EDGE_ROUTING
           
protected static java.lang.String ITEM_ENABLE_GLOBAL_SEQUENCING
           
protected static java.lang.String ITEM_GROUP_POLICY
           
protected static java.lang.String ITEM_MAXIMAL_DURATION
           
protected static java.lang.String ITEM_MINIMAL_EDGE_DISTANCE
           
protected static java.lang.String ITEM_MINIMAL_FIRST_SEGMENT_LENGTH
           
protected static java.lang.String ITEM_MINIMAL_LAYER_DISTANCE
           
protected static java.lang.String ITEM_MINIMAL_NODE_DISTANCE
           
protected static java.lang.String ITEM_NODE_PLACEMENT
           
protected static java.lang.String ITEM_ORIENTATION
           
protected static java.lang.String ITEM_RANDOMIZATION_ROUNDS
           
protected static java.lang.String ITEM_RANKING_POLICY
           
protected static java.lang.String ITEM_REMOVE_FALSE_CROSSINGS
           
protected static java.lang.String ITEM_USE_TRANSPOSITION
           
protected static java.lang.String ITEM_WEIGHT_HEURISTIC
           
protected static java.lang.String MODULE_HIERARCHIC
           
protected static java.lang.String SECTION_GROUPING
           
protected static java.lang.String SECTION_LABELING
           
protected static java.lang.String SECTION_LAYOUT
           
protected static java.lang.String SECTION_NODE_ORDER
           
protected static java.lang.String SECTION_NODE_RANK
           
protected static java.lang.String VALUE_AS_IS
           
protected static java.lang.String VALUE_AS_IS_RANK
           
protected static java.lang.String VALUE_BARYCENTER
           
protected static java.lang.String VALUE_BEST
           
protected static java.lang.String VALUE_BFS
           
protected static java.lang.String VALUE_BOTTOM_TO_TOP
           
protected static java.lang.String VALUE_CENTER_SLIDER
           
protected static java.lang.String VALUE_DOWNSHIFT_NODES
           
protected static java.lang.String VALUE_FIX_GROUPS
           
protected static java.lang.String VALUE_FREE
           
protected static java.lang.String VALUE_GENERIC
           
protected static java.lang.String VALUE_HIERARCHIC
           
protected static java.lang.String VALUE_IGNORE_GROUPS
           
protected static java.lang.String VALUE_LAYOUT_GROUPS
           
protected static java.lang.String VALUE_LEFT_TO_RIGHT
           
protected static java.lang.String VALUE_LINEAR_SEGMENTS
           
protected static java.lang.String VALUE_MEDIAN
           
protected static java.lang.String VALUE_MEDIAN_SIMPLEX
           
protected static java.lang.String VALUE_NO_RERANKING
           
protected static java.lang.String VALUE_NONE
           
protected static java.lang.String VALUE_ORTHOGONAL
           
protected static java.lang.String VALUE_PENDULUM
           
protected static java.lang.String VALUE_POLYLINE
           
protected static java.lang.String VALUE_POLYLINE_EDGE
           
protected static java.lang.String VALUE_RIGHT_TO_LEFT
           
protected static java.lang.String VALUE_SIDE_SLIDER
           
protected static java.lang.String VALUE_SIMPLEX
           
protected static java.lang.String VALUE_SIMPLEX_RANK
           
protected static java.lang.String VALUE_TIGHT_TREE
           
protected static java.lang.String VALUE_TOP_TO_BOTTOM
           
protected static java.lang.String VALUE_TREE
           
 
Fields inherited from class y.module.YModule
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS
 
Constructor Summary
HierarchicLayoutModule()
          Creates an instance of this module.
 
Method Summary
protected  void configure(HierarchicGroupLayouter hierarchic, OptionHandler options)
          Configures the module's layout algorithm according to the given options.
protected  OptionHandler createOptionHandler()
          Creates an OptionHandler and adds the option items used by this module.
protected  void mainrun()
          Main module execution routine.
protected  void prepareGraph(Graph2D graph, OptionHandler options)
          Prepares a graph depending on the given options for the module's layout algorithm.
protected  void restoreGraph(Graph2D graph, OptionHandler options)
          Restores the given graph by freeing up resources created by prepareGraph(y.view.Graph2D, y.option.OptionHandler).
 
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
 

Field Detail

MODULE_HIERARCHIC

protected static final java.lang.String MODULE_HIERARCHIC
See Also:
Constant Field Values

SECTION_LAYOUT

protected static final java.lang.String SECTION_LAYOUT
See Also:
Constant Field Values

ITEM_MINIMAL_LAYER_DISTANCE

protected static final java.lang.String ITEM_MINIMAL_LAYER_DISTANCE
See Also:
Constant Field Values

ITEM_MINIMAL_NODE_DISTANCE

protected static final java.lang.String ITEM_MINIMAL_NODE_DISTANCE
See Also:
Constant Field Values

ITEM_MINIMAL_EDGE_DISTANCE

protected static final java.lang.String ITEM_MINIMAL_EDGE_DISTANCE
See Also:
Constant Field Values

ITEM_MINIMAL_FIRST_SEGMENT_LENGTH

protected static final java.lang.String ITEM_MINIMAL_FIRST_SEGMENT_LENGTH
See Also:
Constant Field Values

ITEM_MAXIMAL_DURATION

protected static final java.lang.String ITEM_MAXIMAL_DURATION
See Also:
Constant Field Values

ITEM_ORIENTATION

protected static final java.lang.String ITEM_ORIENTATION
See Also:
Constant Field Values

VALUE_TOP_TO_BOTTOM

protected static final java.lang.String VALUE_TOP_TO_BOTTOM
See Also:
Constant Field Values

VALUE_LEFT_TO_RIGHT

protected static final java.lang.String VALUE_LEFT_TO_RIGHT
See Also:
Constant Field Values

VALUE_BOTTOM_TO_TOP

protected static final java.lang.String VALUE_BOTTOM_TO_TOP
See Also:
Constant Field Values

VALUE_RIGHT_TO_LEFT

protected static final java.lang.String VALUE_RIGHT_TO_LEFT
See Also:
Constant Field Values

ITEM_NODE_PLACEMENT

protected static final java.lang.String ITEM_NODE_PLACEMENT
See Also:
Constant Field Values

VALUE_PENDULUM

protected static final java.lang.String VALUE_PENDULUM
See Also:
Constant Field Values

VALUE_LINEAR_SEGMENTS

protected static final java.lang.String VALUE_LINEAR_SEGMENTS
See Also:
Constant Field Values

VALUE_POLYLINE

protected static final java.lang.String VALUE_POLYLINE
See Also:
Constant Field Values

VALUE_TREE

protected static final java.lang.String VALUE_TREE
See Also:
Constant Field Values

VALUE_SIMPLEX

protected static final java.lang.String VALUE_SIMPLEX
See Also:
Constant Field Values

VALUE_MEDIAN_SIMPLEX

protected static final java.lang.String VALUE_MEDIAN_SIMPLEX
See Also:
Constant Field Values

ITEM_EDGE_ROUTING

protected static final java.lang.String ITEM_EDGE_ROUTING
See Also:
Constant Field Values

VALUE_POLYLINE_EDGE

protected static final java.lang.String VALUE_POLYLINE_EDGE
See Also:
Constant Field Values

VALUE_ORTHOGONAL

protected static final java.lang.String VALUE_ORTHOGONAL
See Also:
Constant Field Values

ITEM_BACKLOOP_ROUTING

protected static final java.lang.String ITEM_BACKLOOP_ROUTING
See Also:
Constant Field Values

ITEM_ACT_ON_SELECTION_ONLY

protected static final java.lang.String ITEM_ACT_ON_SELECTION_ONLY
See Also:
Constant Field Values

SECTION_NODE_RANK

protected static final java.lang.String SECTION_NODE_RANK
See Also:
Constant Field Values

ITEM_RANKING_POLICY

protected static final java.lang.String ITEM_RANKING_POLICY
See Also:
Constant Field Values

VALUE_NO_RERANKING

protected static final java.lang.String VALUE_NO_RERANKING
See Also:
Constant Field Values

VALUE_DOWNSHIFT_NODES

protected static final java.lang.String VALUE_DOWNSHIFT_NODES
See Also:
Constant Field Values

VALUE_TIGHT_TREE

protected static final java.lang.String VALUE_TIGHT_TREE
See Also:
Constant Field Values

VALUE_SIMPLEX_RANK

protected static final java.lang.String VALUE_SIMPLEX_RANK
See Also:
Constant Field Values

VALUE_AS_IS_RANK

protected static final java.lang.String VALUE_AS_IS_RANK
See Also:
Constant Field Values

VALUE_BFS

protected static final java.lang.String VALUE_BFS
See Also:
Constant Field Values

SECTION_NODE_ORDER

protected static final java.lang.String SECTION_NODE_ORDER
See Also:
Constant Field Values

ITEM_WEIGHT_HEURISTIC

protected static final java.lang.String ITEM_WEIGHT_HEURISTIC
See Also:
Constant Field Values

VALUE_BARYCENTER

protected static final java.lang.String VALUE_BARYCENTER
See Also:
Constant Field Values

VALUE_MEDIAN

protected static final java.lang.String VALUE_MEDIAN
See Also:
Constant Field Values

ITEM_USE_TRANSPOSITION

protected static final java.lang.String ITEM_USE_TRANSPOSITION
See Also:
Constant Field Values

ITEM_REMOVE_FALSE_CROSSINGS

protected static final java.lang.String ITEM_REMOVE_FALSE_CROSSINGS
See Also:
Constant Field Values

ITEM_RANDOMIZATION_ROUNDS

protected static final java.lang.String ITEM_RANDOMIZATION_ROUNDS
See Also:
Constant Field Values

SECTION_LABELING

protected static final java.lang.String SECTION_LABELING
See Also:
Constant Field Values

ITEM_EDGE_LABELING

protected static final java.lang.String ITEM_EDGE_LABELING
See Also:
Constant Field Values

VALUE_NONE

protected static final java.lang.String VALUE_NONE
See Also:
Constant Field Values

VALUE_HIERARCHIC

protected static final java.lang.String VALUE_HIERARCHIC
See Also:
Constant Field Values

VALUE_GENERIC

protected static final java.lang.String VALUE_GENERIC
See Also:
Constant Field Values

ITEM_EDGE_LABEL_MODEL

protected static final java.lang.String ITEM_EDGE_LABEL_MODEL
See Also:
Constant Field Values

VALUE_BEST

protected static final java.lang.String VALUE_BEST
See Also:
Constant Field Values

VALUE_AS_IS

protected static final java.lang.String VALUE_AS_IS
See Also:
Constant Field Values

VALUE_CENTER_SLIDER

protected static final java.lang.String VALUE_CENTER_SLIDER
See Also:
Constant Field Values

VALUE_SIDE_SLIDER

protected static final java.lang.String VALUE_SIDE_SLIDER
See Also:
Constant Field Values

VALUE_FREE

protected static final java.lang.String VALUE_FREE
See Also:
Constant Field Values

SECTION_GROUPING

protected static final java.lang.String SECTION_GROUPING
See Also:
Constant Field Values

ITEM_GROUP_POLICY

protected static final java.lang.String ITEM_GROUP_POLICY
See Also:
Constant Field Values

VALUE_LAYOUT_GROUPS

protected static final java.lang.String VALUE_LAYOUT_GROUPS
See Also:
Constant Field Values

VALUE_FIX_GROUPS

protected static final java.lang.String VALUE_FIX_GROUPS
See Also:
Constant Field Values

VALUE_IGNORE_GROUPS

protected static final java.lang.String VALUE_IGNORE_GROUPS
See Also:
Constant Field Values

ITEM_ENABLE_GLOBAL_SEQUENCING

protected static final java.lang.String ITEM_ENABLE_GLOBAL_SEQUENCING
See Also:
Constant Field Values
Constructor Detail

HierarchicLayoutModule

public HierarchicLayoutModule()
Creates an instance of this module.

Method Detail

createOptionHandler

protected OptionHandler createOptionHandler()
Creates an OptionHandler and adds the option items used by this module.

Overrides:
createOptionHandler in class YModule
Returns:
the created OptionHandler providing module related options

mainrun

protected void mainrun()
Main module execution routine. Launches the module's underlying algorithm on the module's graph based on user options.

Specified by:
mainrun in class YModule

prepareGraph

protected void prepareGraph(Graph2D graph,
                            OptionHandler options)
Prepares a graph depending on the given options for the module's layout algorithm.
Additional resources created by this method have to be freed up by calling restoreGraph(y.view.Graph2D, y.option.OptionHandler) after layout calculation.

Parameters:
graph - the graph to be prepared
options - the options for the module's layout algorithm

restoreGraph

protected void restoreGraph(Graph2D graph,
                            OptionHandler options)
Restores the given graph by freeing up resources created by prepareGraph(y.view.Graph2D, y.option.OptionHandler).

Parameters:
graph - the graph for which prepareGraph has been called
options - the options for the module's layout algorithm

configure

protected void configure(HierarchicGroupLayouter hierarchic,
                         OptionHandler options)
Configures the module's layout algorithm according to the given options.

Important: This method does also depend on the Graph2D of this module in addition to the method's parameters.

Parameters:
hierarchic - the HierarchicGroupLayouter to be configured
options - the layout options to set

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