Search this API

y.layout
Class AbstractLayoutStage

java.lang.Object
  extended by y.layout.AbstractLayoutStage
All Implemented Interfaces:
Layouter, LayoutStage
Direct Known Subclasses:
AbstractLabelingAlgorithm, BufferedLayouter, BusRouter, ChannelEdgeRouter, CollinearBendHider, ComponentLayouter, CompositeLayoutStage, CurveFittingLayoutStage, CurveRoutingStage, EdgeBundlingStage, EdgeGroupRouterStage, EdgeReversalStage, EdgeRouter, FixedGroupLayoutStage, FixNodeLayoutStage, GenericPartitionGridStage, GivenCoordinatesStage, GraphLayoutLineWrapper, GroupedShuffleLayouter, GroupNodeHider, GroupNodeRouterStage, HandleNaNCoordinatesStage, KeepStrongPortConstraintsStage, LabelLayoutDataRefinement, LayoutMultiplexer, MinNodeSizeStage, MultiPageLayouter, NormalizingGraphElementOrderStage, OrganicPartitionGridLayoutStage, OrganicRemoveOverlapsStage, OrientationLayouter, OrthogonalEdgeRouter, OrthogonalPatternEdgeRouter, OrthogonalSegmentDistributionStage, ParallelEdgeLayouter, ParentEdgeAugmentationStage, PartialLayouter, PartitionGridLayoutStage, PartitionGridRouterStage, PartitionLayouter, PatchRouterStage, PlaceNodesAtBarycenterStage, PolylineLayoutStage, PortCalculator, PortCandidateAssignmentStage, PortConstraintEnforcementStage, RecursiveGroupLayouter, ReducedSphereOfActionStage, RemoveColinearBendsStage, SelfLoopLayouter, SnapOuterPortsToNodeBorderStage, StraightLineEdgeRouter, SubgraphLayouter, TemporaryGroupNodeInsertionStage, TopLevelGroupToSwimlaneStage, TreeReductionStage

public abstract class AbstractLayoutStage
extends java.lang.Object
implements LayoutStage

Abstract base class implementing LayoutStage that handles the management of the core layout algorithm. Subclasses of this stage can use the provided methods, such that the management of the core layout algorithm does not need to be considered anymore.

See Also:
CanonicMultiStageLayouter
 
Your browser does not support SVG content.

Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
AbstractLayoutStage()
          Creates a new LayoutStage instance without a specific core layout algorithm.
AbstractLayoutStage(Layouter coreLayouter)
          Creates a new LayoutStage instance using the given core layout algorithm.
 
Method Summary
protected  boolean canLayoutCore(LayoutGraph graph)
          Checks whether or not the core layout algorithm can arrange the given graph.
protected  void doLayoutCore(LayoutGraph graph)
          Invokes the layout process of the core layout algorithm.
 Layouter getCoreLayouter()
          Returns the core layout algorithm that is wrapped by this stage.
 void setCoreLayouter(Layouter layouter)
          Specifies the core layout algorithm that is wrapped by this stage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface y.layout.Layouter
canLayout, doLayout
 

Constructor Detail

AbstractLayoutStage

public AbstractLayoutStage()
Creates a new LayoutStage instance without a specific core layout algorithm.


AbstractLayoutStage

public AbstractLayoutStage(Layouter coreLayouter)
Creates a new LayoutStage instance using the given core layout algorithm.

Parameters:
coreLayouter - the core layout routine
Method Detail

setCoreLayouter

public void setCoreLayouter(Layouter layouter)
Specifies the core layout algorithm that is wrapped by this stage.

Specified by:
setCoreLayouter in interface LayoutStage
Default Value:
The default value is null.
Parameters:
layouter - the core layout routine

getCoreLayouter

public Layouter getCoreLayouter()
Returns the core layout algorithm that is wrapped by this stage.

Specified by:
getCoreLayouter in interface LayoutStage
Returns:
the core layout routine
See Also:
setCoreLayouter(Layouter)

doLayoutCore

protected void doLayoutCore(LayoutGraph graph)
Invokes the layout process of the core layout algorithm.

Overriding classes may call this method during Layouter.doLayout(LayoutGraph) to delegate arranging the graph to the core layout algorithm. They can add pre- and post-processing code before and after this call.

Parameters:
graph - the input graph

canLayoutCore

protected boolean canLayoutCore(LayoutGraph graph)
Checks whether or not the core layout algorithm can arrange the given graph.

Parameters:
graph - the input graph
Returns:
true if there is no core layout algorithm or it can handle the input graph, false otherwise

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