[Javanetsim-cvs] javaNetSim/guiUI GuiCSUDSU.java, NONE, 1.1 GuiHub.java, 1.2, 1.3 GuiNode.java, 1.4
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2007-10-15 18:26:02
|
Update of /cvsroot/javanetsim/javaNetSim/guiUI In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24241/guiUI Modified Files: GuiHub.java GuiNode.java GuiPC.java GuiRouter.java GuiSwitch.java MainScreen.java MenuBar.java SandBox.java SimulationToolBar.java Added Files: GuiCSUDSU.java Log Message: CSU/DSU Unit added; new graphics; wan interface TCP external connection... Index: MenuBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MenuBar.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MenuBar.java 15 Sep 2007 18:50:49 -0000 1.15 --- MenuBar.java 15 Oct 2007 18:25:54 -0000 1.16 *************** *** 56,59 **** --- 56,60 ---- private JMenuItem mnuHub = new JMenuItem("Hub ..."); private JMenuItem mnuSwitch = new JMenuItem("Switch ..."); + private JMenuItem mnuCSUDSU = new JMenuItem("CSU/DSU device..."); private JMenuItem mnuExternalNAT = new JMenuItem("Socks Proxy..."); *************** *** 129,132 **** --- 130,134 ---- mnuAdd.add(mnuHub); mnuAdd.add(mnuSwitch); + mnuAdd.add(mnuCSUDSU); mnuAdd.add(mnuExternalNAT); *************** *** 210,213 **** --- 212,223 ---- }); + //Add action listener to new CSU/DSU menuitem + mnuCSUDSU.addActionListener(new ActionListener(){ + public void actionPerformed(ActionEvent e){ + controller.setAllHighlightsOff(); + controller.addingNode(SandBox.CSUDSU_CURSOR); + } + }); + //Add action listener to new router menuitem mnuRouter.addActionListener(new ActionListener(){ Index: GuiSwitch.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiSwitch.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiSwitch.java 13 Sep 2007 13:38:52 -0000 1.2 --- GuiSwitch.java 15 Oct 2007 18:25:54 -0000 1.3 *************** *** 1,47 **** /* Java Firewall Simulator (jFirewallSim) Copyright (c) 2004, jFirewallSim development team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Canberra Institute of Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package guiUI; /** * <P>The GuiSwitch class is used to instantiate new Switches on the GUI</P> * * @author luke_hamilton * @since 15th November 2004 * @version v0.20 */ public class GuiSwitch extends DataLinkLayerDevice { /** * @param inName The name of the switch * @param inMainscreen The JFrame that the Switch will be created on */ public GuiSwitch(String inName, MainScreen inMainScreen) { ! super(inName, inMainScreen,"images/simulation/switch_large.gif"); } } --- 1,94 ---- /* + Java Firewall Simulator (jFirewallSim) + + Copyright (c) 2004, jFirewallSim development team All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list + of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. + - Neither the name of the Canberra Institute of Technology nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + package guiUI; + + /** + * <P>The GuiSwitch class is used to instantiate new Switches on the GUI</P> + * + * @author luke_hamilton + * @since 15th November 2004 + * @version v0.20 + */ + + public class GuiSwitch extends DataLinkLayerDevice { + + /** + * @param inName The name of the switch + * @param inMainscreen The JFrame that the Switch will be created on + */ + public GuiSwitch(String inName, MainScreen inMainScreen) { ! ! super(inName, inMainScreen,"images/simulation/switch.png"); ! } + } + Index: SimulationToolBar.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SimulationToolBar.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimulationToolBar.java 12 Oct 2006 17:26:26 -0000 1.2 --- SimulationToolBar.java 15 Oct 2007 18:25:54 -0000 1.3 *************** *** 1,200 **** ! /* ! Java Firewall Simulator (jFirewallSim) ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! Redistribution and use in source and binary forms, with or without modification, are ! permitted provided that the following conditions are met: ! ! - Redistributions of source code must retain the above copyright notice, this list ! of conditions and the following disclaimer. ! - Redistributions in binary form must reproduce the above copyright notice, this list ! of conditions and the following disclaimer in the documentation and/or other ! materials provided with the distribution. ! - Neither the name of the Canberra Institute of Technology nor the names of its ! contributors may be used to endorse or promote products derived from this software ! without specific prior written permission. ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! */ ! package guiUI; ! ! 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; ! ! /** ! * <P>The SimulationToolBar class is the toolbar used for creating new Nodes</P> ! * ! * @author VC2 Team. ! * @since 15th November 2004 ! * @version v0.20 ! */ ! ! public class SimulationToolBar extends ToolBar{ ! private ClassLoader cl = this.getClass().getClassLoader(); ! ! private JButton btnNewPC = new JButton(new ImageIcon(cl.getResource("images/simulation/PC_small.gif"))); ! private JButton btnNewRouter = new JButton(new ImageIcon(cl.getResource("images/simulation/router_small.gif"))); ! private JButton btnNewSwitch = new JButton(new ImageIcon(cl.getResource("images/simulation/switch_small.gif"))); ! private JButton btnNewHub = new JButton(new ImageIcon(cl.getResource("images/simulation/hub_small.gif"))); ! private JButton btnNewLink = new JButton(new ImageIcon(cl.getResource("images/simulation/link.gif"))); ! ! Color activatedColor = Color.RED; ! Color deactivatedColor = btnNewLink.getBackground(); ! ! /** ! * Constructor to build a SimulationToolBar ! * @param inMainScreen The JFrame that the SimulationToolBar will be placed on. ! */ ! public SimulationToolBar(MainScreen inMainScreen) { ! super(inMainScreen); ! ! // Call method to create the toolbar ! ! buildToolbar(); ! } ! ! /** ! * This method is called from the constructor of SimulationToolBar ! * It sets up the buttons, action listeners, tooltips and borders for the ! * buttons on the Simulation toolbar. ! * @author VC2 Team. ! * @version v0.20 ! **/ ! ! private void buildToolbar(){ ! ! //Set the tooltips for these buttons ! ! btnNewPC.setToolTipText("Creates a new PC"); ! btnNewRouter.setToolTipText("Creats a new Router"); ! btnNewLink.setToolTipText("Creates a new Link between two nodes"); ! btnNewSwitch.setToolTipText("Creates a new Switch"); ! btnNewHub.setToolTipText("Creates a new Hub"); ! ! //Set the buttons to have no borders so that they don't make the toolbar look like crap. ! btnNewPC.setBorderPainted(false); ! btnNewRouter.setBorderPainted(false); ! btnNewLink.setBorderPainted(false); ! btnNewSwitch.setBorderPainted(false); ! btnNewHub.setBorderPainted(false); ! ! //Set action listener for PC toolbar item ! btnNewPC.addActionListener(new ActionListener(){ ! public void actionPerformed(ActionEvent e){ ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! highlightButton(btnNewPC, true); ! controller.addingNode(SandBox.PC_CURSOR); ! } ! }); ! ! //Set action listener for Hub toolbar item ! btnNewHub.addActionListener(new ActionListener(){ ! public void actionPerformed(ActionEvent e){ ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! highlightButton(btnNewHub, true); ! controller.addingNode(SandBox.HUB_CURSOR); ! } ! }); ! ! //Set action listener for Router toolbar item ! btnNewRouter.addActionListener(new ActionListener(){ ! public void actionPerformed(ActionEvent e){ ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! highlightButton(btnNewRouter, true); ! controller.addingNode(SandBox.ROUTER_CURSOR); ! } ! }); ! ! //Set action listener for Switch toolbar item ! ! btnNewSwitch.addActionListener(new ActionListener(){ ! public void actionPerformed(ActionEvent e){ ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! highlightButton(btnNewSwitch, true); ! controller.addingNode(SandBox.SWITCH_CURSOR); ! } ! }); ! ! ! btnNewLink.addActionListener(new ActionListener(){ ! public void actionPerformed(ActionEvent e){ ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! setLinkHighlight(true); ! controller.creatingLink(); ! ! ! } ! }); ! ! this.add(btnNewPC); ! this.add(btnNewRouter); ! this.add(btnNewHub); ! this.add(btnNewSwitch); ! this.add(btnNewLink); ! } ! ! // Will make a button highlight red to indicate that it is in use. ! // Alternatively it will go back to grey when dormant. ! ! /** ! * This method is called from the constructor of StandardToolBar ! * It sets up the buttons, action listeners, tooltips and borders for the ! * buttons on the standard toolbar. ! * ! * This method is called from the setLinkHighlight method ! * @param inButton The button that's highlighted status will be changed ! * @param blnStatus True or False depending on whether the button should be highlighted or not. ! * @author VC2 Team. ! * @version v0.20 ! **/ ! ! public void highlightButton(JButton inButton, boolean blnStatus){ ! if(blnStatus) ! { ! inButton.setBackground(activatedColor); ! } ! else ! { ! inButton.setBackground(deactivatedColor); ! } ! } ! ! /** ! * This method calls the highlightButton method to set the Link button highlighted status on or off. ! * @param inValue True or False depending on whether the button should be highlighted or not. ! * @author VC2 Team. ! * @version v0.20 ! **/ ! ! public void setLinkHighlight(boolean inValue){ ! highlightButton(btnNewLink, inValue); ! } ! ! /** ! * This method will set the background colour of all buttons to off. ! * @author VC2 Team. ! * @version v0.20 ! **/ ! ! public void setHighlightsOff(){ ! btnNewPC.setBackground(deactivatedColor); ! btnNewRouter.setBackground(deactivatedColor); ! btnNewSwitch.setBackground(deactivatedColor); ! btnNewHub.setBackground(deactivatedColor); ! btnNewLink.setBackground(deactivatedColor); ! ! } ! } --- 1,423 ---- ! /* ! ! Java Firewall Simulator (jFirewallSim) ! ! ! ! Copyright (c) 2004, jFirewallSim development team All rights reserved. ! ! ! ! Redistribution and use in source and binary forms, with or without modification, are ! ! permitted provided that the following conditions are met: ! ! ! ! - Redistributions of source code must retain the above copyright notice, this list ! ! of conditions and the following disclaimer. ! ! - Redistributions in binary form must reproduce the above copyright notice, this list ! ! of conditions and the following disclaimer in the documentation and/or other ! ! materials provided with the distribution. ! ! - Neither the name of the Canberra Institute of Technology nor the names of its ! ! contributors may be used to endorse or promote products derived from this software ! ! without specific prior written permission. ! ! ! ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY ! ! EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ! ! OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ! ! THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! ! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ! ! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! ! HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ! ! TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ! ! EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! ! */ ! ! package guiUI; ! ! ! ! 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; ! ! ! ! /** ! ! * <P>The SimulationToolBar class is the toolbar used for creating new Nodes</P> ! ! * ! ! * @author VC2 Team. ! ! * @since 15th November 2004 ! ! * @version v0.20 ! ! */ ! ! ! ! public class SimulationToolBar extends ToolBar{ ! ! private ClassLoader cl = this.getClass().getClassLoader(); ! ! ! ! private JButton btnNewPC = new JButton(new ImageIcon(cl.getResource("images/simulation/PC_small.gif"))); ! ! private JButton btnNewRouter = new JButton(new ImageIcon(cl.getResource("images/simulation/router_small.gif"))); ! ! private JButton btnNewSwitch = new JButton(new ImageIcon(cl.getResource("images/simulation/switch_small.gif"))); ! ! private JButton btnNewHub = new JButton(new ImageIcon(cl.getResource("images/simulation/hub_small.gif"))); ! ! private JButton btnNewCSUDSU = new JButton(new ImageIcon(cl.getResource("images/simulation/csudsu_small.png"))); ! ! private JButton btnNewLink = new JButton(new ImageIcon(cl.getResource("images/simulation/link.gif"))); ! ! ! ! Color activatedColor = Color.RED; ! ! Color deactivatedColor = btnNewLink.getBackground(); ! ! ! ! /** ! ! * Constructor to build a SimulationToolBar ! ! * @param inMainScreen The JFrame that the SimulationToolBar will be placed on. ! ! */ ! ! public SimulationToolBar(MainScreen inMainScreen) { ! ! super(inMainScreen); ! ! ! ! // Call method to create the toolbar ! ! ! ! buildToolbar(); ! ! } ! ! ! ! /** ! ! * This method is called from the constructor of SimulationToolBar ! ! * It sets up the buttons, action listeners, tooltips and borders for the ! ! * buttons on the Simulation toolbar. ! ! * @author VC2 Team. ! ! * @version v0.20 ! ! **/ ! ! ! ! private void buildToolbar(){ ! ! ! ! //Set the tooltips for these buttons ! ! ! ! btnNewPC.setToolTipText("Creates a new PC"); ! ! btnNewRouter.setToolTipText("Creats a new Router"); ! ! btnNewLink.setToolTipText("Creates a new Link between two nodes"); ! ! btnNewSwitch.setToolTipText("Creates a new Switch"); ! ! btnNewHub.setToolTipText("Creates a new Hub"); ! ! btnNewCSUDSU.setToolTipText("Creates a new CSU/DSU device"); ! ! ! ! //Set the buttons to have no borders so that they don't make the toolbar look like crap. ! ! btnNewPC.setBorderPainted(false); ! ! btnNewRouter.setBorderPainted(false); ! ! btnNewLink.setBorderPainted(false); ! ! btnNewSwitch.setBorderPainted(false); ! ! btnNewHub.setBorderPainted(false); ! ! btnNewCSUDSU.setBorderPainted(false); ! ! ! ! //Set action listener for PC toolbar item ! ! btnNewPC.addActionListener(new ActionListener(){ ! ! public void actionPerformed(ActionEvent e){ ! ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! ! highlightButton(btnNewPC, true); ! ! controller.addingNode(SandBox.PC_CURSOR); ! ! } ! ! }); ! ! ! ! //Set action listener for Hub toolbar item ! ! btnNewHub.addActionListener(new ActionListener(){ ! ! public void actionPerformed(ActionEvent e){ ! ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! ! highlightButton(btnNewHub, true); ! ! controller.addingNode(SandBox.HUB_CURSOR); ! ! } ! ! }); ! ! ! //Set action listener for Hub toolbar item ! ! btnNewCSUDSU.addActionListener(new ActionListener(){ ! ! public void actionPerformed(ActionEvent e){ ! ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! ! highlightButton(btnNewCSUDSU, true); ! ! controller.addingNode(SandBox.CSUDSU_CURSOR); ! ! } ! ! }); ! ! //Set action listener for Router toolbar item ! ! btnNewRouter.addActionListener(new ActionListener(){ ! ! public void actionPerformed(ActionEvent e){ ! ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! ! highlightButton(btnNewRouter, true); ! ! controller.addingNode(SandBox.ROUTER_CURSOR); ! ! } ! ! }); ! ! ! ! //Set action listener for Switch toolbar item ! ! ! ! btnNewSwitch.addActionListener(new ActionListener(){ ! ! public void actionPerformed(ActionEvent e){ ! ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! ! highlightButton(btnNewSwitch, true); ! ! controller.addingNode(SandBox.SWITCH_CURSOR); ! ! } ! ! }); ! ! ! ! ! ! btnNewLink.addActionListener(new ActionListener(){ ! ! public void actionPerformed(ActionEvent e){ ! ! setHighlightsOff(); //Clean out any buttons that may have been highlighted previously. ! ! setLinkHighlight(true); ! ! controller.creatingLink(); ! ! ! ! ! ! } ! ! }); ! ! ! ! this.add(btnNewPC); ! ! this.add(btnNewRouter); ! ! this.add(btnNewHub); ! ! this.add(btnNewSwitch); ! ! this.add(btnNewCSUDSU); ! ! this.add(btnNewLink); ! ! } ! ! ! ! // Will make a button highlight red to indicate that it is in use. ! ! // Alternatively it will go back to grey when dormant. ! ! ! ! /** ! ! * This method is called from the constructor of StandardToolBar ! ! * It sets up the buttons, action listeners, tooltips and borders for the ! ! * buttons on the standard toolbar. ! ! * ! ! * This method is called from the setLinkHighlight method ! ! * @param inButton The button that's highlighted status will be changed ! ! * @param blnStatus True or False depending on whether the button should be highlighted or not. ! ! * @author VC2 Team. ! ! * @version v0.20 ! ! **/ ! ! ! ! public void highlightButton(JButton inButton, boolean blnStatus){ ! ! if(blnStatus) ! ! { ! ! inButton.setBackground(activatedColor); ! ! } ! ! else ! ! { ! ! inButton.setBackground(deactivatedColor); ! ! } ! ! } ! ! ! ! /** ! ! * This method calls the highlightButton method to set the Link button highlighted status on or off. ! ! * @param inValue True or False depending on whether the button should be highlighted or not. ! ! * @author VC2 Team. ! ! * @version v0.20 ! ! **/ ! ! ! ! public void setLinkHighlight(boolean inValue){ ! ! highlightButton(btnNewLink, inValue); ! ! } ! ! ! ! /** ! ! * This method will set the background colour of all buttons to off. ! ! * @author VC2 Team. ! ! * @version v0.20 ! ! **/ ! ! ! ! public void setHighlightsOff(){ ! ! btnNewPC.setBackground(deactivatedColor); ! ! btnNewRouter.setBackground(deactivatedColor); ! ! btnNewSwitch.setBackground(deactivatedColor); ! ! btnNewHub.setBackground(deactivatedColor); ! ! btnNewLink.setBackground(deactivatedColor); ! ! btnNewCSUDSU.setBackground(deactivatedColor); ! ! } ! ! } ! Index: GuiPC.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiPC.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GuiPC.java 13 Sep 2007 13:38:52 -0000 1.3 --- GuiPC.java 15 Oct 2007 18:25:54 -0000 1.4 *************** *** 1,48 **** /* Java Firewall Simulator (jFirewallSim) Copyright (c) 2004, jFirewallSim development team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Canberra Institute of Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package guiUI; /** * <P>The GuiPC class is used to instantiate new PC on the GUI</P> * * @author VC2 Team. * @since 15th November 2004 * @version v0.20 */ public class GuiPC extends ApplicationLayerDevice { /** * @param inName The name of the PC * @param inMainscreen The JFrame that the router will be created on */ public GuiPC(String inName, MainScreen inMainScreen){ ! super(inName, inMainScreen, "images/simulation/PC_large.gif"); } } --- 1,96 ---- /* + Java Firewall Simulator (jFirewallSim) + + Copyright (c) 2004, jFirewallSim development team All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list + of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. + - Neither the name of the Canberra Institute of Technology nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + package guiUI; + + /** + * <P>The GuiPC class is used to instantiate new PC on the GUI</P> + * + * @author VC2 Team. + * @since 15th November 2004 + * @version v0.20 + */ + + public class GuiPC extends ApplicationLayerDevice { + + /** + * @param inName The name of the PC + * @param inMainscreen The JFrame that the router will be created on + */ + + public GuiPC(String inName, MainScreen inMainScreen){ ! ! super(inName, inMainScreen, "images/simulation/mymac.png"); ! } + } + --- NEW FILE: GuiCSUDSU.java --- package guiUI; public class GuiCSUDSU extends DataLinkLayerDevice { /** * @param inName The name of the switch * @param inMainscreen The JFrame that the Switch will be created on */ public GuiCSUDSU(String inName, MainScreen inMainScreen) { super(inName, inMainScreen,"images/simulation/csudsu2.png"); } } Index: SandBox.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/SandBox.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SandBox.java 13 Oct 2007 12:57:00 -0000 1.7 --- SandBox.java 15 Oct 2007 18:25:54 -0000 1.8 *************** *** 54,57 **** --- 54,58 ---- public static final int HUB_CURSOR = 3; public static final int EXTERNALNAT_CURSOR = 4; + public static final int CSUDSU_CURSOR = 5; private Cursor csrDefault = new Cursor(Cursor.DEFAULT_CURSOR); *************** *** 62,83 **** private boolean blnPlaceableLocation = false; private int controlX; ! private int controlY; // Create the various cursors for this panel ! private ClassLoader cl = this.getClass().getClassLoader(); ! Image pcImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/PC_large.gif")); Cursor customPCCursor = Toolkit.getDefaultToolkit().createCustomCursor(pcImage, cursorLocation, "pcCursor"); ! Image routerImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/router_large.gif")); Cursor customRouterCursor = Toolkit.getDefaultToolkit().createCustomCursor(routerImage, cursorLocation, "routerCursor"); ! Image switchImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/switch_large.gif")); Cursor customSwitchCursor = Toolkit.getDefaultToolkit().createCustomCursor(switchImage, cursorLocation, "switchCursor"); ! Image hubImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/hub_large.gif")); Cursor customHubCursor = Toolkit.getDefaultToolkit().createCustomCursor(hubImage, cursorLocation, "hubCursor"); Image externalnatImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/network_local.png")); Cursor customExternalNATCursor = Toolkit.getDefaultToolkit().createCustomCursor(externalnatImage, cursorLocation, "externalnatCursor"); public SandBox(MainScreen inMainScreen){ --- 63,87 ---- private boolean blnPlaceableLocation = false; private int controlX; ! private int controlY; // Create the various cursors for this panel ! private ClassLoader cl = this.getClass().getClassLoader(); ! Image pcImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/mymac.png")); Cursor customPCCursor = Toolkit.getDefaultToolkit().createCustomCursor(pcImage, cursorLocation, "pcCursor"); ! Image routerImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/router.png")); Cursor customRouterCursor = Toolkit.getDefaultToolkit().createCustomCursor(routerImage, cursorLocation, "routerCursor"); ! Image switchImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/switch.png")); Cursor customSwitchCursor = Toolkit.getDefaultToolkit().createCustomCursor(switchImage, cursorLocation, "switchCursor"); ! Image hubImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/hub.png")); Cursor customHubCursor = Toolkit.getDefaultToolkit().createCustomCursor(hubImage, cursorLocation, "hubCursor"); Image externalnatImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/network_local.png")); Cursor customExternalNATCursor = Toolkit.getDefaultToolkit().createCustomCursor(externalnatImage, cursorLocation, "externalnatCursor"); + + Image csudsuImage = Toolkit.getDefaultToolkit().getImage(cl.getResource("images/simulation/csudsu2.png")); + Cursor customCSUDSUCursor = Toolkit.getDefaultToolkit().createCustomCursor(csudsuImage, cursorLocation, "csudsuCursor"); public SandBox(MainScreen inMainScreen){ *************** *** 208,211 **** --- 212,219 ---- Point NodeLocation = new Point(e.getX(), e.getY()); controller.addExternalNAT(NodeLocation); + }else if(this.getCursor() == customCSUDSUCursor){ + this.setCursor(csrDefault); + Point NodeLocation = new Point(e.getX(), e.getY()); + controller.addCSUDSU(NodeLocation); } } *************** *** 231,234 **** --- 239,244 ---- }else if(cursorType == EXTERNALNAT_CURSOR){ this.setCursor(customExternalNATCursor); + }else if(cursorType == CSUDSU_CURSOR){ + this.setCursor(customCSUDSUCursor); } Index: MainScreen.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/MainScreen.java,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** MainScreen.java 15 Oct 2007 12:04:33 -0000 1.71 --- MainScreen.java 15 Oct 2007 18:25:54 -0000 1.72 *************** *** 406,410 **** } ! public MainScreen() { Sim = new Simulation(core.ProtocolStack.TCP_IP); --- 406,410 ---- } ! public MainScreen(){ Sim = new Simulation(core.ProtocolStack.TCP_IP); *************** *** 885,888 **** --- 885,939 ---- } + public void addCSUDSU(Point inPoint){ + + String result = JOptionPane.showInputDialog(this,"Please enter a CSU/DSU device name:","Create New CSU/DSU", JOptionPane.PLAIN_MESSAGE); + + if(result != null){ + + result = result.trim(); + + if (!result.equalsIgnoreCase("")){ + + try { + + Sim.addCSUDSU(result); + + GuiCSUDSU tempCSUDSU = new GuiCSUDSU(result,this); + + tempCSUDSU.setNodeLocation(inPoint); + + GUInodeTable.put(result,tempCSUDSU); + + this.Sandbox.add(tempCSUDSU); + + Sandbox.setLayer(tempCSUDSU,3,0); + + isDirty = true; + + this.setAllHighlightsOff(); + + //pnlConsole.append("Added Hub "+result+" to simulation\n"); + + } catch (InvalidNodeNameException e) { + + JOptionPane.showMessageDialog(this, "Invalid CSU/DSU device name entered. Node with name: '" + result+"' all ready exist within Simulation","Invalid CSU/DSU device name", JOptionPane.ERROR_MESSAGE); + + } + + + + }else{ + + JOptionPane.showMessageDialog(this, "CSU/DSU device name not entered","CSU/DSU device name not entered",JOptionPane.WARNING_MESSAGE); + + } + + } + + this.setAllHighlightsOff(); + + this.refreshNodeInformationTab(); + + } /** *************** *** 1227,1231 **** ! public void createLink(String strLinkName, String inFirstNodeName, String inSecondNodeName){ --- 1278,1282 ---- ! public void createLink(String strLinkName, String inFirstNodeName, String inSecondNodeName, int LinkType){ *************** *** 1257,1261 **** ! Sandbox.addLine(strLinkName, FirstPoint,SecondPoint, 0); //FIXME! --- 1308,1312 ---- ! Sandbox.addLine(strLinkName, FirstPoint,SecondPoint, LinkType); //FIXME! *************** *** 2348,2353 **** Sandbox.setLayer(tempSwitch,3,0); ! GUInodeTable.put(strNodeName,tempSwitch); }else if(strClassName.contains("GuiPC")){ --- 2399,2421 ---- Sandbox.setLayer(tempSwitch,3,0); ! GUInodeTable.put(strNodeName,tempSwitch); ! ! }else if(strClassName.contains("GuiCSUDSU")){ ! ! deviceType = 1; ! ! Sim.addCSUDSU(strNodeName); ! ! GuiCSUDSU tempCSUDSU = new GuiCSUDSU(strNodeName,this); ! ! tempCSUDSU.setNodeLocation(pnt); + Sandbox.add(tempCSUDSU); + + Sandbox.setLayer(tempCSUDSU,3,0); + + GUInodeTable.put(strNodeName,tempCSUDSU); + + }else if(strClassName.contains("GuiPC")){ *************** *** 2449,2457 **** String ln[] = ((String) links.get(strLinkName)).split("\\|"); ! ! Sim.addEthernetLink(strLinkName, ln[0], ln[1], strNodeName, iface[0], ln[2]); ! ! this.createLink(strLinkName, ln[0], strNodeName); ! } --- 2517,2531 ---- String ln[] = ((String) links.get(strLinkName)).split("\\|"); ! ! if(iface[0].contains("eth")){ ! Sim.addEthernetLink(strLinkName, ln[0], ln[1], strNodeName, iface[0], ln[2]); ! this.createLink(strLinkName, ln[0], strNodeName, core.NetworkInterface.Ethernet10T); ! }else if(iface[0].contains("cua")){ ! Sim.addConsoleLink(strLinkName, ln[0], ln[1], strNodeName, iface[0]); ! this.createLink(strLinkName, ln[0], strNodeName, core.NetworkInterface.Console); ! }else if(iface[0].contains("ser")){ ! Sim.addSerialLink(strLinkName, ln[0], ln[1], strNodeName, iface[0]); ! this.createLink(strLinkName, ln[0], strNodeName, core.NetworkInterface.Serial); ! } } Index: GuiNode.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GuiNode.java 13 Oct 2007 12:57:00 -0000 1.4 --- GuiNode.java 15 Oct 2007 18:25:54 -0000 1.5 *************** *** 184,190 **** ! public final static int NodeHeight = 50; ! public final static int NodeWidth = 45; --- 184,190 ---- ! public final static int NodeHeight = 64; ! public final static int NodeWidth = 64; *************** *** 270,274 **** //Dimension dim = this.getPreferredSize(); ! this.setBounds(0,0,75,55); this.addMouseListener(this); --- 270,275 ---- //Dimension dim = this.getPreferredSize(); ! //this.setBounds(0,0,75,55); ! this.setBounds(0,0,NodeWidth+10,NodeHeight+10); this.addMouseListener(this); Index: GuiRouter.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiRouter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiRouter.java 13 Sep 2007 13:38:52 -0000 1.2 --- GuiRouter.java 15 Oct 2007 18:25:54 -0000 1.3 *************** *** 1,48 **** /* Java Firewall Simulator (jFirewallSim) Copyright (c) 2004, jFirewallSim development team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Canberra Institute of Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package guiUI; /** * <P>The GuiRouter class is used to instantiate new Routers on the GUI</P> * * @author VC2 Team. * @since 15th November 2004 * @version v0.20 */ public class GuiRouter extends NetworkLayerDevice { /** * @param inName The name of the router * @param inMainscreen The JFrame that the router will be created on */ public GuiRouter(String inName, MainScreen inMainScreen){ ! super(inName, inMainScreen,"images/simulation/router_large.gif"); } } --- 1,96 ---- /* + Java Firewall Simulator (jFirewallSim) + + Copyright (c) 2004, jFirewallSim development team All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list + of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. + - Neither the name of the Canberra Institute of Technology nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + package guiUI; + + /** + * <P>The GuiRouter class is used to instantiate new Routers on the GUI</P> + * + * @author VC2 Team. + * @since 15th November 2004 + * @version v0.20 + */ + + public class GuiRouter extends NetworkLayerDevice { + + /** + * @param inName The name of the router + * @param inMainscreen The JFrame that the router will be created on + */ + + public GuiRouter(String inName, MainScreen inMainScreen){ ! ! super(inName, inMainScreen,"images/simulation/Router.png"); // router_large.gif ! } + } + Index: GuiHub.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/guiUI/GuiHub.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiHub.java 13 Sep 2007 13:38:52 -0000 1.2 --- GuiHub.java 15 Oct 2007 18:25:54 -0000 1.3 *************** *** 1,48 **** /* Java Firewall Simulator (jFirewallSim) Copyright (c) 2004, jFirewallSim development team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Canberra Institute of Technology nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package guiUI; /** * <P>The GuiHub class is used to instantiate new Hub's on the GUI</P> * * @author VC2 Team. * @since 15th November 2004 * @version v0.20 */ public class GuiHub extends DataLinkLayerDevice { /** * @param inName The name of the Hub * @param inMainscreen The JFrame that the router will be created on */ public GuiHub(String inName, MainScreen inMainScreen) { ! super(inName, inMainScreen,"images/simulation/hub_large.gif"); } } --- 1,96 ---- /* + Java Firewall Simulator (jFirewallSim) + + Copyright (c) 2004, jFirewallSim development team All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list + of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. + - Neither the name of the Canberra Institute of Technology nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + package guiUI; + + /** + * <P>The GuiHub class is used to instantiate new Hub's on the GUI</P> + * + * @author VC2 Team. + * @since 15th November 2004 + * @version v0.20 + */ + + public class GuiHub extends DataLinkLayerDevice { + + /** + * @param inName The name of the Hub + * @param inMainscreen The JFrame that the router will be created on + */ + + public GuiHub(String inName, MainScreen inMainScreen) { ! ! super(inName, inMainScreen,"images/simulation/hub.png"); ! } + } + |