Freezes or unfreezes the plot. In the frozen state, the plot cannot be resized or updated, and the Plot class does no modifications to the ImageProcessor. Changes are recorded nevertheless and become effective with setFrozen(false) .
(boolean frozen)
| 1820 | * and the Plot class does no modifications to the ImageProcessor. |
| 1821 | * Changes are recorded nevertheless and become effective with <code>setFrozen(false)</code>. */ |
| 1822 | public void setFrozen(boolean frozen) { |
| 1823 | pp.isFrozen = frozen; |
| 1824 | if (!pp.isFrozen) { // unfreeze operations ... |
| 1825 | if (imp != null && ip != null) { |
| 1826 | ImageCanvas ic = imp.getCanvas(); |
| 1827 | if (ic instanceof PlotCanvas) { |
| 1828 | ((PlotCanvas)ic).resetMagnification(); |
| 1829 | imp.setTitle(imp.getTitle()); //update magnification in title |
| 1830 | } |
| 1831 | Undo.setup(Undo.TRANSFORM, imp); |
| 1832 | } |
| 1833 | updateImage(); |
| 1834 | ImageWindow win = imp == null ? null : imp.getWindow(); |
| 1835 | if (win != null) win.updateImage(imp); //show any changes made during the frozen state |
| 1836 | } |
| 1837 | } |
| 1838 | |
| 1839 | public boolean isFrozen() { |
| 1840 | return pp.isFrozen; |
no test coverage detected