/** Overrides close() in PlugInFrame. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); synchronized(this) {notify();} }
/** Overrides close() in PlugInDialog. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); synchronized(this) { notify(); } }
/** Overrides close() in PlugInDialog. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); synchronized(this) { notify(); } }
/** Overrides close() in PlugInFrame. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); synchronized(this) {notify();} }
public void close() { super.close(); instance = null; Prefs.saveLocation(LOC_KEY, getLocation()); done = true; }
public void close() { super.close(); instance = null; Prefs.saveLocation(LOC_KEY, getLocation()); done = true; }
public void close() { super.close(); instance = null; Prefs.saveLocation(LOC_KEY, getLocation()); IJ.notifyEventListeners(IJEventListener.COLOR_PICKER_CLOSED); }
public void close() { super.close(); //also does WindowManager.removeWindow(this); Prefs.saveLocation(PREFS_KEY+"loc", getLocation()); removeImageListeners(); synchronized(this) { //terminate the background thread bgThread.interrupt(); } instance = null; tool.pi = null; removeOutline(); }
public void close() { super.close(); instance = null; Prefs.saveLocation(LOC_KEY, getLocation()); IJ.notifyEventListeners(IJEventListener.COLOR_PICKER_CLOSED); }
public void close() { super.close(); //also does WindowManager.removeWindow(this); Prefs.saveLocation(PREFS_KEY+"loc", getLocation()); removeImageListeners(); synchronized(this) { //terminate the background thread bgThread.interrupt(); } instance = null; tool.pi = null; removeOutline(); }
void saveWindowLocations() { Window win = WindowManager.getWindow("B&C"); if (win!=null) Prefs.saveLocation(ContrastAdjuster.LOC_KEY, win.getLocation()); win = WindowManager.getWindow("Threshold"); if (win!=null) Prefs.saveLocation(ThresholdAdjuster.LOC_KEY, win.getLocation()); win = WindowManager.getWindow("Results"); if (win!=null) { Prefs.saveLocation(TextWindow.LOC_KEY, win.getLocation()); Dimension d = win.getSize(); Prefs.set(TextWindow.WIDTH_KEY, d.width); Prefs.set(TextWindow.HEIGHT_KEY, d.height); } win = WindowManager.getWindow("Log"); if (win!=null) { Prefs.saveLocation(TextWindow.LOG_LOC_KEY, win.getLocation()); Dimension d = win.getSize(); Prefs.set(TextWindow.LOG_WIDTH_KEY, d.width); Prefs.set(TextWindow.LOG_HEIGHT_KEY, d.height); } win = WindowManager.getWindow("ROI Manager"); if (win!=null) Prefs.saveLocation(RoiManager.LOC_KEY, win.getLocation()); }
void saveWindowLocations() { Window win = WindowManager.getWindow("B&C"); if (win!=null) Prefs.saveLocation(ContrastAdjuster.LOC_KEY, win.getLocation()); win = WindowManager.getWindow("Threshold"); if (win!=null) Prefs.saveLocation(ThresholdAdjuster.LOC_KEY, win.getLocation()); win = WindowManager.getWindow("Results"); if (win!=null) { Prefs.saveLocation(TextWindow.LOC_KEY, win.getLocation()); Dimension d = win.getSize(); Prefs.set(TextWindow.WIDTH_KEY, d.width); Prefs.set(TextWindow.HEIGHT_KEY, d.height); } win = WindowManager.getWindow("Log"); if (win!=null) { Prefs.saveLocation(TextWindow.LOG_LOC_KEY, win.getLocation()); Dimension d = win.getSize(); Prefs.set(TextWindow.LOG_WIDTH_KEY, d.width); Prefs.set(TextWindow.LOG_HEIGHT_KEY, d.height); } win = WindowManager.getWindow("ROI Manager"); if (win!=null) Prefs.saveLocation(RoiManager.LOC_KEY, win.getLocation()); }
/** Overrides close() in PlugInFrame. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); Prefs.set(MODE_KEY, mode); Prefs.set(DARK_BACKGROUND, darkBackground.getState()); Prefs.set(NO_RESET, noResetButton.getState()); synchronized(this) { notify(); } }
/** Overrides close() in PlugInFrame. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); Prefs.set(MODE_KEY, mode); Prefs.set(DARK_BACKGROUND, darkBackground.getState()); Prefs.set(NO_RESET, noResetButton.getState()); synchronized(this) { notify(); } }
/** Closes this TextWindow. Display a "save changes" dialog if this is the "Results" window and 'showDialog' is true. */ public void close(boolean showDialog) { if (getTitle().equals("Results")) { if (showDialog && !Analyzer.resetCounter()) return; IJ.setTextPanel(null); Prefs.saveLocation(LOC_KEY, getLocation()); Dimension d = getSize(); Prefs.set(WIDTH_KEY, d.width); Prefs.set(HEIGHT_KEY, d.height); } else if (getTitle().equals("Log")) { Prefs.saveLocation(LOG_LOC_KEY, getLocation()); Dimension d = getSize(); Prefs.set(LOG_WIDTH_KEY, d.width); Prefs.set(LOG_HEIGHT_KEY, d.height); IJ.setDebugMode(false); IJ.log("\\Closed"); IJ.notifyEventListeners(IJEventListener.LOG_WINDOW_CLOSED); } else if (getTitle().equals("Debug")) { Prefs.saveLocation(DEBUG_LOC_KEY, getLocation()); } else if (textPanel!=null && textPanel.rt!=null) { if (!saveContents()) return; } //setVisible(false); dispose(); WindowManager.removeWindow(this); textPanel.flush(); }
protected void savePluginPrefs() { setPref(COMPRESSED_XML, snt.useCompressedXML); setPref(AUTO_CANVAS_ACTIVATION, snt.autoCanvasActivation); setPref(SNAP_CURSOR, snt.snapCursor); Prefs.set(SNAP_XY, snt.cursorSnapWindowXY); Prefs.set(SNAP_Z, snt.cursorSnapWindowZ); setPref(DRAW_DIAMETERS_XY, snt.drawDiametersXY); setPref(ENFORCE_DEFAULT_PATH_COLORS, !snt.displayCustomPathColors); setPref(SHOW_ONLY_SELECTED, snt.showOnlySelectedPaths); setPref(DEBUG, SimpleNeuriteTracer.verbose); Prefs.set(BOOLEANS, currentBooleans); clearLegacyPrefs(); if (isSaveWinLocations()) { final NeuriteTracerResultsDialog rd = snt.resultsDialog; if (rd == null) return; final PathWindow pw = rd.getPathWindow(); if (pw != null) Prefs.saveLocation(PATHWIN_LOC, pw.getLocation()); final FillWindow fw = rd.getFillWindow(); if (fw != null) Prefs.saveLocation(FILLWIN_LOC, fw.getLocation()); } }
public void showDialog() { Color color = Toolbar.getForegroundColor(); String colorName = Colors.colorToString2(color); String name = isPencil?"Pencil":"Brush"; gd = new NonBlockingGenericDialog(name+" Options"); gd.addSlider(name+" width:", 1, 50, width); //gd.addSlider("Transparency (%):", 0, 100, transparency); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addCheckbox("Paint on overlay", paintOnOverlay); gd.addDialogListener(this); gd.addHelp(getHelp()); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); gd = null; }
public void showDialog() { Color color = Toolbar.getForegroundColor(); String colorName = Colors.colorToString2(color); String name = isPencil?"Pencil":"Brush"; gd = new NonBlockingGenericDialog(name+" Options"); gd.addSlider(name+" width:", 1, 50, width); //gd.addSlider("Transparency (%):", 0, 100, transparency); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addCheckbox("Paint on overlay", paintOnOverlay); gd.addDialogListener(this); gd.addHelp(getHelp()); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); gd = null; }
void arrowToolOptions() { if (!Toolbar.getToolName().equals("arrow")) IJ.setTool("arrow"); double width = Arrow.getDefaultWidth(); double headSize = Arrow.getDefaultHeadSize(); Color color = Toolbar.getForegroundColor(); colorName = Colors.colorToString2(color); int style = Arrow.getDefaultStyle(); gd = new NonBlockingGenericDialog("Arrow Tool"); gd.addSlider("Width:", 1, 50, (int)width); gd.addSlider("Size:", 0, 50, headSize); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addChoice("Style:", Arrow.styles, Arrow.styles[style]); gd.addCheckbox("Outline", Arrow.getDefaultOutline()); gd.addCheckbox("Double head", Arrow.getDefaultDoubleHeaded()); gd.addCheckbox("Keep after adding to overlay", Prefs.keepArrowSelections); gd.addDialogListener(this); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); }
void arrowToolOptions() { if (!Toolbar.getToolName().equals("arrow")) IJ.setTool("arrow"); double width = Arrow.getDefaultWidth(); double headSize = Arrow.getDefaultHeadSize(); Color color = Toolbar.getForegroundColor(); colorName = Colors.colorToString2(color); int style = Arrow.getDefaultStyle(); gd = new NonBlockingGenericDialog("Arrow Tool"); gd.addSlider("Width:", 1, 50, (int)width); gd.addSlider("Size:", 0, 50, headSize); gd.addChoice("Color:", Colors.getColors(colorName), colorName); gd.addChoice("Style:", Arrow.styles, Arrow.styles[style]); gd.addCheckbox("Outline", Arrow.getDefaultOutline()); gd.addCheckbox("Double head", Arrow.getDefaultDoubleHeaded()); gd.addCheckbox("Keep after adding to overlay", Prefs.keepArrowSelections); gd.addDialogListener(this); Point loc = Prefs.getLocation(LOC_KEY); if (loc!=null) { gd.centerDialog(false); gd.setLocation (loc); } gd.showDialog(); Prefs.saveLocation(LOC_KEY, gd.getLocation()); }