[Javanetsim-cvs] javaNetSim/guiUI MainScreen.java, 1.52, 1.53 MenuBar.java, 1.11, 1.12
Status: Beta
Brought to you by:
darkkey
From: QweR <qw...@us...> - 2007-09-13 20:23:36
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6925/guiUI Modified Files: MainScreen.java MenuBar.java Log Message: Èñïðàâëåíû Print Route Table è Print ARP Table Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** MainScreen.java 13 Sep 2007 15:07:20 -0000 1.52 --- MainScreen.java 13 Sep 2007 20:23:29 -0000 1.53 *************** *** 3231,3263 **** public void printARP(String inNodeName) - { ! ! try{ ! ! this.addToConsole("ARP entries for :" + inNodeName + "\n"); ! ! String ArpTable[] = Sim.getARPTable(inNodeName); ! ! for(int i=0;i<ArpTable.length;i++) ! ! { ! ! this.addToConsole(ArpTable[i] + "\n"); ! ! } ! ! ! ! } ! ! catch(Exception e) ! ! { ! ! //Should never get here. ! ! } ! } --- 3231,3248 ---- public void printARP(String inNodeName) { ! try{ ! String s = ""; ! s+="ARP entries for :" + inNodeName + "\n"; ! String ArpTable[] = Sim.getARPTable(inNodeName); ! for(int i=0;i<ArpTable.length;i++) ! { ! s+=ArpTable[i] + "\n"; ! } ! InfoBox ib = new InfoBox(this, "ARP table", s); ! } ! catch(Exception e){ ! //Should never get here. ! } } *************** *** 3640,3653 **** public void PrintRouteTable(String inNodeName){ String routes[] = Sim.getRouteTableEntries(inNodeName); ! ! this.addToConsole("IP routing table:\n" + "Destination" + "\t" + "Gateway" + "\t" + "Genmask" + "\t" + "Type" + "\t" + "Iface\n"); for(int i=0; i<routes.length - 1; i++){ - Route_entry r = Sim.getRouteEntry(inNodeName, routes[i]); ! ! this.addToConsole(routes[i] + "\t" + r.gateway + "\t" + r.genMask + "\t" + r.Type + "\t" + r.iFace + "\n"); ! } } --- 3625,3637 ---- public void PrintRouteTable(String inNodeName){ String routes[] = Sim.getRouteTableEntries(inNodeName); ! String s = ""; ! s+="IP routing table:\n" + "Destination" + "\t" + "Gateway" + "\t" + "Genmask" + "\t" + "Type" + "\t" + "Iface\n"; for(int i=0; i<routes.length - 1; i++){ Route_entry r = Sim.getRouteEntry(inNodeName, routes[i]); ! s+=routes[i] + "\t" + r.gateway + "\t" + r.genMask + "\t" + r.Type + "\t" + r.iFace + "\n"; } + InfoBox ib = new InfoBox(this, "Route table", s); + } Index: MenuBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MenuBar.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MenuBar.java 13 Sep 2007 19:59:57 -0000 1.11 --- MenuBar.java 13 Sep 2007 20:23:29 -0000 1.12 *************** *** 72,76 **** private JMenuItem mnuAbout = new JMenuItem("About..."); private JMenuItem mnuHelpPane = new JMenuItem("ReadMe/ChangeLog"); - private JMenuItem mnuHelpTestPane = new JMenuItem("Test"); --- 72,75 ---- *************** *** 155,164 **** mnuHelp.add(mnuHelpPane); mnuHelp.add(mnuAbout); - mnuHelp.add(mnuHelpTestPane); - mnuHelpTestPane.addActionListener(new ActionListener(){ - public void actionPerformed(ActionEvent e){ - InfoBox ib = new InfoBox(controller, "Test", "Testtestetstetstestestetestesttestest"); - } - }); // Set up Mnemonics for menu bar. --- 154,157 ---- |