MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / unlock

Method unlock

ij/src/main/java/ij/ImagePlus.java:294–305  ·  view source on GitHub ↗

Unlocks the image. In case the image had been locked several times by the current thread, it gets unlocked only after as many unlock operations as there were previous lock operations.

()

Source from the content-addressed store, hash-verified

292 * previous lock operations.
293 */
294 public synchronized void unlock() {
295 if (Thread.currentThread()==lockingThread && lockedCount>1)
296 lockedCount--;
297 else {
298 locked = false;
299 lockedCount = 0;
300 lockingThread = null;
301 if (win instanceof StackWindow)
302 ((StackWindow)win).setSlidersEnabled(true);
303 if (IJ.debugMode) IJ.log(title + ": unlocked");
304 }
305 }
306
307 /** Returns 'true' if the image is locked. */
308 public boolean isLocked() {

Callers 14

hideMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMacroMethod · 0.95
runMethod · 0.95
runMethod · 0.95
unlockMethod · 0.95
runMethod · 0.95
multiMeasureMethod · 0.95
multiPlotMethod · 0.95
drawOrFillMethod · 0.95
doUpdateMethod · 0.95

Calls 2

logMethod · 0.95
setSlidersEnabledMethod · 0.80

Tested by

no test coverage detected