NotGate.configureLabel(instance, false, instance.getPortLocation(2));
}
}
private void configurePorts(Instance instance) {
Direction facing = instance.getAttributeValue(StdAttr.FACING);
Bounds bds = getOffsetBounds(instance.getAttributeSet());
int d = Math.max(bds.getWidth(), bds.getHeight()) - 20;
Location loc0 = Location.create(0, 0);
Location loc1 = loc0.translate(facing.reverse(), 20 + d);
Location loc2;
if (instance.getAttributeValue(ATTR_CONTROL) == LEFT_HANDED) {
loc2 = loc0.translate(facing.reverse(), 10 + d, 10);
} else {
loc2 = loc0.translate(facing.reverse(), 10 + d, -10);
}
Port[] ports = new Port[3];
ports[0] = new Port(0, 0, Port.OUTPUT, StdAttr.WIDTH);
ports[1] = new Port(loc1.getX(), loc1.getY(), Port.INPUT, StdAttr.WIDTH);