Yes the toilet tank uses a mechanical feedback control system.   When the toilet is flushed, the water in the reservoir is drained and a float within the tank is lowered.  The float, when in the lowered position, opens a valve that allows water to flow into the tank.  Once the level has reached the desired set point, the float closes the valve.