public class ReteLayout
extends edu.uci.ics.jung.algorithms.layout.AbstractLayout
implements edu.uci.ics.jung.algorithms.layout.Layout
Modifier and Type | Field and Description |
---|---|
protected boolean |
annealing
Flag to enable simulated annealing (SA).
|
protected java.util.List |
layers
The nodes, sorted in layers.
|
protected boolean |
layout
Flag to enable layout optimization.
|
protected boolean |
positions
Flag to indicate when positions are up-to-date.
|
protected java.awt.Dimension |
rsize
The size.
|
Constructor and Description |
---|
ReteLayout(edu.uci.ics.jung.graph.Graph g)
Create a new Rete layout.
|
Modifier and Type | Method and Description |
---|---|
protected double |
calcEdgeLength(ReteEdge edge,
jadex.rules.rulesystem.rete.nodes.INode node,
int layer,
int pos)
Calculate the edge length of the given edge.
|
protected double |
calcEdgeLengths(edu.uci.ics.jung.graph.Graph graph,
jadex.rules.rulesystem.rete.nodes.INode node,
int layer,
int pos)
Calculate the edge lengths between a node and its parents/children.
|
edu.uci.ics.jung.graph.Graph |
getGraph()
Get the graph to be layouted.
|
java.awt.Dimension |
getSize()
Get the size.
|
void |
graphChanged()
Called, when the graph structure has changed.
|
void |
initialize()
Called when a (re-)layout is needed.
|
protected void |
layoutLayers()
Called when a (re-)layout is needed.
|
void |
reset()
Called when ?
|
protected void |
setPositions()
Called, when the component has been resized.
|
void |
setSize(java.awt.Dimension size)
Called, when the component is resized.
|
getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected java.awt.Dimension rsize
protected java.util.List layers
protected boolean positions
protected boolean layout
protected boolean annealing
public ReteLayout(edu.uci.ics.jung.graph.Graph g)
public void initialize()
initialize
in interface edu.uci.ics.jung.algorithms.layout.Layout
public void reset()
reset
in interface edu.uci.ics.jung.algorithms.layout.Layout
public edu.uci.ics.jung.graph.Graph getGraph()
getGraph
in interface edu.uci.ics.jung.algorithms.layout.Layout
getGraph
in class edu.uci.ics.jung.algorithms.layout.AbstractLayout
public void setSize(java.awt.Dimension size)
setSize
in interface edu.uci.ics.jung.algorithms.layout.Layout
setSize
in class edu.uci.ics.jung.algorithms.layout.AbstractLayout
public java.awt.Dimension getSize()
getSize
in interface edu.uci.ics.jung.algorithms.layout.Layout
getSize
in class edu.uci.ics.jung.algorithms.layout.AbstractLayout
public void graphChanged()
protected void layoutLayers()
protected void setPositions()
protected double calcEdgeLengths(edu.uci.ics.jung.graph.Graph graph, jadex.rules.rulesystem.rete.nodes.INode node, int layer, int pos)
protected double calcEdgeLength(ReteEdge edge, jadex.rules.rulesystem.rete.nodes.INode node, int layer, int pos)