//check for connection to the right of the dragged widget.
Class<? extends IProgWidget>[] parameters = draggingWidget.getParameters();
if(parameters != null) {
for(IProgWidget widget : te.progWidgets) {
IProgWidget outerPiece = draggingWidget;
if(outerPiece.returnType() != null) {//When the piece is a parameter pice (area, item filter, text).
while(outerPiece.getConnectedParameters()[0] != null) {
outerPiece = outerPiece.getConnectedParameters()[0];
}
}
if(widget != draggingWidget && Math.abs(outerPiece.getX() + outerPiece.getWidth() / 2 - widget.getX()) <= FAULT_MARGIN) {