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 java.lang.Object
implements GraphPartitionExtension

GraphPartitionExtensionAdapter provides an empty implementation of GraphPartitionExtension.

The only real functionality is contained in method GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition) which stores the given PathSearchConfiguration and GraphPartition in properties.

See Also:
getConfiguration(), getGraphPartition()
 
Your browser does not support SVG content.

Constructor Summary
GraphPartitionExtensionAdapter()
          Creates a new instance of GraphPartitionExtensionAdapter.
 
Method Summary
 void cleanup()
          Cleans up the extension from the last partitioning with the current configuration and GraphPartition.
protected  PathSearchConfiguration getConfiguration()
          Returns the configuration of the PathSearch passed to GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).
protected  GraphPartition getGraphPartition()
          Returns the GraphPartition passed to GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition).
 void onCellCreated(PartitionCell createdCell)
          Callback after the new given PartitionCell has been created.
 void onCellFinalized(PartitionCell finalizedCell)
          Callback after the given PartitionCell has been finalized.
 void onCellSubdivided(PartitionCell cell, java.util.List subCells)
          Callback after the given PartitionCell has been subdivided into several sub-cells.
 void onCellUnlocked(PartitionCell unlockedCell)
          Callback after the given PartitionCell has been unlocked.
 void preparePartition(PathSearchConfiguration configuration, GraphPartition graphPartition)
          Stores the given PathSearchConfiguration and GraphPartition such that they are accessible through getConfiguration() and getGraphPartition(), respectively.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphPartitionExtensionAdapter

public GraphPartitionExtensionAdapter()
Creates a new instance of GraphPartitionExtensionAdapter.

Method Detail

getGraphPartition

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

Returns:
the GraphPartition passed to GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition) or null if said method has not been called yet or this instance has been cleaned up

getConfiguration

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

Returns:
the configuration of the PathSearch passed to GraphPartitionExtension.preparePartition(PathSearchConfiguration, GraphPartition) or null if said method has not been called yet or this instance has been cleaned up

onCellCreated

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

Specified by:
onCellCreated in interface DynamicDecomposition.Listener
Parameters:
createdCell - the newly created PartitionCell

onCellSubdivided

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

DynamicDecomposition.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 sub-cells resulting from the subdivision of the given PartitionCell

onCellFinalized

public void onCellFinalized(PartitionCell finalizedCell)
Description copied from interface: DynamicDecomposition.Listener
Callback after the given PartitionCell has been finalized.

Before the cell may be further subdivided, it has to be unlocked again.

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

onCellUnlocked

public void onCellUnlocked(PartitionCell unlockedCell)
Description copied from interface: DynamicDecomposition.Listener
Callback after the given PartitionCell has been unlocked.

The cell had previously be finalized but has been unlocked again and may be subdivided in the future.

Specified by:
onCellUnlocked in interface DynamicDecomposition.Listener
Parameters:
unlockedCell - the cell that has been unlocked

preparePartition

public void preparePartition(PathSearchConfiguration configuration,
                             GraphPartition graphPartition)
Stores the given PathSearchConfiguration and GraphPartition such that they are accessible through getConfiguration() and getGraphPartition(), respectively.

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

cleanup

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

Specified by:
cleanup in interface GraphPartitionExtension

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