[Javanetsim-cvs] javaNetSim/guiUI MainScreen.java, 1.43, 1.44 MenuBar.java, 1.4, 1.5 SetTCPIPProper
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-10-12 15:21:37
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26979/guiUI Modified Files: MainScreen.java MenuBar.java SetTCPIPPropertiesDialog.java Log Message: Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** MainScreen.java 23 Sep 2006 07:32:13 -0000 1.43 --- MainScreen.java 12 Oct 2006 15:21:24 -0000 1.44 *************** *** 1542,1545 **** --- 1542,1547 ---- public void deleteNode(String inNodeName, GuiNode inNode){ + if(JOptionPane.showConfirmDialog(this,"Delete " + inNodeName + "?","Confirm delete!",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION){ + try { *************** *** 1583,1586 **** --- 1585,1589 ---- } + } } *************** *** 3286,3291 **** int inIPCount = PS.getinputIPCount(); int outIPCount= PS.getoutputIPCount(); ! String msg = "Counters: \n\n Recieved IP Packets: " + Integer.valueOf(inIPCount).toString() + "\n Sent IP Packets: " + Integer.valueOf(outIPCount).toString() + "\n ARP Packets: " + Integer.valueOf(ARPCount).toString() + --- 3289,3301 ---- int inIPCount = PS.getinputIPCount(); int outIPCount= PS.getoutputIPCount(); + String msg = ""; ! try{ ! if(Sim.getNode(inNodeName) instanceof core.NetworkLayerDevice){ ! msg = "Counters: \n\n Recieved IP Packets: " + Integer.valueOf(inIPCount).toString() + ! "\n Sent IP Packets: " + Integer.valueOf(outIPCount).toString() + ! "\n ARP Packets: " + Integer.valueOf(ARPCount).toString(); ! }else{ ! msg = "Counters: \n\n Recieved IP Packets: " + Integer.valueOf(inIPCount).toString() + "\n Sent IP Packets: " + Integer.valueOf(outIPCount).toString() + "\n ARP Packets: " + Integer.valueOf(ARPCount).toString() + *************** *** 3297,3302 **** "\n Recieved UDP segments: " + Integer.valueOf(PS.getUDPinputCount()).toString() + "\n Sent UDP segments: " + Integer.valueOf(PS.getUDPoutputCount()).toString(); ! JOptionPane.showMessageDialog(this,msg,inNodeName + ": packet counters.",JOptionPane.INFORMATION_MESSAGE); } --- 3307,3313 ---- "\n Recieved UDP segments: " + Integer.valueOf(PS.getUDPinputCount()).toString() + "\n Sent UDP segments: " + Integer.valueOf(PS.getUDPoutputCount()).toString(); ! } JOptionPane.showMessageDialog(this,msg,inNodeName + ": packet counters.",JOptionPane.INFORMATION_MESSAGE); + }catch(Exception e){} } Index: MenuBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MenuBar.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MenuBar.java 2 Mar 2006 13:37:04 -0000 1.4 --- MenuBar.java 12 Oct 2006 15:21:24 -0000 1.5 *************** *** 68,72 **** private JMenu mnuHelp = new JMenu("Help"); private JMenuItem mnuAbout = new JMenuItem("About..."); ! private JMenuItem mnuHelpPane = new JMenuItem("Help..."); --- 68,72 ---- private JMenu mnuHelp = new JMenu("Help"); private JMenuItem mnuAbout = new JMenuItem("About..."); ! //private JMenuItem mnuHelpPane = new JMenuItem("Help..."); *************** *** 126,130 **** //Add items to help mnuHelp.add(mnuAbout); ! mnuHelp.add(mnuHelpPane); // Set up Mnemonics for menu bar. --- 126,130 ---- //Add items to help mnuHelp.add(mnuAbout); ! //mnuHelp.add(mnuHelpPane); // Set up Mnemonics for menu bar. *************** *** 160,164 **** mnuHelp.setMnemonic('H'); mnuAbout.setMnemonic('A'); ! mnuHelpPane.setMnemonic('H'); --- 160,164 ---- mnuHelp.setMnemonic('H'); mnuAbout.setMnemonic('A'); ! //mnuHelpPane.setMnemonic('H'); *************** *** 351,359 **** }); */ ! mnuHelpPane.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ controller.showHelpPane(); } ! }); --- 351,359 ---- }); */ ! /*mnuHelpPane.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ controller.showHelpPane(); } ! });*/ Index: SetTCPIPPropertiesDialog.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SetTCPIPPropertiesDialog.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SetTCPIPPropertiesDialog.java 8 Nov 2005 04:04:28 -0000 1.1.1.1 --- SetTCPIPPropertiesDialog.java 12 Oct 2006 15:21:24 -0000 1.2 *************** *** 484,490 **** lblError.setVisible(false); IPAddress = ip; ! SubnetMask = Simulation.getDefaultSubnetMask(IPAddress); ! txtSubnetMask.setText(SubnetMask); ! txtSubnetMask.setEnabled(true); ErrorFlag = false; } --- 484,492 ---- lblError.setVisible(false); IPAddress = ip; ! if(txtSubnetMask.getText().equals("Enter Subnet Mask") || txtSubnetMask.getText() == null || txtSubnetMask.getText().equals("0.0.0.0")){ ! SubnetMask = Simulation.getDefaultSubnetMask(IPAddress); ! txtSubnetMask.setText(SubnetMask); ! txtSubnetMask.setEnabled(true); ! } ErrorFlag = false; } *************** *** 552,558 **** --- 554,562 ---- if(Simulation.validateDecIP(tempip)){ + if(txtSubnetMask.getText().equals("Enter Subnet Mask") || txtSubnetMask.getText() == null || txtSubnetMask.getText().equals("0.0.0.0")){ String tempSubnet = Simulation.getDefaultSubnetMask(tempip); txtSubnetMask.setText(tempSubnet); txtSubnetMask.setEnabled(true); + } btnOk.setEnabled(true); }else{ |