Package jadex.rules.tools.reteviewer
Class ReteLayout
- java.lang.Object
- 
- edu.uci.ics.jung.algorithms.layout.AbstractLayout
- 
- jadex.rules.tools.reteviewer.ReteLayout
 
 
- 
- All Implemented Interfaces:
- edu.uci.ics.jung.algorithms.layout.Layout,- org.apache.commons.collections15.Transformer
 
 public class ReteLayout extends edu.uci.ics.jung.algorithms.layout.AbstractLayout implements edu.uci.ics.jung.algorithms.layout.LayoutJung layout for a Rete network.
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanannealingFlag to enable simulated annealing (SA).protected java.util.ListlayersThe nodes, sorted in layers.protected booleanlayoutFlag to enable layout optimization.protected booleanpositionsFlag to indicate when positions are up-to-date.protected java.awt.DimensionrsizeThe size.
 - 
Constructor SummaryConstructors Constructor Description ReteLayout(edu.uci.ics.jung.graph.Graph g)Create a new Rete layout.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doublecalcEdgeLength(ReteEdge edge, INode node, int layer, int pos)Calculate the edge length of the given edge.protected doublecalcEdgeLengths(edu.uci.ics.jung.graph.Graph graph, INode node, int layer, int pos)Calculate the edge lengths between a node and its parents/children.edu.uci.ics.jung.graph.GraphgetGraph()Get the graph to be layouted.java.awt.DimensiongetSize()Get the size.voidgraphChanged()Called, when the graph structure has changed.voidinitialize()Called when a (re-)layout is needed.protected voidlayoutLayers()Called when a (re-)layout is needed.voidreset()Called when ?protected voidsetPositions()Called, when the component has been resized.voidsetSize(java.awt.Dimension size)Called, when the component is resized.- 
Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayoutgetX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, transform
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
- 
 
- 
- 
- 
Field Detail- 
rsizeprotected java.awt.Dimension rsize The size.
 - 
layersprotected java.util.List layers The nodes, sorted in layers.
 - 
positionsprotected boolean positions Flag to indicate when positions are up-to-date.
 - 
layoutprotected boolean layout Flag to enable layout optimization. With layout optimization, not only edge lengths are optimized, but also left/right directions of connected alpha and beta nodes.
 - 
annealingprotected boolean annealing Flag to enable simulated annealing (SA). With SA, the layout algorithm will take longer, but can escape sub optimal local minima.
 
- 
 - 
Method Detail- 
initializepublic void initialize() Called when a (re-)layout is needed.- Specified by:
- initializein interface- edu.uci.ics.jung.algorithms.layout.Layout
 
 - 
resetpublic void reset() Called when ?- Specified by:
- resetin interface- edu.uci.ics.jung.algorithms.layout.Layout
 
 - 
getGraphpublic edu.uci.ics.jung.graph.Graph getGraph() Get the graph to be layouted.- Specified by:
- getGraphin interface- edu.uci.ics.jung.algorithms.layout.Layout
- Overrides:
- getGraphin class- edu.uci.ics.jung.algorithms.layout.AbstractLayout
 
 - 
setSizepublic void setSize(java.awt.Dimension size) Called, when the component is resized. New positions will be calculated on next redrawn.- Specified by:
- setSizein interface- edu.uci.ics.jung.algorithms.layout.Layout
- Overrides:
- setSizein class- edu.uci.ics.jung.algorithms.layout.AbstractLayout
 
 - 
getSizepublic java.awt.Dimension getSize() Get the size.- Specified by:
- getSizein interface- edu.uci.ics.jung.algorithms.layout.Layout
- Overrides:
- getSizein class- edu.uci.ics.jung.algorithms.layout.AbstractLayout
 
 - 
graphChangedpublic void graphChanged() Called, when the graph structure has changed. New layer structure will be calculated on next redraw.
 - 
layoutLayersprotected void layoutLayers() Called when a (re-)layout is needed. Arrange node in layers structure (lists of lists of nodes), which is independent of component size.
 - 
setPositionsprotected void setPositions() Called, when the component has been resized. Use layer structure to place nodes inside component bounds.
 - 
calcEdgeLengthsprotected double calcEdgeLengths(edu.uci.ics.jung.graph.Graph graph, INode node, int layer, int pos)Calculate the edge lengths between a node and its parents/children.
 
- 
 
-