By fabricating patterned electrodes on a dumbbell-shaped cavity semiconductor laser, the coherence of the laser can be switched by only changing the injection current. The threshold current and the peak power of the laser are 0.75 A and 1.41 W @ 3 A. Under the injection of small and large currents, the measured speckle contrasts are 40.0% @ 0.8 A and 7.0% @ 3 A. And the corresponding horizontal far-field divergence angles are 4.05°and 8.7°, respectively, showing a high directionality. Such a laser with a wide range of adjustable coherence and a high directionality has a great potential in the field of bioimaging.