if (param1.equals("")){
inputCount = 2;
NandGate ng = new NandGate(inputCount);
//View hozzáadása a felülethez
Main.controller.getDisplayView().addComponentView(new NandGateView(0, 0, ng));
System.out.println(ng.getName() + " CREATED with " + inputCount + " inports.");
output += ng.getName() + " CREATED with " + inputCount + " inports.\n";
} else if(!(param1.equals(""))) {
if ((param2.equals("")) && Pattern.matches(regularExp, charSeq)) {
inputCount = Integer.parseInt(param1);
NandGate ng = new NandGate(inputCount);
//View hozzáadása a felülethez
Main.controller.getDisplayView().addComponentView(new NandGateView(50, 0, ng));
System.out.println(ng.getName() + " CREATED with " + inputCount + " inports.");
output += ng.getName() + " CREATED with " + inputCount + " inports.\n";
} else if ((param2.equals("")) && Pattern.matches("\\(\\d{1,4}\\,\\d{1,4}\\)", param1)){
inputCount = 2;
NandGate ng = new NandGate(inputCount);
//View hozzáadása a felülethez
Main.controller.getDisplayView().addComponentView(new NandGateView(getPosX(param1), getPosY(param1), ng));
System.out.println(ng.getName() + " CREATED with " + inputCount + " inports.");
output += ng.getName() + " CREATED with " + inputCount + " inports.\n";
} else if(Pattern.matches(regularExp, param1) && Pattern.matches("\\(\\d{1,4}\\,\\d{1,4}\\)", param2)) {
inputCount = Integer.parseInt(param1);
inputCount = Integer.parseInt(param1);
NandGate ng = new NandGate(inputCount);
Main.controller.getDisplayView().addComponentView(new NandGateView(getPosX(param2), getPosY(param2), ng));
System.out.println(ng.getName() + " CREATED with " + inputCount + " inports.");
output += ng.getName() + " CREATED with " + inputCount + " inports.\n";
} else {
output += "A gate needs at least 2 inports\n";