[Javanetsim-cvs] javaNetSim/guiUI MainScreen.java,1.36,1.37 TelnetEmulator.java,1.6,1.7
Status: Beta
Brought to you by:
darkkey
From: QweR <qw...@us...> - 2006-02-27 00:49:20
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4214/guiUI Modified Files: MainScreen.java TelnetEmulator.java Log Message: Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** MainScreen.java 25 Feb 2006 22:48:34 -0000 1.36 --- MainScreen.java 27 Feb 2006 00:49:10 -0000 1.37 *************** *** 3003,3015 **** public void TelnetListen(String inNodeName){ ! String port = JOptionPane.showInputDialog(this, "Port:", "Set Telnet Server listening on port.", JOptionPane.QUESTION_MESSAGE); if(port!=null){ ! try{ ! Telnet_server telnet1 = ((Telnet_server)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(23)); ! telnet1.setPort(Integer.valueOf(port).intValue()); ! telnet1.Listen(); ! printLayerInfo(true); ! }catch(Exception e){ ! addToConsole(e.toString()); } } --- 3003,3019 ---- public void TelnetListen(String inNodeName){ ! String port = JOptionPane.showInputDialog(this, "Port:", "Set Telnet Server listening on port...", JOptionPane.QUESTION_MESSAGE); if(port!=null){ ! String pass = JOptionPane.showInputDialog(this, "Password:", "Set Telnet Server listening on port "+port+" with password...", JOptionPane.QUESTION_MESSAGE); ! if(pass!=null){ ! try{ ! Telnet_server telnet1 = ((Telnet_server)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(23)); ! telnet1.setPort(Integer.valueOf(port).intValue()); ! telnet1.setPassword(pass); ! telnet1.Listen(); ! printLayerInfo(true); ! }catch(Exception e){ ! addToConsole(e.toString()); ! } } } *************** *** 3186,3200 **** try{ printNetworkStart(); - //Timer timer = null; - //timer=new Timer(); - //timer.schedule(new TTask(this, 1),4000,4000); - //=<150 - //((Echo_tcp)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30021)).SendEcho(msg, ip, Integer.valueOf(port).intValue(), Integer.valueOf(cnt).intValue()); TelnetEmulator t = new TelnetEmulator(this, ((Telnet_client)((core.ApplicationLayerDevice)Sim.getNode(inNodeName)).getApp(30023)),ip,Integer.valueOf(port).intValue()); t.pack(); t.setVisible(true); - // - //this.addToConsole("Trying to send echo message '" + msg + "' from " + inNodeName + " to " + ip + ":" + port + "\n"); - }catch(Exception e){ addToConsole(e.toString()); --- 3190,3196 ---- Index: TelnetEmulator.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/TelnetEmulator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TelnetEmulator.java 25 Feb 2006 22:48:34 -0000 1.6 --- TelnetEmulator.java 27 Feb 2006 00:49:10 -0000 1.7 *************** *** 102,113 **** //terminal = new JLabel(text); terminal = new JTextArea(text); - terminal.setBackground(new Color(0)); - terminal.setForeground(Color.WHITE); terminal.setEnabled(false); terminal.setFont(new Font("Courier New", Font.PLAIN, 12)); panel = new JPanel(); scrollpane = new JScrollPane(); ! this.addKeyListener( kl = new KeyAdapter(){ public void keyPressed(KeyEvent e) { char c = e.getKeyChar(); --- 102,115 ---- //terminal = new JLabel(text); terminal = new JTextArea(text); terminal.setEnabled(false); + terminal.setEditable(false); + terminal.setBackground(Color.BLACK); + terminal.setForeground(Color.WHITE); terminal.setFont(new Font("Courier New", Font.PLAIN, 12)); panel = new JPanel(); scrollpane = new JScrollPane(); ! this.addKeyListener( kl = new KeyAdapter(){ ! // terminal.addKeyListener( kl = new KeyAdapter(){ public void keyPressed(KeyEvent e) { char c = e.getKeyChar(); *************** *** 117,125 **** printInfo(); } ! // else { // String s = String.valueOf(e.getKeyCode()).toString(); // sendData(s); // printInfo(); ! // } } }); --- 119,127 ---- printInfo(); } ! else { // String s = String.valueOf(e.getKeyCode()).toString(); // sendData(s); // printInfo(); ! } } }); |