[Javanetsim-cvs] javaNetSim/guiUI GuiPC.java, 1.13, 1.14 MenuBar.java, 1.23, 1.24 WiFiPortPropertie
Status: Beta
Brought to you by:
darkkey
From: QweR <qw...@us...> - 2009-09-28 17:19:27
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13989/guiUI Modified Files: GuiPC.java MenuBar.java WiFiPortProperties.java Log Message: some little bugs Index: GuiPC.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiPC.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GuiPC.java 27 Oct 2008 16:09:02 -0000 1.13 --- GuiPC.java 28 Sep 2009 17:19:16 -0000 1.14 *************** *** 214,220 **** + "0", core.NetworkInterface.Console, false, 0); ! /*node.addNetworkInterface(core.NetworkInterface .getIntName(core.NetworkInterface.Wireless) ! + "0", core.NetworkInterface.Wireless, true, 0);*/ } --- 214,220 ---- + "0", core.NetworkInterface.Console, false, 0); ! node.addNetworkInterface(core.NetworkInterface .getIntName(core.NetworkInterface.Wireless) ! + "0", core.NetworkInterface.Wireless, true, 0); } Index: WiFiPortProperties.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/WiFiPortProperties.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WiFiPortProperties.java 17 Sep 2009 12:02:49 -0000 1.2 --- WiFiPortProperties.java 28 Sep 2009 17:19:16 -0000 1.3 *************** *** 51,54 **** --- 51,55 ---- import javax.swing.WindowConstants; + import core.DeviceConfig; import core.NetworkLayerDevice; import core.Simulation; *************** *** 319,328 **** backpanel.add(cmbMode, gridBagConstraints_12); ! cmbMode.addItem("Station"); if(Sim.getNode(NodeName) instanceof core.Router || Sim.getNode(NodeName) instanceof core.WirelessAP) cmbMode.addItem("AP"); ! if(((core.WiFiPort)Sim.getNode(NodeName).getNetworkInterface(NodeInt)).getMode() == core.WiFiPort.MODE_AP) ! cmbMode.setSelectedIndex(1); txtSSID = new JTextField(); --- 320,334 ---- backpanel.add(cmbMode, gridBagConstraints_12); ! if(!(Sim.getNode(NodeName) instanceof core.WirelessAP)) cmbMode.addItem("Station"); if(Sim.getNode(NodeName) instanceof core.Router || Sim.getNode(NodeName) instanceof core.WirelessAP) cmbMode.addItem("AP"); ! if(((core.WiFiPort)Sim.getNode(NodeName).getNetworkInterface(NodeInt)).getMode() == core.WiFiPort.MODE_AP){ ! int newModeIndex=-1; ! for(int i=0; i<cmbMode.getComponentCount() && newModeIndex==-1; i++){ ! if(cmbMode.getItemAt(i).equals("AP")) newModeIndex=i; ! } ! if(newModeIndex>=0) cmbMode.setSelectedIndex(newModeIndex); ! } txtSSID = new JTextField(); *************** *** 357,361 **** if(((core.WiFiPort)Sim.getNode(NodeName).getNetworkInterface(NodeInt)).isSharedAuth()) ! cmbChannel.setSelectedIndex(1); txtWEPKey = new JTextField(); --- 363,367 ---- if(((core.WiFiPort)Sim.getNode(NodeName).getNetworkInterface(NodeInt)).isSharedAuth()) ! cmbAuthMode.setSelectedIndex(1); txtWEPKey = new JTextField(); *************** *** 441,447 **** tmpNode.getConfig().executeCommand( ! "int " + NodeInt + " int wrl0 encryption key 1 size 40bit " + txtWEPKey.getText()); ! if(cmbAuthMode.getSelectedIndex() == 1) tmpNode.getConfig().executeCommand( "int " + NodeInt + " authentication open"); --- 447,456 ---- tmpNode.getConfig().executeCommand( ! "int " + NodeInt + " channel " + cmbChannel.getSelectedIndex()); ! tmpNode.getConfig().executeCommand( ! "int " + NodeInt + " encryption key 1 size 40bit " + txtWEPKey.getText()); ! ! if(cmbAuthMode.getSelectedIndex() == 0) tmpNode.getConfig().executeCommand( "int " + NodeInt + " authentication open"); *************** *** 450,462 **** "int " + NodeInt + " authentication shared"); ! if(cmbMode.getItemAt(cmbMode.getSelectedIndex()).equals("Station")) tmpNode.getConfig().executeCommand( ! "int " + NodeInt + "station-role client"); ! else tmpNode.getConfig().executeCommand( "int " + NodeInt + " station-role root access-point"); - - if (chkUP.isSelected()) { tmpNode.getConfig().executeCommand( --- 459,471 ---- "int " + NodeInt + " authentication shared"); ! if(cmbMode.getSelectedItem().equals("Station")){ tmpNode.getConfig().executeCommand( ! "int " + NodeInt + " station-role client"); ! } ! else{ tmpNode.getConfig().executeCommand( "int " + NodeInt + " station-role root access-point"); + } if (chkUP.isSelected()) { tmpNode.getConfig().executeCommand( Index: MenuBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MenuBar.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** MenuBar.java 27 Oct 2008 21:22:11 -0000 1.23 --- MenuBar.java 28 Sep 2009 17:19:16 -0000 1.24 *************** *** 62,67 **** private JMenuItem mnuClearConsole = new JMenuItem("Clear Console"); ! private JMenuItem mnuClearNodeInformation = new JMenuItem( ! "Clear Node Information"); private JMenu mnuFilters = new JMenu("Show simulation messages for:"); --- 62,67 ---- private JMenuItem mnuClearConsole = new JMenuItem("Clear Console"); ! private JMenuItem mnuRefreshNodeInformation = new JMenuItem( ! "Refresh Node Information"); private JMenu mnuFilters = new JMenu("Show simulation messages for:"); *************** *** 128,132 **** mnuClearConsole.setAccelerator(KeyStroke.getKeyStroke("F3")); ! mnuClearNodeInformation.setAccelerator(KeyStroke.getKeyStroke("F4")); mnuMsgLinkLayer.setAccelerator(KeyStroke.getKeyStroke("F9")); --- 128,132 ---- mnuClearConsole.setAccelerator(KeyStroke.getKeyStroke("F3")); ! mnuRefreshNodeInformation.setAccelerator(KeyStroke.getKeyStroke("F4")); mnuMsgLinkLayer.setAccelerator(KeyStroke.getKeyStroke("F9")); *************** *** 158,162 **** mnuEnvironment.add(mnuClearConsole); ! mnuEnvironment.add(mnuClearNodeInformation); mnuEnvironment.add(mnuFilters); mnuEnvironment.add(mnuFilters2); --- 158,162 ---- mnuEnvironment.add(mnuClearConsole); ! mnuEnvironment.add(mnuRefreshNodeInformation); mnuEnvironment.add(mnuFilters); mnuEnvironment.add(mnuFilters2); *************** *** 191,195 **** mnuEnvironment.setMnemonic('E'); mnuClearConsole.setMnemonic('C'); ! mnuClearNodeInformation.setMnemonic('N'); mnuHelp.setMnemonic('H'); mnuAbout.setMnemonic('A'); --- 191,195 ---- mnuEnvironment.setMnemonic('E'); mnuClearConsole.setMnemonic('C'); ! mnuRefreshNodeInformation.setMnemonic('N'); mnuHelp.setMnemonic('H'); mnuAbout.setMnemonic('A'); *************** *** 326,332 **** }); ! mnuClearNodeInformation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ! controller.clearNodeInformation(); } }); --- 326,332 ---- }); ! mnuRefreshNodeInformation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ! controller.refreshNodeInformationTab(); } }); |