Search this API

y.module
Class PolylineEdgeRouterModule

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

public class PolylineEdgeRouterModule
extends LayoutModule

This module represents an interactive configurator and launcher for EdgeRouter.

 

Field Summary
protected static java.awt.Color BUS_IGNORE_COLOR
           
protected static java.lang.String ITEM_BUS_ROUTING
           
protected static java.lang.String ITEM_CONSIDER_EDGE_LABELS
           
protected static java.lang.String ITEM_CONSIDER_NODE_LABELS
           
protected static java.lang.String ITEM_CURVE_CONNECTION_STYLE
           
protected static java.lang.String ITEM_EDGE_ROUTING
           
protected static java.lang.String ITEM_ENABLE_REROUTING
           
protected static java.lang.String ITEM_GRID_ENABLED
           
protected static java.lang.String ITEM_GRID_SPACING
           
protected static java.lang.String ITEM_MAXIMAL_DURATION
           
protected static java.lang.String ITEM_MINIMAL_EDGE_TO_EDGE_DISTANCE
           
protected static java.lang.String ITEM_MINIMAL_FIRST_SEGMENT_LENGTH
           
protected static java.lang.String ITEM_MINIMAL_LAST_SEGMENT_LENGTH
           
protected static java.lang.String ITEM_MINIMAL_NODE_CORNER_DISTANCE
           
protected static java.lang.String ITEM_MINIMAL_NODE_TO_EDGE_DISTANCE
           
protected static java.lang.String ITEM_MONOTONIC_RESTRICTION
           
protected static java.lang.String ITEM_OPTIMIZATION_STRATEGY
           
protected static java.lang.String ITEM_PREFERRED_POLYLINE_SEGMENT_LENGTH
           
protected static java.lang.String ITEM_SCOPE
           
protected static java.lang.String ITEM_USE_BENDS_AS_INTERMEDIATE_POINTS
           
protected static java.lang.String SECTION_LAYOUT
           
protected static java.lang.String TITLE_GRID_SETTINGS
           
protected static java.lang.String TITLE_MINIMAL_DISTANCES
           
protected static java.lang.String VALUE_BY_COLOR
           
protected static java.lang.String VALUE_BY_LABEL
           
protected static java.lang.String VALUE_CURVE_CONNECTION_STYLE_DEFAULT
           
protected static java.lang.String VALUE_CURVE_CONNECTION_STYLE_ORGANIC
           
protected static java.lang.String VALUE_EDGE_ROUTING_CURVED
           
protected static java.lang.String VALUE_EDGE_ROUTING_OCTILINEAR
           
protected static java.lang.String VALUE_EDGE_ROUTING_ORTHOGONAL
           
protected static java.lang.String VALUE_MONOTONIC_BOTH
           
protected static java.lang.String VALUE_MONOTONIC_HORIZONTAL
           
protected static java.lang.String VALUE_MONOTONIC_NONE
           
protected static java.lang.String VALUE_MONOTONIC_VERTICAL
           
protected static java.lang.String VALUE_NO_BUS
           
protected static java.lang.String VALUE_SCOPE_ALL_EDGES
           
protected static java.lang.String VALUE_SCOPE_EDGES_AT_SELECTED_NODES
           
protected static java.lang.String VALUE_SCOPE_SELECTED_EDGES
           
protected static java.lang.String VALUE_SELECTED_EDGES
           
protected static java.lang.String VALUE_SINGLE_BUS
           
protected static java.lang.String VALUE_STRATEGY_BALANCED
           
protected static java.lang.String VALUE_STRATEGY_MINIMIZE_BENDS
           
protected static java.lang.String VALUE_STRATEGY_MINIMIZE_CROSSINGS
           
 
Fields inherited from class y.module.YModule
FAILED, moduleListenerSupport, PRECONDITION_VIOLATED, SUCCESS
 
Constructor Summary
PolylineEdgeRouterModule()
          Creates an instance of this module.
 
Method Summary
protected  void configure(EdgeRouter router, 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

SECTION_LAYOUT

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

ITEM_SCOPE

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

VALUE_SCOPE_ALL_EDGES

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

VALUE_SCOPE_SELECTED_EDGES

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

VALUE_SCOPE_EDGES_AT_SELECTED_NODES

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

ITEM_OPTIMIZATION_STRATEGY

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

VALUE_STRATEGY_BALANCED

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

VALUE_STRATEGY_MINIMIZE_BENDS

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

VALUE_STRATEGY_MINIMIZE_CROSSINGS

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

ITEM_EDGE_ROUTING

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

VALUE_EDGE_ROUTING_ORTHOGONAL

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

VALUE_EDGE_ROUTING_OCTILINEAR

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

VALUE_EDGE_ROUTING_CURVED

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

ITEM_MONOTONIC_RESTRICTION

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

VALUE_MONOTONIC_NONE

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

VALUE_MONOTONIC_HORIZONTAL

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

VALUE_MONOTONIC_VERTICAL

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

VALUE_MONOTONIC_BOTH

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

TITLE_MINIMAL_DISTANCES

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

ITEM_MINIMAL_EDGE_TO_EDGE_DISTANCE

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

ITEM_MINIMAL_NODE_TO_EDGE_DISTANCE

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

ITEM_MINIMAL_NODE_CORNER_DISTANCE

protected static final java.lang.String ITEM_MINIMAL_NODE_CORNER_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_MINIMAL_LAST_SEGMENT_LENGTH

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

TITLE_GRID_SETTINGS

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

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

ITEM_CONSIDER_EDGE_LABELS

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

ITEM_ENABLE_REROUTING

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

ITEM_USE_BENDS_AS_INTERMEDIATE_POINTS

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

ITEM_MAXIMAL_DURATION

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

ITEM_BUS_ROUTING

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

VALUE_NO_BUS

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

VALUE_SELECTED_EDGES

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

VALUE_SINGLE_BUS

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

VALUE_BY_COLOR

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

VALUE_BY_LABEL

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

BUS_IGNORE_COLOR

protected static final java.awt.Color BUS_IGNORE_COLOR

ITEM_PREFERRED_POLYLINE_SEGMENT_LENGTH

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

ITEM_CURVE_CONNECTION_STYLE

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

VALUE_CURVE_CONNECTION_STYLE_DEFAULT

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

VALUE_CURVE_CONNECTION_STYLE_ORGANIC

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

PolylineEdgeRouterModule

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

Parameters:
router - the EdgeRouter to be configured
options - the layout options to set

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