Component OutComponent = Main.Components.get(OutComponentName);
Component InComponent = Main.Components.get(InComponentName);
if (OutComponent.GetComposit() == InComponent.GetComposit()) {
if (Main.Components.get(OutComponentName).getOutPorts().length > outPortNumber
&& Main.Components.get(InComponentName).getInPorts().length > inPortNumber) {
OutPort op = Main.Components.get(OutComponentName).getOutPorts()[outPortNumber];
InPort ip = Main.Components.get(InComponentName).getInPorts()[inPortNumber];
//ellenÅ‘rizük, hogy az InPort be van e már kötve valahova, ha már be van akkor az baj
if (ip.isConnected() == false) {
System.out.println(OutComponentName + "'s " + outPortNumber + ". outport CONNECTED TO " + InComponentName + "'s " + inPortNumber + ". inport");
output += OutComponentName + "'s " + outPortNumber + ". outport CONNECTED TO " + InComponentName + "'s " + inPortNumber + ". inport\n";
//létrejön a két objektum között a kapcsolat
op.Connect(ip);
Main.controller.getDisplayView().addConnectorView(new connector_View(
InComponent.getName(),
inPortNumber,
OutComponent.getName(),
outPortNumber));