Search this API

y.module
Class ComponentLayoutModule

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

public class ComponentLayoutModule
extends LayoutModule

This module represents an interactive configurator and launcher for ComponentLayouter.

 

Field Summary
protected static java.lang.String ITEM_ASPECT_RATIO
           
protected static java.lang.String ITEM_COMPONENT_SPACING
           
protected static java.lang.String ITEM_FROM_SKETCH
           
protected static java.lang.String ITEM_GRID_ENABLED
           
protected static java.lang.String ITEM_GRID_SPACING
           
protected static java.lang.String ITEM_NO_OVERLAP
           
protected static java.lang.String ITEM_NODE_TYPES
           
protected static java.lang.String ITEM_STYLE
           
protected static java.lang.String ITEM_USE_SCREEN_RATIO
           
protected static java.lang.String MODULE_COMPONENTLAYOUTER
           
protected static java.lang.String VALUE_NODE_TYPES_DEFINED_BY_COLOR
           
protected static java.lang.String VALUE_NODE_TYPES_DEFINED_BY_LABEL
           
protected static java.lang.String VALUE_NODE_TYPES_NONE
           
protected static java.lang.String VALUE_STYLE_MULTI_ROWS
           
protected static java.lang.String VALUE_STYLE_MULTI_ROWS_COMPACT
           
protected static java.lang.String VALUE_STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED
           
protected static java.lang.String VALUE_STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED_COMPACT
           
protected static java.lang.String VALUE_STYLE_MULTI_ROWS_TYPE_SEPARATED
           
protected static java.lang.String VALUE_STYLE_MULTI_ROWS_WIDTH_CONSTRAINED
           
protected static java.lang.String VALUE_STYLE_MULTI_ROWS_WIDTH_CONSTRAINED_COMPACT
           
protected static java.lang.String VALUE_STYLE_NONE
           
protected static java.lang.String VALUE_STYLE_PACKED_CIRCLE
           
protected static java.lang.String VALUE_STYLE_PACKED_COMPACT_CIRCLE
           
protected static java.lang.String VALUE_STYLE_PACKED_COMPACT_RECTANGLE
           
protected static java.lang.String VALUE_STYLE_PACKED_RECTANGLE
           
protected static java.lang.String VALUE_STYLE_ROWS
           
protected static java.lang.String VALUE_STYLE_SINGLE_COLUMN
           
protected static java.lang.String VALUE_STYLE_SINGLE_ROW
           
 
Fields inherited from class y.module.YModule
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS
 
Constructor Summary
ComponentLayoutModule()
          Creates an instance of this module.
 
Method Summary
protected  void configure(ComponentLayouter component, 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(Graph2D, 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_COMPONENTLAYOUTER

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

ITEM_STYLE

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

VALUE_STYLE_NONE

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

VALUE_STYLE_ROWS

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

VALUE_STYLE_SINGLE_ROW

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

VALUE_STYLE_SINGLE_COLUMN

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

VALUE_STYLE_PACKED_RECTANGLE

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

VALUE_STYLE_PACKED_COMPACT_RECTANGLE

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

VALUE_STYLE_PACKED_CIRCLE

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

VALUE_STYLE_PACKED_COMPACT_CIRCLE

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

VALUE_STYLE_MULTI_ROWS

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

VALUE_STYLE_MULTI_ROWS_COMPACT

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

VALUE_STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED

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

VALUE_STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED_COMPACT

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

VALUE_STYLE_MULTI_ROWS_WIDTH_CONSTRAINED

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

VALUE_STYLE_MULTI_ROWS_WIDTH_CONSTRAINED_COMPACT

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

VALUE_STYLE_MULTI_ROWS_TYPE_SEPARATED

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

ITEM_NO_OVERLAP

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

ITEM_FROM_SKETCH

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

ITEM_USE_SCREEN_RATIO

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

ITEM_ASPECT_RATIO

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

ITEM_COMPONENT_SPACING

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

ITEM_GRID_ENABLED

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

ITEM_GRID_SPACING

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

ITEM_NODE_TYPES

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

VALUE_NODE_TYPES_NONE

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

VALUE_NODE_TYPES_DEFINED_BY_COLOR

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

VALUE_NODE_TYPES_DEFINED_BY_LABEL

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

ComponentLayoutModule

public ComponentLayoutModule()
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

configure

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

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

Parameters:
component - the ComponentLayouter to be configured
options - the layout options to set

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(Graph2D, OptionHandler) after the 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(Graph2D, OptionHandler).

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

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