Thread: [Javanetsim-cvs] javaNetSim/guiUI ApplicationLayerDevice.java, 1.13, 1.14 DataLinkLayerDevice.java,
Status: Beta
Brought to you by:
darkkey
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4280/guiUI Modified Files: ApplicationLayerDevice.java DataLinkLayerDevice.java EthPortProperties.java GuiCSUDSU.java GuiExternalProxy.java GuiHub.java GuiLaptop.java GuiMultilayerSwitch.java GuiNode.java GuiPC.java GuiPrinter.java GuiRouter.java GuiSwitch.java GuiWirelessAP.java HelpWindow.java InfoBox.java LinkDialog.java LinkLayerPanel.java LinkProperties.java MainScreen.java MenuBar.java NetworkLayerDevice.java NodePropertiesDialog.java PingDialog.java PosixTelnetClientGUI.java SNMPSendDataDialog.java SandBox.java SerPortProperties.java SetTCPIPPropertiesDialog.java SimulationToolBar.java SplashWindow.java StandardToolBar.java TelnetEmulator.java Terminal.java ToolBar.java WANPortProperties.java Log Message: Refactoring && bugfixing Index: TelnetEmulator.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/TelnetEmulator.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TelnetEmulator.java 1 Oct 2007 04:58:13 -0000 1.12 --- TelnetEmulator.java 24 Oct 2008 16:18:48 -0000 1.13 *************** *** 11,29 **** package guiUI; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; ! import java.awt.Color; ! import java.awt.event.WindowEvent; ! import java.awt.event.KeyAdapter; ! import java.awt.event.KeyEvent; ! import core.protocolsuite.tcp_ip.Telnet_client; import core.CommunicationException; - import core.LowLinkException; import core.InvalidNetworkLayerDeviceException; import core.TransportLayerException; ! import java.awt.Font; ! import java.awt.event.KeyListener; /** --- 11,31 ---- package guiUI; + import java.awt.Color; + import java.awt.Font; + import java.awt.event.KeyAdapter; + import java.awt.event.KeyEvent; + import java.awt.event.KeyListener; + import java.awt.event.WindowEvent; + import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; ! import core.CommunicationException; import core.InvalidNetworkLayerDeviceException; + import core.LowLinkException; import core.TransportLayerException; ! import core.protocolsuite.tcp_ip.Telnet_client; /** *************** *** 32,36 **** */ public class TelnetEmulator extends JFrame { ! private final Telnet_client telnet; private JPanel panel; private JScrollPane scrollpane; --- 34,42 ---- */ public class TelnetEmulator extends JFrame { ! /** ! * ! */ ! private static final long serialVersionUID = -6645304083337196382L; ! private final Telnet_client telnet; private JPanel panel; private JScrollPane scrollpane; *************** *** 68,74 **** this.addKeyListener( kl = new KeyAdapter(){ // terminal.addKeyListener( kl = new KeyAdapter(){ ! public void keyPressed(KeyEvent e) { char c = e.getKeyChar(); ! if((int)c<65535) { String s; switch(c){ --- 74,81 ---- this.addKeyListener( kl = new KeyAdapter(){ // terminal.addKeyListener( kl = new KeyAdapter(){ ! @Override ! public void keyPressed(KeyEvent e) { char c = e.getKeyChar(); ! if(c<65535) { String s; switch(c){ *************** *** 97,101 **** this.addWindowListener( new java.awt.event.WindowAdapter() { ! public void windowClosing(WindowEvent winEvt) { exitWindow(); } --- 104,109 ---- this.addWindowListener( new java.awt.event.WindowAdapter() { ! @Override ! public void windowClosing(WindowEvent winEvt) { exitWindow(); } Index: Terminal.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/Terminal.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Terminal.java 22 Oct 2008 16:15:30 -0000 1.20 --- Terminal.java 24 Oct 2008 16:18:48 -0000 1.21 *************** *** 11,40 **** package guiUI; - import core.ApplicationLayerDevice; - import core.CommunicationException; - import core.DeviceConfig; - import core.InvalidNetworkLayerDeviceException; - import core.LowLinkException; - import core.TransportLayerException; - - import javax.swing.JFrame; - import javax.swing.JPanel; - import javax.swing.JTextField; - import javax.swing.JScrollPane; - import javax.swing.JTextArea; - import javax.swing.InputVerifier; import java.awt.BorderLayout; import java.awt.Color; - import java.awt.event.WindowEvent; import java.awt.Font; import java.awt.event.KeyListener; import java.util.Vector; ! import core.CommandInterface; ! import core.Version; ! import java.awt.event.KeyEvent; import javax.swing.JComponent; ! import core.Pair; import core.CommandProcessor; import core.InvalidNetworkInterfaceNameException; import core.CommandInterface.Modes; import core.protocolsuite.tcp_ip.DNS; --- 11,41 ---- package guiUI; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; + import java.awt.event.KeyEvent; import java.awt.event.KeyListener; + import java.awt.event.WindowEvent; import java.util.Vector; ! ! import javax.swing.InputVerifier; import javax.swing.JComponent; ! import javax.swing.JFrame; ! import javax.swing.JPanel; ! import javax.swing.JScrollPane; ! import javax.swing.JTextArea; ! import javax.swing.JTextField; ! ! import core.ApplicationLayerDevice; ! import core.CommandInterface; import core.CommandProcessor; + import core.CommunicationException; + import core.DeviceConfig; import core.InvalidNetworkInterfaceNameException; + import core.InvalidNetworkLayerDeviceException; + import core.LowLinkException; + import core.Pair; + import core.TransportLayerException; + import core.Version; import core.CommandInterface.Modes; import core.protocolsuite.tcp_ip.DNS; *************** *** 49,53 **** public class Terminal extends JFrame { ! protected final static int DEF_MODE = 0; protected final static int IF_MODE = 1; protected final static int ACL_MODE = 2; --- 50,58 ---- public class Terminal extends JFrame { ! /** ! * ! */ ! private static final long serialVersionUID = -1484879879775885583L; ! protected final static int DEF_MODE = 0; protected final static int IF_MODE = 1; protected final static int ACL_MODE = 2; *************** *** 65,71 **** CmdVerifier cmdverifier = new CmdVerifier(); private Modes current_mode; - private int device_type; private CommandProcessor cmdproc; ! private int interface_mode = DEF_MODE; private String command_prefix = ""; private boolean blocked = false; --- 70,75 ---- CmdVerifier cmdverifier = new CmdVerifier(); private Modes current_mode; private CommandProcessor cmdproc; ! private int interface_mode = Terminal.DEF_MODE; private String command_prefix = ""; private boolean blocked = false; *************** *** 218,222 **** case 0x0A: { if(cmdline.getText().compareTo("")!=0) { ! if(history.size()>=max_history) history.remove(0); history.add(cmdline.getText()); pos_history = history.size(); --- 222,226 ---- case 0x0A: { if(cmdline.getText().compareTo("")!=0) { ! if(history.size()>=Terminal.max_history) history.remove(0); history.add(cmdline.getText()); pos_history = history.size(); *************** *** 285,289 **** if(history.size()>0) { if(pos_history == history.size() && cmdline.getText().compareTo("")!=0) { ! if(history.size()>=max_history) history.remove(0); history.add(cmdline.getText()); pos_history = history.size()-1; --- 289,293 ---- if(history.size()>0) { if(pos_history == history.size() && cmdline.getText().compareTo("")!=0) { ! if(history.size()>=Terminal.max_history) history.remove(0); history.add(cmdline.getText()); pos_history = history.size()-1; *************** *** 405,409 **** public String call(Vector<String> params){ if(current_mode.conf_mode == CommandInterface.CONF_MODE){ ! interface_mode = DEF_MODE; command_prefix = ""; current_mode.conf_mode = CommandInterface.STD_MODE; --- 409,413 ---- public String call(Vector<String> params){ if(current_mode.conf_mode == CommandInterface.CONF_MODE){ ! interface_mode = Terminal.DEF_MODE; command_prefix = ""; current_mode.conf_mode = CommandInterface.STD_MODE; *************** *** 420,425 **** public String call(Vector<String> params){ if(current_mode.conf_mode == CommandInterface.CONF_MODE){ ! if(interface_mode!=DEF_MODE){ ! interface_mode = DEF_MODE; command_prefix = ""; } --- 424,429 ---- public String call(Vector<String> params){ if(current_mode.conf_mode == CommandInterface.CONF_MODE){ ! if(interface_mode!=Terminal.DEF_MODE){ ! interface_mode = Terminal.DEF_MODE; command_prefix = ""; } *************** *** 441,446 **** } public String call(Vector<String> params){ ! if(interface_mode!=DEF_MODE){ ! interface_mode = DEF_MODE; command_prefix = ""; } --- 445,450 ---- } public String call(Vector<String> params){ ! if(interface_mode!=Terminal.DEF_MODE){ ! interface_mode = Terminal.DEF_MODE; command_prefix = ""; } *************** *** 462,467 **** try { device.getNetworkInterface(params.get(0)); ! if(interface_mode==DEF_MODE){ ! interface_mode = IF_MODE; command_prefix = "interface "+params.get(0); } --- 466,471 ---- try { device.getNetworkInterface(params.get(0)); ! if(interface_mode==Terminal.DEF_MODE){ ! interface_mode = Terminal.IF_MODE; command_prefix = "interface "+params.get(0); } *************** *** 619,623 **** if(pi<count-1){ try { ! sleep(delay); } catch (InterruptedException e) { } --- 623,627 ---- if(pi<count-1){ try { ! Thread.sleep(delay); } catch (InterruptedException e) { } Index: SetTCPIPPropertiesDialog.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SetTCPIPPropertiesDialog.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SetTCPIPPropertiesDialog.java 21 Oct 2008 11:50:25 -0000 1.11 --- SetTCPIPPropertiesDialog.java 24 Oct 2008 16:18:48 -0000 1.12 *************** *** 30,67 **** package guiUI; - import core.InvalidNetworkInterfaceNameException; - import core.InvalidNetworkLayerDeviceException; - import core.InvalidNodeNameException; - import core.NetworkLayerDevice; - import core.Node; - import core.protocolsuite.tcp_ip.IPV4Address; - import core.protocolsuite.tcp_ip.InvalidIPAddressException; - import core.protocolsuite.tcp_ip.InvalidSubnetMaskException; - import javax.swing.JFrame; - import javax.swing.JPanel; - import java.awt.GridBagLayout; - import javax.swing.JDialog; - import javax.swing.JLabel; - import javax.swing.JTextField; - import java.awt.Insets; - import java.awt.GridBagConstraints; import java.awt.BorderLayout; ! import javax.swing.JButton; import java.awt.Dimension; ! import java.awt.event.ActionListener; import java.awt.event.ActionEvent; ! import javax.swing.JComboBox; ! import core.Simulation; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.awt.Color; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; ! import java.awt.event.FocusAdapter; ! import java.awt.event.FocusEvent; import java.util.Arrays; ! import java.awt.Component; import javax.swing.SwingConstants; --- 30,65 ---- package guiUI; import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Component; import java.awt.Dimension; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.Insets; import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.awt.event.FocusAdapter; ! import java.awt.event.FocusEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; import java.util.Arrays; ! ! import javax.swing.JButton; ! import javax.swing.JComboBox; ! import javax.swing.JDialog; ! import javax.swing.JFrame; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.JTextField; import javax.swing.SwingConstants; + import javax.swing.WindowConstants; + + import core.NetworkLayerDevice; + import core.Node; + import core.Simulation; + import core.protocolsuite.tcp_ip.IPV4Address; *************** *** 75,78 **** --- 73,80 ---- */ public class SetTCPIPPropertiesDialog extends javax.swing.JDialog { + /** + * + */ + private static final long serialVersionUID = 7663707499126963363L; private JPanel backpanel; private JLabel lblInterface; *************** *** 134,138 **** btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); --- 136,140 ---- btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); *************** *** 245,248 **** --- 247,251 ---- txtIpAddress = new JTextField(); txtIpAddress.addFocusListener(new FocusAdapter() { + @Override public void focusLost(FocusEvent e) { ipAddressEntered(); *************** *** 250,256 **** --- 253,261 ---- }); txtIpAddress.addKeyListener(new KeyAdapter() { + @Override public void keyReleased(KeyEvent e) { // checkForDefaultSubnet(); } + @Override public void keyPressed(KeyEvent e) { // checkForDefaultSubnet(); *************** *** 258,261 **** --- 263,267 ---- }); txtIpAddress.addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { txtIpAddress.selectAll(); *************** *** 282,285 **** --- 288,292 ---- txtSubnetMask.addFocusListener(new FocusAdapter() { + @Override public void focusLost(FocusEvent e) { subnetmask(); *************** *** 292,295 **** --- 299,303 ---- }); txtSubnetMask.addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { txtSubnetMask.selectAll(); *************** *** 325,328 **** --- 333,337 ---- txtDefaultGW = new JTextField(); txtDefaultGW.addFocusListener(new FocusAdapter() { + @Override public void focusLost(FocusEvent e) { setDefaultGW(); *************** *** 340,343 **** --- 349,353 ---- }); txtDefaultGW.addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { txtDefaultGW.selectAll(); Index: SNMPSendDataDialog.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SNMPSendDataDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SNMPSendDataDialog.java 15 Sep 2007 18:50:49 -0000 1.3 --- SNMPSendDataDialog.java 24 Oct 2008 16:18:48 -0000 1.4 *************** *** 30,59 **** package guiUI; ! import javax.swing.JFrame; ! import javax.swing.JPanel; import java.awt.GridBagLayout; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JTextField; ! import java.awt.Insets; ! import java.awt.GridBagConstraints; ! import java.awt.BorderLayout; ! import javax.swing.JButton; ! import java.awt.Dimension; ! import java.awt.event.ActionListener; ! import java.awt.event.ActionEvent; ! import javax.swing.JComboBox; import core.Simulation; - import java.awt.event.MouseAdapter; - import java.awt.event.MouseEvent; - import java.awt.Color; - import java.awt.event.KeyAdapter; - import java.awt.event.KeyEvent; - import java.awt.event.FocusAdapter; - import java.awt.event.FocusEvent; - import java.util.Arrays; - import java.awt.Component; - import javax.swing.SwingConstants; - import java.util.Vector; import core.protocolsuite.tcp_ip.SNMP; --- 30,51 ---- package guiUI; ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.GridBagConstraints; import java.awt.GridBagLayout; + import java.awt.Insets; + import java.awt.event.ActionEvent; + import java.awt.event.ActionListener; + import java.util.Vector; + + import javax.swing.JButton; import javax.swing.JDialog; + import javax.swing.JFrame; import javax.swing.JLabel; + import javax.swing.JPanel; import javax.swing.JTextField; ! import javax.swing.WindowConstants; ! import core.Simulation; import core.protocolsuite.tcp_ip.SNMP; *************** *** 67,71 **** */ public class SNMPSendDataDialog extends javax.swing.JDialog { ! private JPanel backpanel; private JLabel lblIPAddress; private JLabel lblPort; --- 59,67 ---- */ public class SNMPSendDataDialog extends javax.swing.JDialog { ! /** ! * ! */ ! private static final long serialVersionUID = 2769275985951166051L; ! private JPanel backpanel; private JLabel lblIPAddress; private JLabel lblPort; *************** *** 122,126 **** this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); //this.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); this.setLocationRelativeTo(null); --- 118,122 ---- this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); //this.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE); this.setLocationRelativeTo(null); Index: GuiPC.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiPC.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GuiPC.java 18 Oct 2008 19:55:31 -0000 1.11 --- GuiPC.java 24 Oct 2008 16:18:48 -0000 1.12 *************** *** 55,67 **** package guiUI; - import core.InvalidNodeNameException; - import core.Node; - - import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JMenuItem; ! import javax.swing.JMenu; /** --- 55,64 ---- package guiUI; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JMenuItem; ! ! import core.Node; /** *************** *** 85,88 **** --- 82,90 ---- /** * + */ + private static final long serialVersionUID = 816132267929695723L; + + /** + * * @param inName * The name of the PC *************** *** 198,201 **** --- 200,204 ---- } + @Override public void addInterfaces(MainScreen parent, Node node) { Index: SandBox.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SandBox.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SandBox.java 6 Oct 2008 13:20:39 -0000 1.11 --- SandBox.java 24 Oct 2008 16:18:48 -0000 1.12 *************** *** 29,37 **** import java.awt.Cursor; import java.awt.Point; ! import java.awt.event.*; ! import java.awt.*; import javax.swing.JLayeredPane; - import javax.swing.JDesktopPane; /** --- 29,44 ---- import java.awt.Cursor; + import java.awt.Dimension; + import java.awt.Image; import java.awt.Point; ! import java.awt.Toolkit; ! import java.awt.event.ComponentEvent; ! import java.awt.event.ComponentListener; ! import java.awt.event.InputEvent; ! import java.awt.event.MouseEvent; ! import java.awt.event.MouseListener; ! import java.awt.event.MouseMotionListener; ! import javax.swing.JLayeredPane; /** *************** *** 49,52 **** --- 56,63 ---- public class SandBox extends JLayeredPane implements MouseListener, MouseMotionListener, ComponentListener{ + /** + * + */ + private static final long serialVersionUID = -7676829472573372306L; public static final int PC_CURSOR = 0; public static final int ROUTER_CURSOR = 1; *************** *** 60,64 **** private Cursor csrDefault = new Cursor(Cursor.DEFAULT_CURSOR); private MainScreen controller; - private GuiNode tempNode; private Point cursorLocation = new Point(0,0); private LinkLayerPanel pnlLinkLayer; --- 71,74 ---- *************** *** 187,196 **** public void mouseClicked(MouseEvent e) { ! if(e.getModifiers() == MouseEvent.BUTTON3_MASK) { controller.setIsLink(false); controller.setAllHighlightsOff(); } ! if(e.getModifiers() == MouseEvent.BUTTON1_MASK) { --- 197,206 ---- public void mouseClicked(MouseEvent e) { ! if(e.getModifiers() == InputEvent.BUTTON3_MASK) { controller.setIsLink(false); controller.setAllHighlightsOff(); } ! if(e.getModifiers() == InputEvent.BUTTON1_MASK) { Index: GuiNode.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiNode.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GuiNode.java 22 Oct 2008 21:33:00 -0000 1.10 --- GuiNode.java 24 Oct 2008 16:18:48 -0000 1.11 *************** *** 55,83 **** package guiUI; ! import javax.swing.*; ! ! import java.awt.dnd.*; ! ! import java.awt.datatransfer.*; ! ! import java.awt.*; ! import java.awt.event.ActionEvent; - import java.awt.event.ActionListener; ! import java.awt.event.MouseEvent; - import java.awt.event.MouseListener; - import java.awt.event.MouseMotionListener; - import java.io.Serializable; ! import java.net.URL; ! ! import java.util.*; ! import core.*; /** --- 55,100 ---- package guiUI; ! import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Cursor; ! import java.awt.Dimension; ! import java.awt.Point; ! import java.awt.datatransfer.DataFlavor; ! import java.awt.datatransfer.StringSelection; ! import java.awt.datatransfer.Transferable; ! import java.awt.dnd.DnDConstants; ! import java.awt.dnd.DragGestureEvent; ! import java.awt.dnd.DragGestureListener; ! import java.awt.dnd.DragSource; ! import java.awt.dnd.DragSourceDragEvent; ! import java.awt.dnd.DragSourceDropEvent; ! import java.awt.dnd.DragSourceEvent; ! import java.awt.dnd.DragSourceListener; ! import java.awt.dnd.DropTarget; ! import java.awt.dnd.DropTargetDragEvent; ! import java.awt.dnd.DropTargetDropEvent; ! import java.awt.dnd.DropTargetEvent; ! import java.awt.dnd.DropTargetListener; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.awt.event.InputEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.io.Serializable; + import java.util.Iterator; + import java.util.Vector; ! import javax.swing.BorderFactory; ! import javax.swing.ImageIcon; ! import javax.swing.JLabel; ! import javax.swing.JMenu; ! import javax.swing.JMenuItem; ! import javax.swing.JPanel; ! import javax.swing.JPopupMenu; ! import javax.swing.SwingConstants; ! import core.Node; ! import core.Simulation; /** *************** *** 149,155 **** private int SandBoxHeight; ! private int lastX; ! private int lastY; private int controlX; --- 166,172 ---- private int SandBoxHeight; ! //private int lastX; ! //private int lastY; private int controlX; *************** *** 205,209 **** lblNodeName.setText(inName); ! lblNodeName.setHorizontalAlignment(JLabel.CENTER); SandBoxWidth = (int) controller.getSandboxSize().getWidth(); --- 222,226 ---- lblNodeName.setText(inName); ! lblNodeName.setHorizontalAlignment(SwingConstants.CENTER); SandBoxWidth = (int) controller.getSandboxSize().getWidth(); *************** *** 221,225 **** lblIcon.setIcon(nodeIcon); ! lblIcon.setHorizontalAlignment((JLabel.CENTER)); // Set the layout of this jPanel --- 238,242 ---- lblIcon.setIcon(nodeIcon); ! lblIcon.setHorizontalAlignment((SwingConstants.CENTER)); // Set the layout of this jPanel *************** *** 238,242 **** // this.setBounds(0,0,75,55); ! this.setBounds(0, 0, NodeWidth + 10, NodeHeight + 10); this.addMouseListener(this); --- 255,259 ---- // this.setBounds(0,0,75,55); ! this.setBounds(0, 0, GuiNode.NodeWidth + 10, GuiNode.NodeHeight + 10); this.addMouseListener(this); *************** *** 306,309 **** --- 323,327 ---- } + @Override public void setEnabled(boolean e) { lblIcon.setEnabled(e); *************** *** 684,688 **** // Set popup menu for right click here. ! if (e.getModifiers() == MouseEvent.BUTTON3_MASK) { boolean ena = controller.isOn(lblNodeName.getText()); --- 702,706 ---- // Set popup menu for right click here. ! if (e.getModifiers() == InputEvent.BUTTON3_MASK) { boolean ena = controller.isOn(lblNodeName.getText()); *************** *** 717,721 **** { ! if (e.getModifiers() == MouseEvent.BUTTON1_MASK) { --- 735,739 ---- { ! if (e.getModifiers() == InputEvent.BUTTON1_MASK) { *************** *** 733,739 **** else { ! lastX = this.getX() + e.getX() - this.getWidth(); ! lastY = this.getY() + e.getY() - this.getHeight(); controlX = this.getX() + e.getX() + this.getWidth() / 2; --- 751,757 ---- else { ! //lastX = this.getX() + e.getX() - this.getWidth(); ! //lastY = this.getY() + e.getY() - this.getHeight(); controlX = this.getX() + e.getX() + this.getWidth() / 2; *************** *** 802,805 **** --- 820,824 ---- */ + @Override public String getName() Index: GuiRouter.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiRouter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** GuiRouter.java 23 Oct 2008 17:08:27 -0000 1.7 --- GuiRouter.java 24 Oct 2008 16:18:48 -0000 1.8 *************** *** 83,86 **** --- 83,91 ---- /** * + */ + private static final long serialVersionUID = -5079851235537869986L; + + /** + * * @param inName * The name of the router *************** *** 117,120 **** --- 122,126 ---- } + @Override public void addInterfaces(MainScreen parent, Node node) { Index: LinkProperties.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/LinkProperties.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LinkProperties.java 21 Oct 2008 11:50:24 -0000 1.9 --- LinkProperties.java 24 Oct 2008 16:18:48 -0000 1.10 *************** *** 30,61 **** package guiUI; - import core.InvalidLinkNameException; - import core.InvalidNetworkInterfaceNameException; - import core.InvalidNodeNameException; - import javax.swing.JFrame; - import javax.swing.JPanel; - import java.awt.GridBagLayout; - import javax.swing.JDialog; - import javax.swing.JLabel; - import javax.swing.JTextField; - import java.awt.Insets; - import java.awt.GridBagConstraints; import java.awt.BorderLayout; ! import javax.swing.JButton; import java.awt.Dimension; ! import java.awt.event.ActionListener; import java.awt.event.ActionEvent; ! import javax.swing.JComboBox; ! import core.Simulation; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.awt.Color; ! import java.awt.event.KeyAdapter; ! import java.awt.event.KeyEvent; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.util.Arrays; ! import java.awt.Component; import javax.swing.SwingConstants; /** --- 30,59 ---- package guiUI; import java.awt.BorderLayout; ! import java.awt.Component; import java.awt.Dimension; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.Insets; import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.util.Arrays; ! ! import javax.swing.JButton; ! import javax.swing.JComboBox; ! import javax.swing.JDialog; ! import javax.swing.JFrame; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.JTextField; import javax.swing.SwingConstants; + import javax.swing.WindowConstants; + + import core.InvalidLinkNameException; + import core.InvalidNetworkInterfaceNameException; + import core.InvalidNodeNameException; + import core.Simulation; /** *************** *** 68,71 **** --- 66,73 ---- */ public class LinkProperties extends javax.swing.JDialog { + /** + * + */ + private static final long serialVersionUID = -7313505773384166380L; private JPanel backpanel; private JLabel lblInterface; *************** *** 80,90 **** private MainScreen controller; private Simulation Sim; ! private SandBox SBox; ! ! private String NodeName=""; private String Interface=""; - private boolean ErrorFlag = true; - public LinkProperties(JFrame frame, Object nodeArray[], int selectedIndex, Simulation Sim, SandBox SBox) { super(frame); --- 82,88 ---- private MainScreen controller; private Simulation Sim; ! private String NodeName=""; private String Interface=""; public LinkProperties(JFrame frame, Object nodeArray[], int selectedIndex, Simulation Sim, SandBox SBox) { super(frame); *************** *** 92,97 **** controller = (MainScreen)frame; this.Sim = Sim; ! this.SBox = SBox; ! setTitle("Link Properties"); initGUI(nodeArray,selectedIndex); --- 90,94 ---- controller = (MainScreen)frame; this.Sim = Sim; ! setTitle("Link Properties"); initGUI(nodeArray,selectedIndex); *************** *** 123,127 **** btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); --- 120,124 ---- btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); *************** *** 226,229 **** --- 223,227 ---- txtProp = new JTextField(); txtProp.addFocusListener(new FocusAdapter() { + @Override public void focusLost(FocusEvent e) { //ipAddressEntered(); Index: EthPortProperties.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/EthPortProperties.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EthPortProperties.java 21 Oct 2008 11:50:24 -0000 1.6 --- EthPortProperties.java 24 Oct 2008 16:18:48 -0000 1.7 *************** *** 31,65 **** package guiUI; - import core.InvalidLinkNameException; - import core.InvalidNetworkInterfaceNameException; - import core.InvalidNodeNameException; - import core.Node; - import core.NetworkLayerDevice; - import javax.swing.JFrame; - import javax.swing.JPanel; - import java.awt.GridBagLayout; - import javax.swing.JDialog; - import javax.swing.JLabel; - import javax.swing.JTextField; - import javax.swing.JCheckBox; - import java.awt.Insets; - import java.awt.GridBagConstraints; import java.awt.BorderLayout; ! import javax.swing.JButton; import java.awt.Dimension; ! import java.awt.event.ActionListener; import java.awt.event.ActionEvent; ! import javax.swing.JComboBox; ! import core.Simulation; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.awt.Color; ! import java.awt.event.KeyAdapter; ! import java.awt.event.KeyEvent; import java.awt.event.FocusAdapter; ! import java.awt.event.FocusEvent; ! import java.util.Arrays; ! import java.awt.Component; import javax.swing.SwingConstants; /** --- 31,57 ---- package guiUI; import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Component; import java.awt.Dimension; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.Insets; import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; ! ! import javax.swing.JButton; ! import javax.swing.JCheckBox; ! import javax.swing.JDialog; ! import javax.swing.JFrame; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.JTextField; import javax.swing.SwingConstants; + import javax.swing.WindowConstants; + + import core.NetworkLayerDevice; + import core.Simulation; /** *************** *** 72,75 **** --- 64,71 ---- */ public class EthPortProperties extends javax.swing.JDialog { + /** + * + */ + private static final long serialVersionUID = -8725131940909728794L; private JPanel backpanel; private JLabel lblInterface, cmbInterface; *************** *** 89,99 **** private String NodeInt=""; - private boolean ErrorFlag = true; - public EthPortProperties(JFrame frame, String inNodeName, String inNodeInt, Simulation Sim) { super(frame); ! this.NodeName = inNodeName; ! this.NodeInt = inNodeInt; setResizable(false); --- 85,94 ---- private String NodeInt=""; public EthPortProperties(JFrame frame, String inNodeName, String inNodeInt, Simulation Sim) { super(frame); ! this.NodeName = inNodeName; ! this.NodeInt = inNodeInt; ! this.Sim = Sim; setResizable(false); *************** *** 129,133 **** btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); --- 124,128 ---- btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); *************** *** 241,249 **** txtMAC = new JTextField(); ! txtMAC.addFocusListener(new FocusAdapter() { ! public void actionPerformed(ActionEvent e) { ! lblError.setVisible(false); ! } ! }); txtMAC.setEnabled(true); --- 236,244 ---- txtMAC = new JTextField(); ! txtMAC.addFocusListener(new FocusAdapter() { ! public void actionPerformed(ActionEvent e) { ! lblError.setVisible(false); ! } ! }); txtMAC.setEnabled(true); *************** *** 254,261 **** gridBagConstraints_3.gridx = 1; backpanel.add(txtMAC, gridBagConstraints_3); ! txtMAC.setText(Sim.getNode(NodeName).getMACAddress(NodeInt)); ! chkUP = new JCheckBox(); ! chkUP.setEnabled(true); final GridBagConstraints gridBagConstraints_4 = new GridBagConstraints(); gridBagConstraints_4.fill = GridBagConstraints.HORIZONTAL; --- 249,257 ---- gridBagConstraints_3.gridx = 1; backpanel.add(txtMAC, gridBagConstraints_3); ! ! txtMAC.setText( Sim.getNode(NodeName).getMACAddress(NodeInt)); ! chkUP = new JCheckBox(); ! chkUP.setEnabled(true); final GridBagConstraints gridBagConstraints_4 = new GridBagConstraints(); gridBagConstraints_4.fill = GridBagConstraints.HORIZONTAL; *************** *** 318,322 **** lblError.setVisible(true); controller.shakeDiaLog(this); - ErrorFlag = true; } } catch (Exception e) { --- 314,317 ---- Index: SimulationToolBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SimulationToolBar.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SimulationToolBar.java 6 Oct 2008 13:20:39 -0000 1.5 --- SimulationToolBar.java 24 Oct 2008 16:18:48 -0000 1.6 *************** *** 58,72 **** import java.awt.Color; - import java.awt.event.ActionEvent; - import java.awt.event.ActionListener; import javax.swing.ImageIcon; - import javax.swing.JButton; - import javax.swing.JOptionPane; - --- 58,67 ---- *************** *** 89,92 **** --- 84,94 ---- public class SimulationToolBar extends ToolBar{ + /** + * + */ + private static final long serialVersionUID = -4864249995312706530L; + + + private ClassLoader cl = this.getClass().getClassLoader(); Index: LinkDialog.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/LinkDialog.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LinkDialog.java 13 Oct 2007 12:57:00 -0000 1.4 --- LinkDialog.java 24 Oct 2008 16:18:48 -0000 1.5 *************** *** 33,37 **** import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.util.*; import javax.swing.BoxLayout; --- 33,37 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.util.Arrays; import javax.swing.BoxLayout; *************** *** 44,47 **** --- 44,48 ---- import javax.swing.JPanel; import javax.swing.JTextField; + import javax.swing.SwingConstants; /** *************** *** 54,57 **** --- 55,62 ---- class LinkDialog extends JDialog implements ActionListener { + /** + * + */ + private static final long serialVersionUID = 2863636695410784080L; private JButton btnCancel = new JButton("Cancel"); private JButton btnOK = new JButton("OK"); *************** *** 96,102 **** JLabel lblMessage = new JLabel("Please select the interface card for the specific nodes"); JLabel lblNameLink = new JLabel("Name of Link : "); ! lblFirstNode.setHorizontalAlignment(JLabel.CENTER); ! lblSecondNode.setHorizontalAlignment(JLabel.CENTER); ! lblMessage.setHorizontalAlignment(JLabel.CENTER); txtLinkName.setPreferredSize(new Dimension(80, 25)); --- 101,107 ---- JLabel lblMessage = new JLabel("Please select the interface card for the specific nodes"); JLabel lblNameLink = new JLabel("Name of Link : "); ! lblFirstNode.setHorizontalAlignment(SwingConstants.CENTER); ! lblSecondNode.setHorizontalAlignment(SwingConstants.CENTER); ! lblMessage.setHorizontalAlignment(SwingConstants.CENTER); txtLinkName.setPreferredSize(new Dimension(80, 25)); Index: SerPortProperties.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SerPortProperties.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SerPortProperties.java 14 Sep 2008 20:51:29 -0000 1.4 --- SerPortProperties.java 24 Oct 2008 16:18:48 -0000 1.5 *************** *** 31,65 **** package guiUI; - import core.InvalidLinkNameException; - import core.InvalidNetworkInterfaceNameException; - import core.InvalidNodeNameException; - import core.Node; - import core.NetworkLayerDevice; - import javax.swing.JFrame; - import javax.swing.JPanel; - import java.awt.GridBagLayout; - import javax.swing.JDialog; - import javax.swing.JLabel; - import javax.swing.JTextField; - import javax.swing.JCheckBox; - import java.awt.Insets; - import java.awt.GridBagConstraints; import java.awt.BorderLayout; ! import javax.swing.JButton; import java.awt.Dimension; ! import java.awt.event.ActionListener; import java.awt.event.ActionEvent; ! import javax.swing.JComboBox; ! import core.Simulation; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.awt.Color; ! import java.awt.event.KeyAdapter; ! import java.awt.event.KeyEvent; import java.awt.event.FocusAdapter; ! import java.awt.event.FocusEvent; ! import java.util.Arrays; ! import java.awt.Component; import javax.swing.SwingConstants; /** --- 31,57 ---- package guiUI; import java.awt.BorderLayout; ! import java.awt.Color; ! import java.awt.Component; import java.awt.Dimension; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.Insets; import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; ! ! import javax.swing.JButton; ! import javax.swing.JCheckBox; ! import javax.swing.JDialog; ! import javax.swing.JFrame; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.JTextField; import javax.swing.SwingConstants; + import javax.swing.WindowConstants; + + import core.NetworkLayerDevice; + import core.Simulation; /** *************** *** 72,75 **** --- 64,71 ---- */ public class SerPortProperties extends javax.swing.JDialog { + /** + * + */ + private static final long serialVersionUID = -5208725858132395638L; private JPanel backpanel; private JLabel lblInterface, cmbInterface; *************** *** 85,95 **** private MainScreen controller; private Simulation Sim; ! private SandBox SBox; ! ! private String NodeName=""; private String NodeInt=""; - private boolean ErrorFlag = true; - public SerPortProperties(JFrame frame, String inNodeName, String inNodeInt, Simulation Sim, SandBox SBox) { super(frame); --- 81,87 ---- private MainScreen controller; private Simulation Sim; ! private String NodeName=""; private String NodeInt=""; public SerPortProperties(JFrame frame, String inNodeName, String inNodeInt, Simulation Sim, SandBox SBox) { super(frame); *************** *** 101,106 **** controller = (MainScreen)frame; this.Sim = Sim; ! this.SBox = SBox; ! setTitle("WAN Port Properties"); initGUI(inNodeName, inNodeInt); --- 93,97 ---- controller = (MainScreen)frame; this.Sim = Sim; ! setTitle("WAN Port Properties"); initGUI(inNodeName, inNodeInt); *************** *** 132,136 **** btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); --- 123,127 ---- btnCancel.setText("Cancel"); this.getRootPane().setDefaultButton(btnOk); ! this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setLocationRelativeTo(null); this.setModal(true); *************** *** 246,250 **** txtCR.addFocusListener(new FocusAdapter() { public void actionPerformed(ActionEvent e) { ! lblError.setVisible(false); } }); --- 237,241 ---- txtCR.addFocusListener(new FocusAdapter() { public void actionPerformed(ActionEvent e) { ! lblError.setVisible(false); } }); *************** *** 329,333 **** lblError.setVisible(true); controller.shakeDiaLog(this); - ErrorFlag = true; } } catch (Exception e) { --- 320,323 ---- Index: PingDialog.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/PingDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PingDialog.java 15 Sep 2007 11:34:58 -0000 1.3 --- PingDialog.java 24 Oct 2008 16:18:48 -0000 1.4 *************** *** 31,40 **** import java.awt.FlowLayout; import java.awt.event.ActionEvent; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; ! import javax.swing.*; ! import java.awt.event.*; /** --- 31,44 ---- import java.awt.FlowLayout; import java.awt.event.ActionEvent; + import java.awt.event.ActionListener; + import javax.swing.BoxLayout; import javax.swing.JButton; + import javax.swing.JComboBox; + import javax.swing.JDialog; import javax.swing.JLabel; + import javax.swing.JOptionPane; import javax.swing.JPanel; ! import javax.swing.JTextField; /** *************** *** 45,51 **** public class PingDialog extends JDialog implements ActionListener { private JLabel lblMessage = new JLabel("Send Ping"); private JLabel lblSourceLabel = new JLabel("Source :"); - private JComboBox cboSource; private JLabel lblDestinationLabel = new JLabel("Destination IP :"); private JTextField txtDestinationIP = new JTextField(15); --- 49,58 ---- public class PingDialog extends JDialog implements ActionListener { + /** + * + */ + private static final long serialVersionUID = -1088992961468735310L; private JLabel lblMessage = new JLabel("Send Ping"); private JLabel lblSourceLabel = new JLabel("Source :"); private JLabel lblDestinationLabel = new JLabel("Destination IP :"); private JTextField txtDestinationIP = new JTextField(15); Index: MenuBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MenuBar.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MenuBar.java 6 Oct 2008 13:20:39 -0000 1.20 --- MenuBar.java 24 Oct 2008 16:18:48 -0000 1.21 *************** *** 1,10 **** package guiUI; - import core.Version; - import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import javax.swing.*; /** --- 1,15 ---- package guiUI; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import javax.swing.JCheckBoxMenuItem; ! import javax.swing.JMenu; ! import javax.swing.JMenuBar; ! import javax.swing.JMenuItem; ! import javax.swing.JOptionPane; ! import javax.swing.KeyStroke; ! ! import core.Version; /** *************** *** 19,22 **** --- 24,32 ---- public class MenuBar extends JMenuBar { + /** + * + */ + private static final long serialVersionUID = 7498213676250919283L; + private MainScreen controller; Index: LinkLayerPanel.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/LinkLayerPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LinkLayerPanel.java 19 Oct 2007 15:57:01 -0000 1.6 --- LinkLayerPanel.java 24 Oct 2008 16:18:48 -0000 1.7 *************** *** 58,77 **** import java.awt.BasicStroke; ! import java.awt.Graphics; - import java.awt.Graphics2D; - - import java.awt.geom.*; - - import java.awt.Color; - import java.awt.Point; ! ! import java.util.Hashtable; ! import java.util.Enumeration; ! ! import javax.swing.JPanel; --- 58,69 ---- import java.awt.BasicStroke; ! import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; ! import java.awt.geom.Line2D; ! import java.awt.geom.Point2D; import java.util.Enumeration; ! import java.util.Hashtable; import javax.swing.JPanel; *************** *** 105,108 **** --- 97,105 ---- + /** + * + */ + private static final long serialVersionUID = 6226572644195993822L; + final static String FAKELINE = new String("FakeLine"); *************** *** 216,220 **** if(inWhichEnd == 1){ ! Point2D p1 = (Point2D)inPosition; Point2D p2 = myLine.Line.getP2(); --- 213,217 ---- if(inWhichEnd == 1){ ! Point2D p1 = inPosition; Point2D p2 = myLine.Line.getP2(); *************** *** 226,230 **** Point2D p1 = myLine.Line.getP1(); ! Point2D p2 = (Point2D)inPosition; myLine.Line.setLine(p1,p2); --- 223,227 ---- Point2D p1 = myLine.Line.getP1(); ! Point2D p2 = inPosition; myLine.Line.setLine(p1,p2); *************** *** 250,253 **** --- 247,251 ---- */ + @Override public void paint(Graphics g) Index: NetworkLayerDevice.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/NetworkLayerDevice.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NetworkLayerDevice.java 14 Sep 2007 11:14:51 -0000 1.9 --- NetworkLayerDevice.java 24 Oct 2008 16:18:48 -0000 1.10 *************** *** 59,73 **** - import java.awt.Dimension; - import java.awt.event.ActionEvent; - import java.awt.event.ActionListener; - - - import javax.swing.JMenuItem; - import javax.swing.JMenu; --- 59,67 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JMenu; + import javax.swing.JMenuItem; Index: NodePropertiesDialog.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/NodePropertiesDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NodePropertiesDialog.java 13 Oct 2007 12:57:00 -0000 1.3 --- NodePropertiesDialog.java 24 Oct 2008 16:18:48 -0000 1.4 *************** *** 57,75 **** ! import javax.swing.JButton; import javax.swing.JDialog; ! import javax.swing.JPanel; ! ! import javax.swing.*; ! ! import java.awt.event.*; ! ! import java.awt.*; ! ! import java.util.*; ! ! import javax.swing.table.*; --- 57,76 ---- ! import java.awt.Dimension; ! import java.awt.FlowLayout; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.util.ArrayList; ! import java.util.Vector; + import javax.swing.BoxLayout; + import javax.swing.JButton; import javax.swing.JDialog; ! import javax.swing.JFrame; ! import javax.swing.JLabel; import javax.swing.JPanel; ! import javax.swing.JScrollPane; ! import javax.swing.JTable; ! import javax.swing.table.TableModel; *************** *** 95,98 **** --- 96,104 ---- + /** + * + */ + private static final long serialVersionUID = -8899776864912613856L; + private JLabel lblNodeNameLabel = new JLabel("Node Name : "); Index: GuiMultilayerSwitch.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiMultilayerSwitch.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiMultilayerSwitch.java 22 Oct 2008 21:33:00 -0000 1.2 --- GuiMultilayerSwitch.java 24 Oct 2008 16:18:48 -0000 1.3 *************** *** 85,88 **** --- 85,92 ---- /** + * + */ + private static final long serialVersionUID = -7713023657795807625L; + /** * @param inName The name of the switch *************** *** 106,109 **** --- 110,114 ---- } + @Override public void addInterfaces(MainScreen parent, Node node){ Index: DataLinkLayerDevice.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/DataLinkLayerDevice.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DataLinkLayerDevice.java 21 Oct 2008 11:50:24 -0000 1.5 --- DataLinkLayerDevice.java 24 Oct 2008 16:18:48 -0000 1.6 *************** *** 58,68 **** import java.awt.event.ActionEvent; - - - import java.awt.event.ActionListener; - - import javax.swing.JMenuItem; --- 58,63 ---- Index: StandardToolBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/StandardToolBar.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StandardToolBar.java 13 Sep 2007 13:38:53 -0000 1.2 --- StandardToolBar.java 24 Oct 2008 16:18:48 -0000 1.3 *************** *** 30,36 **** import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ImageIcon; import javax.swing.JButton; - import javax.swing.JOptionPane; --- 30,36 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import javax.swing.ImageIcon; import javax.swing.JButton; *************** *** 44,47 **** --- 44,52 ---- public class StandardToolBar extends ToolBar { + /** + * + */ + private static final long serialVersionUID = -4244939315299762795L; + private ClassLoader cl = this.getClass().getClassLoader(); Index: GuiExternalProxy.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiExternalProxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiExternalProxy.java 6 Oct 2008 13:20:39 -0000 1.2 --- GuiExternalProxy.java 24 Oct 2008 16:18:48 -0000 1.3 *************** *** 41,44 **** --- 41,49 ---- /** + * + */ + private static final long serialVersionUID = -662756743865057582L; + + /** * @param inName The name of the router * @param inMainscreen The JFrame that the router will be created on *************** *** 49,52 **** --- 54,58 ---- } + @Override public void addInterfaces(MainScreen parent, Node node){ Index: GuiPrinter.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiPrinter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiPrinter.java 6 Oct 2008 13:20:39 -0000 1.2 --- GuiPrinter.java 24 Oct 2008 16:18:48 -0000 1.3 *************** *** 5,8 **** --- 5,13 ---- public class GuiPrinter extends ApplicationLayerDevice { + /** + * + */ + private static final long serialVersionUID = -6715607641533125774L; + public GuiPrinter(String inName, MainScreen inMainScreen) { *************** *** 11,14 **** --- 16,20 ---- } + @Override public void addInterfaces(MainScreen parent, Node node) { Index: GuiCSUDSU.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiCSUDSU.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiCSUDSU.java 6 Oct 2008 13:20:39 -0000 1.2 --- GuiCSUDSU.java 24 Oct 2008 16:18:48 -0000 1.3 *************** *** 8,11 **** --- 8,16 ---- /** + * + */ + private static final long serialVersionUID = -5724485576670507704L; + + /** * @param inName The name of the switch *************** *** 21,24 **** --- 26,30 ---- } + @Override public void addInterfaces(MainScreen parent, Node node){ ((core.CSUDSU)node).addSerialInterface(); Index: ToolBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/ToolBar.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ToolBar.java 13 Sep 2007 13:38:53 -0000 1.2 --- ToolBar.java 24 Oct 2008 16:18:48 -0000 1.3 *************** *** 29,33 **** ! import javax.swing.*; /** --- 29,34 ---- ! import javax.swing.BorderFactory; ! import javax.swing.JToolBar; /** Index: GuiWirelessAP.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiWirelessAP.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GuiWirelessAP.java 6 Oct 2008 13:20:39 -0000 1.3 --- GuiWirelessAP.java 24 Oct 2008 16:18:48 -0000 1.4 *************** *** 78,81 **** --- 78,86 ---- /** * + */ + private static final long serialVersionUID = 1997659214891266475L; + + /** + * * @param inName * The name of the switch *************** *** 92,95 **** --- 97,101 ---- } + @Override public void addInterfaces(MainScreen parent, Node node) { Index: InfoBox.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/InfoBox.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InfoBox.java 26 Dec 2007 17:43:16 -0000 1.2 --- InfoBox.java 24 Oct 2008 16:18:48 -0000 1.3 *************** *** 9,13 **** package guiUI; ! import javax.swing.*; /** --- 9,17 ---- package guiUI; ! import javax.swing.JButton; ! import javax.swing.JDialog; ! import javax.swing.JLabel; ! import javax.swing.JScrollPane; ! import javax.swing.JTextArea; /** *************** *** 19,23 **** //private static final long serialVersionUID = -5836895270535785031L; ! JTextArea message = new JTextArea(); JScrollPane scroll = new JScrollPane(); JLabel w1 = new JLabel(" "); --- 23,31 ---- //private static final long serialVersionUID = -5836895270535785031L; ! /** ! * ! */ ! private static final long serialVersionUID = 8155022723311994317L; ! JTextArea message = new JTextArea(); JScrollPane scroll = new JScrollPane(); JLabel w1 = new JLabel(" "); *************** *** 35,40 **** public InfoBox(java.awt.Frame owner, String title, String mes){ super(owner, title, true); ! setLocation(owner.getLocation().x+(owner.getWidth()-wx)/2,owner.getLocation().y+(owner.getHeight()-hy)/2); ! setData(mes, wx, hy); } --- 43,48 ---- public InfoBox(java.awt.Frame owner, String title, String mes){ super(owner, title, true); ! setLocation(owner.getLocation().x+(owner.getWidth()-InfoBox.wx)/2,owner.getLocation().y+(owner.getHeight()-InfoBox.hy)/2); ! setData(mes, InfoBox.wx, InfoBox.hy); } Index: PosixTelnetClientGUI.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/PosixTelnetClientGUI.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PosixTelnetClientGUI.java 23 Sep 2008 15:22:17 -0000 1.3 --- PosixTelnetClientGUI.java 24 Oct 2008 16:18:48 -0000 1.4 *************** *** 11,83 **** package guiUI; - import javax.swing.JFrame; - - import javax.swing.JPanel; - - //import java.awt.GridBagLayout; - - //import javax.swing.JDialog; - - //import javax.swing.JLabel; - - import javax.swing.JTextField; - import javax.swing.JScrollPane; - - import javax.swing.JTextArea; - - //import java.awt.Insets; - - //import java.awt.GridBagConstraints; - import java.awt.BorderLayout; - - /*import javax.swing.JButton; - - import java.awt.Dimension; - - import java.awt.event.ActionListener; - - import java.awt.event.ActionEvent; - - import javax.swing.JComboBox; - - import core.Simulation; - - import java.awt.event.MouseAdapter; - - import java.awt.event.MouseEvent;*/ - import java.awt.Color; ! ! //import java.awt.event.WindowAdapter; ! ! import java.awt.event.... [truncated message content] |