com.nwoods.jgo.layout
Class JGoRandomAutoLayout

java.lang.Object
  extended bycom.nwoods.jgo.layout.JGoAutoLayout
      extended bycom.nwoods.jgo.layout.JGoRandomAutoLayout

public class JGoRandomAutoLayout
extends JGoAutoLayout

JGoRandomAutoLayout provides an auto-layout algorithm which randomly positions nodes in the document.


Constructor Summary
JGoRandomAutoLayout()
          Constructs a RandomAutoLayout with null values for myGoNetwork and myGoDocument.
JGoRandomAutoLayout(JGoDocument doc)
          Constructs a RandomAutoLayout with myGoDocument of doc.
JGoRandomAutoLayout(JGoDocument doc, int Nminx, int Nmaxx, int Nminy, int Nmaxy)
          Constructs a RandomAutoLayout with JGoDocument doc, and minimum and maximum x and y position as defined by the input parameters.
JGoRandomAutoLayout(JGoDocument doc, JGoNetwork network)
          Constructs a RandomAutoLayout with myGoDocument of doc, and myGoNetwork of network.
JGoRandomAutoLayout(JGoDocument doc, JGoNetwork network, int Nminx, int Nmaxx, int Nminy, int Nmaxy)
          Constructs a RandomAutoLayout with JGoDocument doc, JGoNetwork network, and minimum and maximum x and y position as defined by the input parameters.
 
Method Summary
protected  boolean isFixed(JGoNetworkNode pNode)
          The function isFixed returns true if the node should not be moved by the layout algorithm.
 void performLayout()
          Performs random positioning auto-layout.
 
Methods inherited from class com.nwoods.jgo.layout.JGoAutoLayout
getDocument, getNetwork, progressUpdate, setDocument, setNetwork
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGoRandomAutoLayout

public JGoRandomAutoLayout()
Constructs a RandomAutoLayout with null values for myGoNetwork and myGoDocument. performLayout() will be a no-op until the network has been set.


JGoRandomAutoLayout

public JGoRandomAutoLayout(JGoDocument doc)
Constructs a RandomAutoLayout with myGoDocument of doc. This constructor sets the minimum and maximum x and y positions using the size of the JGoDocument.

Parameters:
doc - the JGoDocument containing the JGoObjects to layout

JGoRandomAutoLayout

public JGoRandomAutoLayout(JGoDocument doc,
                           JGoNetwork network)
Constructs a RandomAutoLayout with myGoDocument of doc, and myGoNetwork of network. This constructor sets the minimum and maximum x and y positions using the size of the JGoDocument.

Parameters:
doc - the JGoDocument containing the JGoObjects to layout
network - the JGoNetwork representation of the JGoObjects to layout

JGoRandomAutoLayout

public JGoRandomAutoLayout(JGoDocument doc,
                           int Nminx,
                           int Nmaxx,
                           int Nminy,
                           int Nmaxy)
Constructs a RandomAutoLayout with JGoDocument doc, and minimum and maximum x and y position as defined by the input parameters.

Parameters:
doc - the JGoDocument containing the JGoObjects to layout
Nminx - the minimum x coordinate at which a node will be positioned
Nmaxx - the maximum x coordinate at which a node will be positioned
Nminy - the minimum y coordinate at which a node will be positioned
Nmaxy - the maximum y coordinate at which a node will be positioned

JGoRandomAutoLayout

public JGoRandomAutoLayout(JGoDocument doc,
                           JGoNetwork network,
                           int Nminx,
                           int Nmaxx,
                           int Nminy,
                           int Nmaxy)
Constructs a RandomAutoLayout with JGoDocument doc, JGoNetwork network, and minimum and maximum x and y position as defined by the input parameters.

Parameters:
doc - the JGoDocument containing the JGoObjects to layout
network - the JGoNetwork representation of the JGoObjects to layout
Nminx - the minimum x coordinate at which a node will be positioned
Nmaxx - the maximum x coordinate at which a node will be positioned
Nminy - the minimum y coordinate at which a node will be positioned
Nmaxy - the maximum y coordinate at which a node will be positioned
Method Detail

performLayout

public void performLayout()
Performs random positioning auto-layout.

Specified by:
performLayout in class JGoAutoLayout

isFixed

protected boolean isFixed(JGoNetworkNode pNode)
The function isFixed returns true if the node should not be moved by the layout algorithm. The default implementation returns false on all inputs. This function can be overridden to "fix" particular nodes.