Search this API

y.layout
Interface Layouter

All Known Subinterfaces:
LayoutStage
All Known Implementing Classes:
AbstractLabelingAlgorithm, AbstractLayoutStage, ARTreeLayouter, BalloonLayouter, BendConverter, BufferedLayouter, BusRouter, CanonicMultiStageLayouter, ChannelEdgeRouter, ChannelEdgeRouter.OrthogonalShortestPathPathFinder, CircularLayouter, CollinearBendHider, CompactOrthogonalLayouter, ComponentLayouter, CompositeLayouter, CompositeLayoutStage, DirectedOrthogonalLayouter, EdgeGroupRouterStage, EdgeReversalStage, EdgeRouter, FamilyTreeLayouter, FixedGroupLayoutStage, FixNodeLayoutStage, GenericTreeLayouter, GraphLayoutLineWrapper, GraphTransformer, GraphZoomer, GreedyMISLabeling, GRIP, GroupedShuffleLayouter, GroupNodeHider, GroupNodeRouterStage, HierarchicGroupLayouter, HierarchicLayouter, HierarchicLayouter, HVTreeLayouter, IncrementalHierarchicLayouter, InteractiveOrganicLayouter, IsolatedGroupComponentLayouter, LabelLayoutDataRefinement, LabelLayoutTranslator, LayoutMultiplexer, MinNodeSizeStage, MISLabelingAlgorithm, MultiPageLayouter, NormalizingGraphElementOrderStage, OrganicEdgeRouter, OrganicLayouter, OrientationLayouter, OrthogonalEdgeRouter, OrthogonalGroupLayouter, OrthogonalLayouter, OrthogonalPatternEdgeRouter, OrthogonalSegmentDistributionStage, ParallelEdgeLayouter, ParentEdgeAugmentationStage, PartialLayouter, PartialLayouter.StraightLineEdgeRouter, PartitionGridLayoutStage, PartitionGridRouterStage, PartitionLayouter, PatchRouterStage, PolylineLayoutStage, PortCalculator, PortConstraintEnforcementStage, RandomLayouter, RecursiveGroupLayouter, ReducedSphereOfActionStage, RemoveColinearBendsStage, RemoveOverlapsLayoutStage, SALabeling, SelfLoopLayouter, SequentialLayouter, ShuffleLayouter, SingleCycleLayouter, SmartOrganicLayouter, SnapOuterPortsToNodeBorderStage, SplitEdgeLayoutStage, SubgraphLayouter, TopLevelGroupToSwimlaneStage, TreeComponentLayouter, TreeLayouter, TreeReductionStage

public interface Layouter

This is a general interface for algorithms that perform a layout process on a given layout graph.


Field Summary
static Object EDGE_ID_DPKEY
          The data provider key used to look up a unique Object identifier (consistent with hashCode() and equals() ) for each edge in a graph.
static Object NODE_ID_DPKEY
          The data provider key used to look up a unique Object identifier (consistent with hashCode() and equals() ) for each node in a graph.
static Object SELECTED_EDGES
          The data provider key used to look up the selected state of the edges of the graph to be laid out.
static Object SELECTED_NODES
          The data provider key used to look up the selected state of the nodes of the graph to be laid out.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be laid out by this algorithm.
 void doLayout(LayoutGraph graph)
          Main layout routine that assigns new layout information to the given graph.
 

Field Detail

NODE_ID_DPKEY

static final Object NODE_ID_DPKEY
The data provider key used to look up a unique Object identifier (consistent with hashCode() and equals() ) for each node in a graph. Layout algorithms may use this information to provide consistent layouts for multiple runs. The looked up data provider should provide Object values for the nodes of that graph. These should be consistent with the Object.hashCode() and Object.equals() methods.


EDGE_ID_DPKEY

static final Object EDGE_ID_DPKEY
The data provider key used to look up a unique Object identifier (consistent with hashCode() and equals() ) for each edge in a graph. Layout algorithms may use this information to provide consistent layouts for multiple runs. The looked up data provider should provide Object values for the edges of that graph. These should be consistent with the Object.hashCode() and Object.equals() methods.


SELECTED_NODES

static final Object SELECTED_NODES
The data provider key used to look up the selected state of the nodes of the graph to be laid out. A layout algorithm will try to retrieve a data provider from the graph to be laid out with this key. The looked up data provider should provide boolean values for the nodes of that graph. The boolean value should signal whether a node is to be considered as selected or not.

Note that for several layouters this key is used for restricting the sphere of action, e.g. to layout the subgraph induced by the set of selected nodes in the SubgraphLayouter. However, it is often more convenient to use a specific data provider key for this purpose, for example if you want to combine two layouters of this kind which have to operate on different subsets of the graph. Thus, these layouters provide a method like setSubgraphNodesDpKey(Object) in the case of the SubgraphLayouter for using a different data provider.


SELECTED_EDGES

static final Object SELECTED_EDGES
The data provider key used to look up the selected state of the edges of the graph to be laid out. A layout algorithm will try to retrieve a data provider from the graph to be laid out with this key. The looked up data provider should provide boolean values for the edges of that graph. The boolean value should signal whether an edge is to be considered as selected or not.

Note that for several layouters this key is used for restricting the sphere of action, e.g. to route only a subset of the edges by the OrthogonalEdgeRouter. However, it is often more convenient to use a specific data provider key for this purpose, for example if you want to combine two layouters of this kind which have to operate on different subsets of the graph. Thus, these layouters provide a method like setSelectedEdgesDpKey(Object) in the case of the OrthogonalEdgeRouter for using a different data provider.

Method Detail

canLayout

boolean canLayout(LayoutGraph graph)
Returns true iff the given graph can be laid out by this algorithm. Calling doLayout with the given graph as its argument will only success if this method returns true.


doLayout

void doLayout(LayoutGraph graph)
Main layout routine that assigns new layout information to the given graph.


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