y.layout.organic
Class ShuffleLayouter

java.lang.Object
  |
  +--y.layout.organic.ShuffleLayouter
All Implemented Interfaces:
Layouter, LayoutStage

public class ShuffleLayouter
extends Object
implements LayoutStage

This layout stage removes node overlaps in a layout graph by using a method which is based on a famous russian arcade game.


Field Summary
static byte HOC_INTERSECTION_BOX
           
static byte HOC_LESS_MOVEMENT
           
static byte HOC_NODE_CENTER
           
static Object MINIMAL_DISTANCE_DPKEY
          This key can be used to specify a minimal distance for each single node in the graph using a data provider.
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
ShuffleLayouter()
          Creates a new instance of ShuffleLayouter.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be layed out by this algorithm.
 void doLayout(LayoutGraph graph)
          Performs the force transfer algorithm on the given graph after the core layouter has performed its job.
 Layouter getCoreLayouter()
          Returns the core layouter.
 byte getHorizontalOverlapCriterium()
           
 double getMinimalNodeDistance()
          Returns the minimal distance between nodes that has to be obeyed by this layouter.
 boolean isBarycenterModeActive()
          Getter for property barycenterModeActive.
 boolean isSimpleModeActive()
          Whether or not simple mode is active.
 void setBarycenterModeActive(boolean barycenterModeActive)
          Setter for property barycenterModeActive.
 void setCoreLayouter(Layouter l)
          Sets the core layouter.
 void setHorizontalOverlapCriterium(byte voc)
           
 void setMinimalNodeDistance(double d)
          Sets the minimal distance between nodes that has to be obeyed by this layouter.
 void setSimpleModeActive(boolean s)
          Whether or not to activate a simple layout mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINIMAL_DISTANCE_DPKEY

public static final Object MINIMAL_DISTANCE_DPKEY
This key can be used to specify a minimal distance for each single node in the graph using a data provider. Note that values must be strictly positive.


HOC_INTERSECTION_BOX

public static final byte HOC_INTERSECTION_BOX
See Also:
Constant Field Values

HOC_NODE_CENTER

public static final byte HOC_NODE_CENTER
See Also:
Constant Field Values

HOC_LESS_MOVEMENT

public static final byte HOC_LESS_MOVEMENT
See Also:
Constant Field Values
Constructor Detail

ShuffleLayouter

public ShuffleLayouter()
Creates a new instance of ShuffleLayouter.

Method Detail

doLayout

public void doLayout(LayoutGraph graph)
Performs the force transfer algorithm on the given graph after the core layouter has performed its job.

Specified by:
doLayout in interface Layouter

canLayout

public boolean canLayout(LayoutGraph graph)
Description copied from interface: Layouter
Returns true iff the given graph can be layed out by this algorithm. Calling doLayout with the given graph as it's argument will only success if this method returns true.

Specified by:
canLayout in interface Layouter

setCoreLayouter

public void setCoreLayouter(Layouter l)
Sets the core layouter.

Specified by:
setCoreLayouter in interface LayoutStage

getCoreLayouter

public Layouter getCoreLayouter()
Returns the core layouter.

Specified by:
getCoreLayouter in interface LayoutStage

setHorizontalOverlapCriterium

public void setHorizontalOverlapCriterium(byte voc)

getHorizontalOverlapCriterium

public byte getHorizontalOverlapCriterium()

setMinimalNodeDistance

public void setMinimalNodeDistance(double d)
Sets the minimal distance between nodes that has to be obeyed by this layouter.


getMinimalNodeDistance

public double getMinimalNodeDistance()
Returns the minimal distance between nodes that has to be obeyed by this layouter.


setSimpleModeActive

public void setSimpleModeActive(boolean s)
Whether or not to activate a simple layout mode. When in simple mode the algorithm is very fast but the quality of the resulting layout may be poor. When not active the resulting layout is better and the running time is higher.

By default simple mode is not active.


isSimpleModeActive

public boolean isSimpleModeActive()
Whether or not simple mode is active.

See Also:
ShuffleLayouter.setSimpleModeActive(boolean)

isBarycenterModeActive

public boolean isBarycenterModeActive()
Getter for property barycenterModeActive.

Returns:
Value of property barycenterModeActive.

setBarycenterModeActive

public void setBarycenterModeActive(boolean barycenterModeActive)
Setter for property barycenterModeActive.

Parameters:
barycenterModeActive - New value of property barycenterModeActive.

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

2003