Search this API

y.module
Class TabularLayoutModule

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

public class TabularLayoutModule
extends LayoutModule

This module represents an interactive configurator and launcher for TabularLayouter.

 

Field Summary
protected static java.lang.String ITEM_CELL_INSET
           
protected static java.lang.String ITEM_CONSIDER_NODE_LABELS
           
protected static java.lang.String ITEM_FIXED_COLUMN_COUNT
           
protected static java.lang.String ITEM_FIXED_ROW_COUNT
           
protected static java.lang.String ITEM_HORIZONTAL_ALIGNMENT
           
protected static java.lang.String ITEM_LAYOUT_POLICY
           
protected static java.lang.String ITEM_MINIMUM_COLUMN_WIDTH
           
protected static java.lang.String ITEM_MINIMUM_ROW_HEIGHT
           
protected static java.lang.String ITEM_VERTICAL_ALIGNMENT
           
protected static java.lang.String MODULE_TABULAR_LAYOUT
           
protected static java.lang.String VALUE_BOTTOM
           
protected static java.lang.String VALUE_CENTER
           
protected static java.lang.String VALUE_LEFT
           
protected static java.lang.String VALUE_POLICY_AUTO_SIZE
           
protected static java.lang.String VALUE_POLICY_EXISTING_TABLE
           
protected static java.lang.String VALUE_POLICY_FIXED_SIZE
           
protected static java.lang.String VALUE_POLICY_FROM_SKETCH
           
protected static java.lang.String VALUE_POLICY_SINGLE_COLUMN
           
protected static java.lang.String VALUE_POLICY_SINGLE_ROW
           
protected static java.lang.String VALUE_RIGHT
           
protected static java.lang.String VALUE_TOP
           
 
Fields inherited from class y.module.YModule
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS
 
Constructor Summary
TabularLayoutModule()
           
 
Method Summary
protected  void addInsetConstraints(ConstraintManager optionConstraints, EnumOptionItem policyItem, OptionItem insetItem)
          Configures constraints for the inset setting, i.e., specifies when the inset setting is allowed to be active.
protected  void addMinimumSizeConstraints(ConstraintManager optionConstraints, EnumOptionItem policyItem, OptionItem minimumSizeItem)
          Configures constraints for the minimum column width and minimum row height setting, i.e., specifies when the settings is allowed to be active.
protected  boolean configure(TabularLayouter layouter, Graph2D graph, OptionHandler options)
          Configures the given tabular layout algorithm according to the given options and returns whether or not a PartitionGrid was registered.
protected  OptionHandler createOptionHandler()
          Creates an OptionHandler and adds the option items used by this module.
 Graph2DLayoutExecutor getLayoutExecutor()
          Gets the Graph2DLayoutExecutor that will be used by this instance in LayoutModule.launchLayouter(y.layout.Layouter) to execute the layout.
protected  void mainrun()
          Main module execution routine.
 
Methods inherited from class y.module.LayoutModule
backupDataProvider, createAnimationPlayer, createLayoutExecutor, createLayoutMorpher, getBufferedMode, 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_TABULAR_LAYOUT

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

ITEM_VERTICAL_ALIGNMENT

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

ITEM_HORIZONTAL_ALIGNMENT

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

VALUE_CENTER

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

VALUE_TOP

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

VALUE_BOTTOM

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

VALUE_LEFT

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

VALUE_RIGHT

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

ITEM_LAYOUT_POLICY

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

VALUE_POLICY_AUTO_SIZE

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

VALUE_POLICY_FIXED_SIZE

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

VALUE_POLICY_EXISTING_TABLE

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

VALUE_POLICY_SINGLE_ROW

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

VALUE_POLICY_SINGLE_COLUMN

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

VALUE_POLICY_FROM_SKETCH

protected static final java.lang.String VALUE_POLICY_FROM_SKETCH
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_FIXED_ROW_COUNT

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

ITEM_FIXED_COLUMN_COUNT

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

ITEM_CELL_INSET

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

ITEM_MINIMUM_ROW_HEIGHT

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

ITEM_MINIMUM_COLUMN_WIDTH

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

TabularLayoutModule

public TabularLayoutModule()
Method Detail

getLayoutExecutor

public Graph2DLayoutExecutor getLayoutExecutor()
Description copied from class: LayoutModule
Gets the Graph2DLayoutExecutor that will be used by this instance in LayoutModule.launchLayouter(y.layout.Layouter) to execute the layout.

Overrides:
getLayoutExecutor in class LayoutModule
Returns:
The instance that will be used for the layout execution.
See Also:
LayoutModule.createLayoutExecutor()

mainrun

protected void mainrun()
Main module execution routine. Launches the tabular layout algorithm.

Specified by:
mainrun in class YModule

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

addMinimumSizeConstraints

protected void addMinimumSizeConstraints(ConstraintManager optionConstraints,
                                         EnumOptionItem policyItem,
                                         OptionItem minimumSizeItem)
Configures constraints for the minimum column width and minimum row height setting, i.e., specifies when the settings is allowed to be active.


addInsetConstraints

protected void addInsetConstraints(ConstraintManager optionConstraints,
                                   EnumOptionItem policyItem,
                                   OptionItem insetItem)
Configures constraints for the inset setting, i.e., specifies when the inset setting is allowed to be active.


configure

protected boolean configure(TabularLayouter layouter,
                            Graph2D graph,
                            OptionHandler options)
Configures the given tabular layout algorithm according to the given options and returns whether or not a PartitionGrid was registered. It is necessary to add the grid instance to support certain module settings like insets.

Parameters:
layouter - the TabularLayouter to be configured
graph - the input graph to be arranged
options - the layout options to set
Returns:
true, if a PartitionGrid was registered with the input graph, false, otherwise

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