83838bb85a
Collection. Provided in PR 15687 by Ola Eriksson (ola@mrEriksson.net), modified by myself. Flan is a network simluator written in java, and is now fully functionnal. The IP protocol is implemented, with a quite complete RIPv2 routing algorithm. The protocols are also written in java, so GO AHEAD ! Flan is under GNU Public License, so download it, modify it, and distribute it. The networks are now encoded in XML, using XMLCoDe. This very useful library (included in the flan tarball as jars) automatically creates an XML image of a java object, like the flan nets (XMLCoDe is entirely written by Sylvain Guerin).
35 lines
909 B
Text
35 lines
909 B
Text
$NetBSD: patch-aa,v 1.1.1.1 2002/07/24 11:59:02 agc Exp $
|
|
|
|
--- graphic/Graphique.java 2002/07/24 11:42:22 1.1
|
|
+++ graphic/Graphique.java 2002/07/24 11:48:27
|
|
@@ -46,6 +46,7 @@
|
|
public class Graphique extends CBufferedCanvas implements ItemListener
|
|
{
|
|
protected StatManager statManager;
|
|
+ protected boolean statManagerSet;
|
|
|
|
/**
|
|
* The list of all the traces
|
|
@@ -112,6 +113,7 @@
|
|
public void setStatManager(StatManager statManager)
|
|
{
|
|
this.statManager = statManager;
|
|
+ this.statManagerSet = true;
|
|
}
|
|
|
|
/**
|
|
@@ -178,7 +180,13 @@
|
|
|
|
// At first, see if the trace is in out bounds
|
|
|
|
- int iteration= statManager.getIteration(); // just a temp variable
|
|
+ int iteration;
|
|
+
|
|
+ if (statManagerSet)
|
|
+ iteration = statManager.getIteration(); // just a temp variable
|
|
+ else
|
|
+ iteration = 0;
|
|
+
|
|
|
|
if (iteration > xMax)
|
|
xMax = iteration;
|