Search this API

y.layout.router.polyline
Class GraphPartitionExtensionAdapter

java.lang.Object
  extended by y.layout.router.polyline.GraphPartitionExtensionAdapter
All Implemented Interfaces:
DynamicDecomposition.Listener, GraphPartitionExtension

public abstract class GraphPartitionExtensionAdapter
extends Object
implements GraphPartitionExtension

This abstract adapter provides an empty implementation of GraphPartitionExtension.

The only real functionality is contained in the prepare method which stores the given PathSearchConfiguration and GraphPartition in properties..

See Also:
getConfiguration(), getGraphPartition()

Constructor Summary
GraphPartitionExtensionAdapter()
           
 
Method Summary
 void cleanup()
          Cleans the extension up from the last partitioning with the current configuration and graphPartition.
protected  PathSearchConfiguration getConfiguration()
          Returns the configuration of the PathSearch passed in GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).
protected  GraphPartition getGraphPartition()
          Returns the bridge passed in GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).
 void onCellCreated(PartitionCell createdCell)
          Callback after a new PartitionCell has been created.
 void onCellFinalized(PartitionCell finalizedCell)
          Callback after a PartitionCell has been decided to be final and won't be subdivided further.
 void onCellSubdivided(PartitionCell cell, List subCells)
          Callback after a PartitionCell has been subdivided into several sub cells.
 void preparePartition(PathSearchConfiguration configuration, GraphPartition graphPartition)
          This method is called by the given GraphPartition upon initialization before its ObstaclePartition gets initialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphPartitionExtensionAdapter

public GraphPartitionExtensionAdapter()
Method Detail

getGraphPartition

protected GraphPartition getGraphPartition()
Returns the bridge passed in GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).

Returns:
the bridge passed in GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).

getConfiguration

protected PathSearchConfiguration getConfiguration()
Returns the configuration of the PathSearch passed in GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).

Returns:
The configuration of the PathSearch passed in GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).

onCellCreated

public void onCellCreated(PartitionCell createdCell)
Description copied from interface: DynamicDecomposition.Listener
Callback after a new PartitionCell has been created.

Specified by:
onCellCreated in interface DynamicDecomposition.Listener
Parameters:
createdCell - The newly created cell.

onCellSubdivided

public void onCellSubdivided(PartitionCell cell,
                             List subCells)
Description copied from interface: DynamicDecomposition.Listener
Callback after a PartitionCell has been subdivided into several sub cells.

Listener may not modify the list of sub cells.

Specified by:
onCellSubdivided in interface DynamicDecomposition.Listener
Parameters:
cell - The cell that has been subdivided.
subCells - The new sub cells of the divided cell.

onCellFinalized

public void onCellFinalized(PartitionCell finalizedCell)
Description copied from interface: DynamicDecomposition.Listener
Callback after a PartitionCell has been decided to be final and won't be subdivided further.

Specified by:
onCellFinalized in interface DynamicDecomposition.Listener
Parameters:
finalizedCell - The cell that has been finalized.

preparePartition

public void preparePartition(PathSearchConfiguration configuration,
                             GraphPartition graphPartition)
Description copied from interface: GraphPartitionExtension
This method is called by the given GraphPartition upon initialization before its ObstaclePartition gets initialized.

Implementations may use the given graph the GraphPartition is based upon to initialize themselves and/or add obstacles to the list that ObstaclePartition is initialized with.

Specified by:
preparePartition in interface GraphPartitionExtension
Parameters:
configuration - The configuration used for the path search.
graphPartition - The graph partition using this extension.

cleanup

public void cleanup()
Description copied from interface: GraphPartitionExtension
Cleans the extension up from the last partitioning with the current configuration and graphPartition.

Specified by:
cleanup in interface GraphPartitionExtension

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