Package sw_digitalworks.Model

Examples of sw_digitalworks.Model.XorGate



        if (param1.equals("")){
                        inputCount = 2;

                        XorGate xg = new XorGate(inputCount);
                        // View hozzáadása a felülethez
                        Main.controller.getDisplayView().addComponentView(new XorGateView(0, 0, xg));
                        System.out.println(xg.getName() + " CREATED with " + inputCount + " inports.");
                        output += xg.getName() + " CREATED with " + inputCount + " inports.\n";
        }
        else if(!(param1.equals(""))) {
            if ((param2.equals(""))  && Pattern.matches(regularExp, charSeq)) {
                inputCount = Integer.parseInt(param1);
                XorGate xg = new XorGate(inputCount);
                //View hozzáadása a felülethez
                Main.controller.getDisplayView().addComponentView(new XorGateView(50, 0, xg));
                System.out.println(xg.getName() + " CREATED with " + inputCount + " inports.");
                output += xg.getName() + " CREATED with " + inputCount + " inports.\n";
                //Prototype.PrintStateAfterUpdate(og);


            }
            else if((param2.equals("")) && Pattern.matches("\\(\\d{1,4}\\,\\d{1,4}\\)", param1)) {
                    inputCount = 2;

                        XorGate xg = new XorGate(inputCount);
                        // View hozzáadása a felülethez
                        Main.controller.getDisplayView().addComponentView(new XorGateView(getPosX(param1), getPosY(param1), xg));
                        System.out.println(xg.getName() + " CREATED with " + inputCount + " inports.");
                        output += xg.getName() + " CREATED with " + inputCount + " inports.\n";
                        //Prototype.PrintStateAfterUpdate(og);
 
            } else if (Pattern.matches(regularExp, param1) && Pattern.matches("\\(\\d{1,4}\\,\\d{1,4}\\)", param2)){
                        inputCount = Integer.parseInt(param1);

                        XorGate xg = new XorGate(inputCount);
                        // View hozzáadása a felülethez
                        Main.controller.getDisplayView().addComponentView(new XorGateView(getPosX(param2), getPosY(param2), xg));
                        System.out.println(xg.getName() + " CREATED with " + inputCount + " inports.");
                        output += xg.getName() + " CREATED with " + inputCount + " inports.\n";
            }


        } else if (param2.equals("") == false || (param1.equals("") == false && Pattern.matches(regularExp, charSeq) == false)) {
View Full Code Here

TOP

Related Classes of sw_digitalworks.Model.XorGate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.