Search this API

y.module
Class SmartOrganicLayoutModule

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

public class SmartOrganicLayoutModule
extends LayoutModule

This module represents an interactive configurator and launcher for SmartOrganicLayouter.

See Also:
Section Advanced Layout Concepts in the yFiles for Java Developer's Guide, Section Organic Layout Style in the yFiles for Java Developer's Guide
 

Field Summary
protected static java.lang.String ITEM_ALLOW_MULTI_THREADING
           
protected static java.lang.String ITEM_ALLOW_NODE_OVERLAPS
           
protected static java.lang.String ITEM_AR_CAGE_USE_VIEW
           
protected static java.lang.String ITEM_AUTO_CLUSTERING_QUALITY
           
protected static java.lang.String ITEM_AVOID_NODE_EDGE_OVERLAPS
           
protected static java.lang.String ITEM_CAGE_CENTER_X
           
protected static java.lang.String ITEM_CAGE_CENTER_Y
           
protected static java.lang.String ITEM_CAGE_HEIGHT
           
protected static java.lang.String ITEM_CAGE_RADIUS
           
protected static java.lang.String ITEM_CAGE_RATIO
           
protected static java.lang.String ITEM_CAGE_WIDTH
           
protected static java.lang.String ITEM_CAGE_X
           
protected static java.lang.String ITEM_CAGE_Y
           
protected static java.lang.String ITEM_CHAIN
           
protected static java.lang.String ITEM_CIRC_CAGE_USE_VIEW
           
protected static java.lang.String ITEM_COMPACTNESS
           
protected static java.lang.String ITEM_CONSIDER_EDGE_DIRECTION
           
protected static java.lang.String ITEM_CONSIDER_NODE_LABELS
           
protected static java.lang.String ITEM_CYCLE
           
protected static java.lang.String ITEM_ELL_CAGE_USE_VIEW
           
protected static java.lang.String ITEM_ELLIPTICAL_CAGE_HEIGHT
           
protected static java.lang.String ITEM_ELLIPTICAL_CAGE_WIDTH
           
protected static java.lang.String ITEM_ELLIPTICAL_CAGE_X
           
protected static java.lang.String ITEM_ELLIPTICAL_CAGE_Y
           
protected static java.lang.String ITEM_GROUP_COMPACTNESS
           
protected static java.lang.String ITEM_GROUP_LAYOUT_POLICY
           
protected static java.lang.String ITEM_MAXIMAL_DURATION
           
protected static java.lang.String ITEM_MINIMAL_NODE_DISTANCE
           
protected static java.lang.String ITEM_PARALLEL
           
protected static java.lang.String ITEM_PREFERRED_EDGE_LENGTH
           
protected static java.lang.String ITEM_QUALITY_TIME_RATIO
           
protected static java.lang.String ITEM_RECT_CAGE_USE_VIEW
           
protected static java.lang.String ITEM_RESTRICT_OUTPUT
           
protected static java.lang.String ITEM_SCOPE
           
protected static java.lang.String ITEM_STAR
           
protected static java.lang.String ITEM_USE_AUTO_CLUSTERING
           
protected static java.lang.String ITEM_USE_AUTOMATIC_GROUP_NODE_COMPACTION
           
protected static java.lang.String ITEM_USE_EDGE_GROUPING
           
protected static java.lang.String MODULE_SMARTORGANIC
           
protected static java.lang.String SECTION_ALGORITHM
           
protected static java.lang.String SECTION_GROUPING
           
protected static java.lang.String SECTION_RESTRICTIONS
           
protected static java.lang.String SECTION_SUBSTRUCTURE_LAYOUT
           
protected static java.lang.String SECTION_VISUAL
           
protected static java.lang.String TITLE_OUTPUT_AR
           
protected static java.lang.String TITLE_OUTPUT_CAGE
           
protected static java.lang.String TITLE_OUTPUT_CIRCULAR_CAGE
           
protected static java.lang.String TITLE_OUTPUT_ELLIPTICAL_CAGE
           
protected static java.lang.String VALUE_CHAIN_NONE
           
protected static java.lang.String VALUE_CHAIN_RECTANGULAR
           
protected static java.lang.String VALUE_CHAIN_STRAIGHT_LINE
           
protected static java.lang.String VALUE_CYCLE_CIRCULAR
           
protected static java.lang.String VALUE_CYCLE_NONE
           
protected static java.lang.String VALUE_FIX_GROUP_BOUNDS
           
protected static java.lang.String VALUE_FIX_GROUP_CONTENTS
           
protected static java.lang.String VALUE_IGNORE_GROUPS
           
protected static java.lang.String VALUE_LAYOUT_GROUPS
           
protected static java.lang.String VALUE_NONE
           
protected static java.lang.String VALUE_OUTPUT_AR
           
protected static java.lang.String VALUE_OUTPUT_CAGE
           
protected static java.lang.String VALUE_OUTPUT_CIRCULAR_CAGE
           
protected static java.lang.String VALUE_OUTPUT_ELLIPTICAL_CAGE
           
