[Javanetsim-cvs] javaNetSim/guiUI MainScreen.java,1.18,1.19
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2005-12-04 16:26:41
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19425/guiUI Modified Files: MainScreen.java Log Message: Timer printLayerInfo(). Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MainScreen.java 3 Dec 2005 19:23:19 -0000 1.18 --- MainScreen.java 4 Dec 2005 16:26:30 -0000 1.19 *************** *** 115,119 **** --- 115,121 ---- import core.protocolsuite.tcp_ip.Route_entry; + import java.util.Timer; + import java.util.TimerTask; import core.protocolsuite.tcp_ip.Echo; *************** *** 1057,1061 **** if(vecRecordedInfo.size()==0){ ! pnlConsole.append("No entries to display. \n"); }else{ --- 1059,1063 ---- if(vecRecordedInfo.size()==0){ ! //pnlConsole.append("No entries to display. \n"); }else{ *************** *** 2973,2976 **** --- 2975,2998 ---- } + + + + public class TTask extends TimerTask + { + private MainScreen ms; + + public TTask (MainScreen ms) + { + this.ms=ms; + + } + + + public void run() + { + ms.printLayerInfo(); + this.cancel(); + } + } /** *************** *** 2999,3002 **** --- 3021,3028 ---- printNetworkStart(); + + Timer timer = null; + timer=new Timer(); + timer.schedule(new TTask(this),4000,4000); ((Echo_tcp)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30017)).SendEcho(msg, ip, Integer.valueOf(port).intValue()); |