Package org.insa.graphs.gui.observers
Class ShortestPathGraphicObserver
- java.lang.Object
-
- org.insa.graphs.gui.observers.ShortestPathGraphicObserver
-
- All Implemented Interfaces:
ShortestPathObserver
public class ShortestPathGraphicObserver extends java.lang.Object implements ShortestPathObserver
-
-
Field Summary
Fields Modifier and Type Field Description protected Drawing
drawing
protected PointSetOverlay
psOverlay1
protected PointSetOverlay
psOverlay2
-
Constructor Summary
Constructors Constructor Description ShortestPathGraphicObserver(Drawing drawing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
notifyDestinationReached(Node node)
Notify the observer that the destination has been reached.void
notifyNodeMarked(Node node)
Notify the observer that a node has been marked, i.e.void
notifyNodeReached(Node node)
Notify the observer that a node has been reached for the first time.void
notifyOriginProcessed(Node node)
Notify the observer that the origin has been processed.
-
-
-
Field Detail
-
drawing
protected Drawing drawing
-
psOverlay1
protected PointSetOverlay psOverlay1
-
psOverlay2
protected PointSetOverlay psOverlay2
-
-
Constructor Detail
-
ShortestPathGraphicObserver
public ShortestPathGraphicObserver(Drawing drawing)
-
-
Method Detail
-
notifyOriginProcessed
public void notifyOriginProcessed(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that the origin has been processed.- Specified by:
notifyOriginProcessed
in interfaceShortestPathObserver
- Parameters:
node
- Origin.
-
notifyNodeReached
public void notifyNodeReached(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that a node has been reached for the first time.- Specified by:
notifyNodeReached
in interfaceShortestPathObserver
- Parameters:
node
- Node that has been reached.
-
notifyNodeMarked
public void notifyNodeMarked(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that a node has been marked, i.e. its final value has been set.- Specified by:
notifyNodeMarked
in interfaceShortestPathObserver
- Parameters:
node
- Node that has been marked.
-
notifyDestinationReached
public void notifyDestinationReached(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that the destination has been reached.- Specified by:
notifyDestinationReached
in interfaceShortestPathObserver
- Parameters:
node
- Destination.
-
-