protected static java.lang.String VALUE_PARALLEL_NONE
           
protected static java.lang.String VALUE_PARALLEL_RADIAL
           
protected static java.lang.String VALUE_PARALLEL_RECTANGULAR
           
protected static java.lang.String VALUE_PARALLEL_STRAIGHT_LINE
           
protected static java.lang.String VALUE_SCOPE_ALL
           
protected static java.lang.String VALUE_SCOPE_MAINLY_SUBSET
           
protected static java.lang.String VALUE_SCOPE_SUBSET
           
protected static java.lang.String VALUE_STAR_CIRCULAR
           
protected static java.lang.String VALUE_STAR_NONE
           
protected static java.lang.String VALUE_STAR_RADIAL
           
protected static java.lang.String VALUE_STAR_SEPARATED_RADIAL
           
 
Fields inherited from class y.module.YModule
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS
 
Constructor Summary
SmartOrganicLayoutModule()
          Creates an instance of this module.
 
Method Summary
protected  void configure(SmartOrganicLayouter 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_SMARTORGANIC

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

SECTION_VISUAL

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

ITEM_SCOPE

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

VALUE_SCOPE_ALL

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

VALUE_SCOPE_MAINLY_SUBSET

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

VALUE_SCOPE_SUBSET

protected static final java.lang.String VALUE_SCOPE_SUBSET
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_CONSIDER_NODE_LABELS

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

ITEM_ALLOW_NODE_OVERLAPS

protected static final java.lang.String ITEM_ALLOW_NODE_OVERLAPS
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_AVOID_NODE_EDGE_OVERLAPS

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

ITEM_COMPACTNESS

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

ITEM_USE_AUTO_CLUSTERING

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

ITEM_AUTO_CLUSTERING_QUALITY

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

SECTION_RESTRICTIONS

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

ITEM_RESTRICT_OUTPUT

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

VALUE_NONE

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

VALUE_OUTPUT_CAGE

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

VALUE_OUTPUT_CIRCULAR_CAGE

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

VALUE_OUTPUT_AR

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

VALUE_OUTPUT_ELLIPTICAL_CAGE

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

TITLE_OUTPUT_CAGE

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

ITEM_RECT_CAGE_USE_VIEW

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

ITEM_CAGE_X

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

ITEM_CAGE_Y

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

ITEM_CAGE_WIDTH

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

ITEM_CAGE_HEIGHT

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

TITLE_OUTPUT_CIRCULAR_CAGE

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

ITEM_CIRC_CAGE_USE_VIEW

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

ITEM_CAGE_CENTER_X

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

ITEM_CAGE_CENTER_Y

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

ITEM_CAGE_RADIUS

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

TITLE_OUTPUT_AR

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

ITEM_AR_CAGE_USE_VIEW

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

ITEM_CAGE_RATIO

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

TITLE_OUTPUT_ELLIPTICAL_CAGE

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

ITEM_ELL_CAGE_USE_VIEW

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

ITEM_ELLIPTICAL_CAGE_X

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

ITEM_ELLIPTICAL_CAGE_Y

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

ITEM_ELLIPTICAL_CAGE_WIDTH

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

ITEM_ELLIPTICAL_CAGE_HEIGHT

protected static final java.lang.String ITEM_ELLIPTICAL_CAGE_HEIGHT
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_GROUP_CONTENTS

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

VALUE_FIX_GROUP_BOUNDS

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

VALUE_IGNORE_GROUPS

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

ITEM_USE_AUTOMATIC_GROUP_NODE_COMPACTION

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

ITEM_GROUP_COMPACTNESS

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

SECTION_ALGORITHM

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

ITEM_QUALITY_TIME_RATIO

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

ITEM_MAXIMAL_DURATION

protected static final java.lang.String ITEM_MAXIMAL_DURATION
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_SUBSTRUCTURE_LAYOUT

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

ITEM_CONSIDER_EDGE_DIRECTION

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

ITEM_USE_EDGE_GROUPING

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

ITEM_CYCLE

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

VALUE_CYCLE_NONE

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

VALUE_CYCLE_CIRCULAR

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

ITEM_CHAIN

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

VALUE_CHAIN_NONE

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

VALUE_CHAIN_RECTANGULAR

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

VALUE_CHAIN_STRAIGHT_LINE

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

ITEM_STAR

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

VALUE_STAR_NONE

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

VALUE_STAR_SEPARATED_RADIAL

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

VALUE_STAR_RADIAL

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

VALUE_STAR_CIRCULAR

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

ITEM_PARALLEL

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

VALUE_PARALLEL_NONE

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

VALUE_PARALLEL_STRAIGHT_LINE

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

VALUE_PARALLEL_RECTANGULAR

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

VALUE_PARALLEL_RADIAL

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

SmartOrganicLayoutModule

public SmartOrganicLayoutModule()
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(SmartOrganicLayouter organic,
                         OptionHandler options)
Configures the module's layout algorithm according to the given options.

Parameters:
organic - the SmartOrganicLayouter to be configured
options - the layout options to set

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