Locks the image so other threads can test to see if it is in use. One thread can lock an image multiple times, then it has to unlock it as many times until it is unlocked. This allows nested locking within a thread. Returns true if the image was successfully locked. Beeps, displays a message in the
()
| 250 | * false if the image is already locked by another thread. |
| 251 | */ |
| 252 | public synchronized boolean lock() { |
| 253 | return lock(true); |
| 254 | } |
| 255 | |
| 256 | /** Similar to lock, but doesn't beep and display an error |
| 257 | * message if the attempt to lock the image fails. |
no test coverage detected