Package org.insa.graphs.gui.observers
Class WeaklyConnectedComponentGraphicObserver
- java.lang.Object
-
- org.insa.graphs.gui.observers.WeaklyConnectedComponentGraphicObserver
-
- All Implemented Interfaces:
WeaklyConnectedComponentObserver
public class WeaklyConnectedComponentGraphicObserver extends java.lang.Object implements WeaklyConnectedComponentObserver
-
-
Field Summary
Fields Modifier and Type Field Description private int
cindex
private static java.awt.Color[]
COLORS
private PointSetOverlay
grPoints
-
Constructor Summary
Constructors Constructor Description WeaklyConnectedComponentGraphicObserver(Drawing drawing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
notifyEndComponent(java.util.ArrayList<Node> nodes)
Notify that the algorithm has computed a new component.void
notifyNewNodeInComponent(Node node)
Notify that a new node has been found for the current component.void
notifyStartComponent(Node curNode)
Notify that the algorithm is entering a new component.
-
-
-
Field Detail
-
COLORS
private static final java.awt.Color[] COLORS
-
grPoints
private PointSetOverlay grPoints
-
cindex
private int cindex
-
-
Constructor Detail
-
WeaklyConnectedComponentGraphicObserver
public WeaklyConnectedComponentGraphicObserver(Drawing drawing)
-
-
Method Detail
-
notifyStartComponent
public void notifyStartComponent(Node curNode)
Description copied from interface:WeaklyConnectedComponentObserver
Notify that the algorithm is entering a new component.- Specified by:
notifyStartComponent
in interfaceWeaklyConnectedComponentObserver
- Parameters:
curNode
- Starting node for the component.
-
notifyNewNodeInComponent
public void notifyNewNodeInComponent(Node node)
Description copied from interface:WeaklyConnectedComponentObserver
Notify that a new node has been found for the current component.- Specified by:
notifyNewNodeInComponent
in interfaceWeaklyConnectedComponentObserver
- Parameters:
node
- New node found for the current component.
-
notifyEndComponent
public void notifyEndComponent(java.util.ArrayList<Node> nodes)
Description copied from interface:WeaklyConnectedComponentObserver
Notify that the algorithm has computed a new component.- Specified by:
notifyEndComponent
in interfaceWeaklyConnectedComponentObserver
- Parameters:
nodes
- List of nodes in the component.
-
-