org.dbe.eve.simulator
Class AbstractEdge
java.lang.Object
uchicago.src.sim.network.DefaultEdge
org.dbe.eve.simulator.AbstractEdge
- All Implemented Interfaces:
- uchicago.src.sim.gui.DrawableEdge, uchicago.src.sim.network.Edge
- Direct Known Subclasses:
- NetworkEdge, PartnerEdge, ProducerEdge
public class AbstractEdge
- extends uchicago.src.sim.network.DefaultEdge
- implements uchicago.src.sim.gui.DrawableEdge
The parent class for all types of edges
- Author:
- Roman Greil
| Fields inherited from class uchicago.src.sim.network.DefaultEdge |
from, label, strength, to, type |
|
Constructor Summary |
AbstractEdge()
|
AbstractEdge(uchicago.src.sim.network.Node from,
uchicago.src.sim.network.Node to,
float strength,
int distance,
java.awt.Color lineColor,
java.awt.Color serviceColor)
|
|
Method Summary |
void |
addService(Service s)
Add a servcie to the edge |
void |
draw(uchicago.src.sim.gui.SimGraphics g,
int fromX,
int toX,
int fromY,
int toY)
is called from repast when a edge should be drawn |
void |
moveServices()
Move all services on the edge to the next position |
void |
moveServicesBack()
Move all service on the edge back to the sender SME |
| Methods inherited from class uchicago.src.sim.network.DefaultEdge |
getFrom, getLabel, getStrength, getTo, getType, setFrom, setLabel, setStrength, setTo, setType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uchicago.src.sim.network.Edge |
getFrom, getLabel, getStrength, getTo, getType, setFrom, setLabel, setStrength, setTo, setType |
lineColor
private java.awt.Color lineColor
serviceColor
private java.awt.Color serviceColor
services
java.util.Hashtable services
distance
private int distance
AbstractEdge
public AbstractEdge()
AbstractEdge
public AbstractEdge(uchicago.src.sim.network.Node from,
uchicago.src.sim.network.Node to,
float strength,
int distance,
java.awt.Color lineColor,
java.awt.Color serviceColor)
draw
public void draw(uchicago.src.sim.gui.SimGraphics g,
int fromX,
int toX,
int fromY,
int toY)
- is called from repast when a edge should be drawn
- Specified by:
draw in interface uchicago.src.sim.gui.DrawableEdge
addService
public void addService(Service s)
- Add a servcie to the edge
- Parameters:
s - Service
moveServices
public void moveServices()
- Move all services on the edge to the next position
moveServicesBack
public void moveServicesBack()
- Move all service on the edge back to the sender SME