Examples of OrGate


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

    newPart = new LiveOutput();
  } else if (oldPart instanceof LogicLabel) {
    newPart = new LogicLabel();
    ((LogicLabel)newPart).setLabelContents(((LogicLabel)oldPart).getLabelContents());
  } else if (oldPart instanceof OrGate) {
    newPart = new OrGate();
  } else if (oldPart instanceof LogicFlowContainer) {
    newPart = new LogicFlowContainer();
  } else if (oldPart instanceof XORGate) {
    newPart = new XORGate();
  }
View Full Code Here

Examples of sw_digitalworks.Model.OrGate

        String regularExp = "\\d{1,4}";
        CharSequence charSeq = param1;

        if (param1.equals("")){
            inputCount = 2;
            OrGate og = new OrGate(inputCount);
            System.out.println(og.getName() + " CREATED with " + inputCount + " inports.");
            output += og.getName() + " CREATED with " + inputCount + " inports.\n";
            //Prototype.PrintStateAfterUpdate(og);
            Main.controller.getDisplayView().addComponentView(new OrGateView(0, 0, og));
        }else if (param2.equals("") && Pattern.matches(regularExp, param1)) {
                inputCount = Integer.parseInt(param1);
                OrGate og = new OrGate(inputCount);
                System.out.println(og.getName() + " CREATED with " + inputCount + " inports.");
                output += og.getName() + " CREATED with " + inputCount + " inports.\n";
                //Prototype.PrintStateAfterUpdate(og);
                Main.controller.getDisplayView().addComponentView(new OrGateView(100, 0, og));
        } else if (param2.equals("") && Pattern.matches("\\(\\d{1,4}\\,\\d{1,4}\\)", param1)){
            inputCount = 2;
            OrGate og = new OrGate(inputCount);
            System.out.println(og.getName() + " CREATED with " + inputCount + " inports.");
            output += og.getName() + " CREATED with " + inputCount + " inports.\n";
            //Prototype.PrintStateAfterUpdate(og);
            Main.controller.getDisplayView().addComponentView(new OrGateView(getPosX(param1), getPosY(param1), og));
        } else if(Pattern.matches(regularExp, param1) && Pattern.matches("\\(\\d{1,4}\\,\\d{1,4}\\)", param2)) {
                if (Pattern.matches(regularExp, charSeq)) {
                    inputCount = Integer.parseInt(param1);
                    OrGate og = new OrGate(inputCount);
                    System.out.println(og.getName() + " CREATED with " + inputCount + " inports.");
                    output += og.getName() + " CREATED with " + inputCount + " inports.\n";
                    //Prototype.PrintStateAfterUpdate(og);
                    //View készítése
                    Main.controller.getDisplayView().addComponentView(new OrGateView(getPosX(param2), getPosY(param2), og));

                    } else {
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.