Examples of XORGate


Examples of org.eclipse.gef.examples.logicdesigner.model.XORGate

  } else if (oldPart instanceof OrGate) {
    newPart = new OrGate();
  } else if (oldPart instanceof LogicFlowContainer) {
    newPart = new LogicFlowContainer();
  } else if (oldPart instanceof XORGate) {
    newPart = new XORGate();
  }
 
  if (oldPart instanceof LogicDiagram) {
    Iterator i = ((LogicDiagram)oldPart).getChildren().iterator();
    while (i.hasNext()) {
View Full Code Here

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
Copyright © 2018 www.massapi.com. 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.