Search this API

y.layout.random
Class RandomLayouter

java.lang.Object
  extended by y.layout.CanonicMultiStageLayouter
      extended by y.layout.random.RandomLayouter
All Implemented Interfaces:
Layouter

public class RandomLayouter
extends CanonicMultiStageLayouter

This class generates a layout, where the nodes are placed randomly. Edges have no bends and ports. The layout is placed inside a box.


Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
RandomLayouter()
           
 
Method Summary
 boolean canLayoutCore(LayoutGraph graph)
          Returns always true, because every graph can be drawn.
 void doLayoutCore(LayoutGraph graph)
          Perform the layout.
 Rectangle getLayoutBounds()
          Returns the rectangle, inside which the layout should be placed.
 long getSeed()
          Returns the randomization seed, with which the layout will be generated.
 void setLayoutBounds(Rectangle r)
          Sets the rectangle, inside which the layout should be placed.
 void setSeed(long seed)
          Sets the randomization seed, with which the layout will be generated.
 
Methods inherited from class y.layout.CanonicMultiStageLayouter
appendStage, calcLayout, calcLayout, canLayout, checkGroupNodeSize, checkNodeSize, doLayout, doLayout, enableOnlyCore, getComponentLayouter, getGroupNodeHider, getLabelLayouter, getLayoutOrientation, getOrientationLayouter, getParallelEdgeLayouter, getSelfLoopLayouter, getSubgraphLayouter, isComponentLayouterEnabled, isGroupNodeHidingEnabled, isLabelLayouterEnabled, isOrientationLayouterEnabled, isParallelEdgeLayouterEnabled, isSelfLoopLayouterEnabled, isSubgraphLayouterEnabled, prependStage, removeStage, setComponentLayouter, setComponentLayouterEnabled, setGroupNodeHider, setGroupNodeHidingEnabled, setLabelLayouter, setLabelLayouterEnabled, setLayoutOrientation, setOrientationLayouter, setOrientationLayouterEnabled, setParallelEdgeLayouter, setParallelEdgeLayouterEnabled, setSelfLoopLayouter, setSelfLoopLayouterEnabled, setSubgraphLayouter, setSubgraphLayouterEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomLayouter

public RandomLayouter()
Method Detail

setLayoutBounds

public void setLayoutBounds(Rectangle r)
Sets the rectangle, inside which the layout should be placed.


getLayoutBounds

public Rectangle getLayoutBounds()
Returns the rectangle, inside which the layout should be placed.


canLayoutCore

public boolean canLayoutCore(LayoutGraph graph)
Returns always true, because every graph can be drawn.

Specified by:
canLayoutCore in class CanonicMultiStageLayouter

doLayoutCore

public void doLayoutCore(LayoutGraph graph)
Perform the layout.

Specified by:
doLayoutCore in class CanonicMultiStageLayouter

getSeed

public long getSeed()
Returns the randomization seed, with which the layout will be generated.

Returns:
the randomization seed, which determines the layout generation.

setSeed

public void setSeed(long seed)
Sets the randomization seed, with which the layout will be generated.

Parameters:
seed - the randomization seed, which determines the layout generation.

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