Search this API

y.module
Class OrganicLayoutModule

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

public class OrganicLayoutModule
extends LayoutModule

This module represents an interactive configurator and launcher for OrganicLayouter.

 

Field Summary
protected static java.lang.String ITEM_ACTIVATE_DETERMINISTIC_MODE
           
protected static java.lang.String ITEM_ACTIVATE_TREE_BEAUTIFIER
           
protected static java.lang.String ITEM_ALLOW_MULTI_THREADING
           
protected static java.lang.String ITEM_ATTRACTION
           
protected static java.lang.String ITEM_GRAVITY_FACTOR
           
protected static java.lang.String ITEM_GROUP_LAYOUT_POLICY
           
protected static java.lang.String ITEM_GROUP_NODE_COMPACTNESS
           
protected static java.lang.String ITEM_INITIAL_PLACEMENT
           
protected static java.lang.String ITEM_ITERATION_FACTOR
           
protected static java.lang.String ITEM_MAXIMAL_DURATION
           
protected static java.lang.String ITEM_OBEY_NODE_SIZES
           
protected static java.lang.String ITEM_PREFERRED_EDGE_LENGTH
           
protected static java.lang.String ITEM_REPULSION
           
protected static java.lang.String ITEM_SPHERE_OF_ACTION
           
protected static java.lang.String MODULE_ORGANIC
           
protected static java.lang.String SECTION_ALGORITHM
           
protected static java.lang.String SECTION_GROUPING
           
protected static java.lang.String SECTION_VISUAL
           
protected static java.lang.String VALUE_ALL
           
protected static java.lang.String VALUE_AS_IS
           
protected static java.lang.String VALUE_AT_ORIGIN
           
protected static java.lang.String VALUE_FIX_GROUPS
           
protected static java.lang.String VALUE_IGNORE_GROUPS
           
protected static java.lang.String VALUE_LAYOUT_GROUPS
           
protected static java.lang.String VALUE_MAINLY_SELECTION
           
protected static java.lang.String VALUE_ONLY_SELECTION
           
protected static java.lang.String VALUE_RANDOM
           
 
Fields inherited from class y.module.YModule
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS
 
Constructor Summary
OrganicLayoutModule()
          Creates an instance of this module.
 
Method Summary
protected  void configure(OrganicLayouter organic, 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_ORGANIC

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

SECTION_VISUAL

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

ITEM_SPHERE_OF_ACTION

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

VALUE_ALL

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

VALUE_MAINLY_SELECTION

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

VALUE_ONLY_SELECTION

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

ITEM_INITIAL_PLACEMENT

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

VALUE_RANDOM

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

VALUE_AT_ORIGIN

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

VALUE_AS_IS

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

ITEM_PREFERRED_EDGE_LENGTH

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

ITEM_OBEY_NODE_SIZES

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

ITEM_ATTRACTION

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

ITEM_REPULSION

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

ITEM_GRAVITY_FACTOR

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

ITEM_ACTIVATE_TREE_BEAUTIFIER

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

SECTION_ALGORITHM

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

ITEM_ITERATION_FACTOR

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

ITEM_MAXIMAL_DURATION

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

ITEM_ACTIVATE_DETERMINISTIC_MODE

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

ITEM_ALLOW_MULTI_THREADING

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

SECTION_GROUPING

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

ITEM_GROUP_LAYOUT_POLICY

protected static final java.lang.String ITEM_GROUP_LAYOUT_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_GROUP_NODE_COMPACTNESS

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

OrganicLayoutModule

public OrganicLayoutModule()
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(OrganicLayouter organic,
                         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:
organic - the OrganicLayouter to be configured
options - the layout options to set

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