/** Adds a set of points to the plot using double arrays. * Must be called before the plot is displayed. * Note that there are more options available by using the methods of the Plot class instead. * @deprecated use the corresponding method of the Plot class */ public void addPoints(double[] x, double[] y, int shape) { addPoints(Tools.toFloat(x), Tools.toFloat(y), shape); }
MenuItem addPopupItem(PopupMenu popupMenu, String s) { return addPopupItem(popupMenu, s, false); }
double updatePlot() { if (plot!=null) { ImagePlus plotImage = WindowManager.getImage(plotID); ImageWindow win = plotImage!=null?plotImage.getWindow():null; if (win!=null) ((PlotWindow)win).drawPlot(plot); else { PlotWindow plotWindow = plot.show(); if (plotWindow!=null) plotID = plotWindow.getImagePlus().getID(); } } plot = null; interp.getParens(); return Double.NaN; }
coordinates.setBackground(new Color(220, 220, 220)); bottomPanel.add(coordinates); add(bottomPanel); data.add(getDataPopupMenu()); more.add(getMorePopupMenu()); plot.draw(); LayoutManager lm = getLayout(); if (lm instanceof ImageLayout) ((ImageLayout)lm).ignoreNonImageWidths(true); //don't expand size to make the panel fit pack(); imp.updateAndDraw(); if (listValues) showList(); else
Object b = e.getSource(); if (b==live) toggleLiveProfiling(); else if (b==list) showList(); else if (b==data) { enableDisableMenuItems(); dataPopupMenu.show((Component)b, 1, 1); } else if (b==more) { enableDisableMenuItems(); morePopupMenu.show((Component)b, 1, 1); } else if (b==menuItems[SAVE]) saveAsText(); else if (b==menuItems[COPY]) copyToClipboard(false); else if (b==menuItems[COPY_ALL]) copyToClipboard(true); else if (b==menuItems[ADD_FROM_TABLE]) new PlotContentsDialog(plot, PlotContentsDialog.ADD_FROM_TABLE).showDialog(this);
if (showR) new TextWindow( "Random R values", "R(rand)", rVals.toString(),300, 400); if(vanS) {PlotWindow plot = new PlotWindow("CCF","x-translation","Pearsons",vSx,vSr); plot.draw();
win = new StackWindow(this); else if (getProperty(Plot.PROPERTY_KEY) != null) win = new PlotWindow(this, (Plot)(getProperty(Plot.PROPERTY_KEY))); else win = new ImageWindow(this);
double showPlot() { if (plot!=null) { PlotWindow plotWindow = plot.show(); if (plotWindow!=null) plotID = plotWindow.getImagePlus().getID(); } plot = null; interp.getParens(); return Double.NaN; }
/** Saves the data of the plot in a text file */ void saveAsText() { if (plot.getXValues() == null) { IJ.error("Plot has no data"); return; } SaveDialog sd = new SaveDialog("Save as Text", "Values", Prefs.defaultResultsExtension()); String name = sd.getFileName(); if (name==null) return; String directory = sd.getDirectory(); IJ.wait(250); // give system time to redraw ImageJ window IJ.showStatus("Saving plot values..."); ResultsTable rt = getResultsTable(); try { rt.saveAs(directory+name); } catch (IOException e) { IJ.error("" + e); return; } if (autoClose) {imp.changes=false; close();} }
if (xValues == null) return; Clipboard systemClipboard = null; try {systemClipboard = getToolkit().getSystemClipboard();} catch (Exception e) {systemClipboard = null; } if (systemClipboard==null) IJ.showStatus(text.length() + " characters copied to Clipboard"); if (autoClose) {imp.changes=false; close();}
/** Shows the data of the backing plot in a Textwindow with columns */ void showList(){ ResultsTable rt = plot.getResultsTable(saveXValues); if (rt==null) return; rt.show("Plot Values"); if (autoClose) { imp.changes=false; close(); } }
double updatePlot() { if (plot!=null) { ImagePlus plotImage = WindowManager.getImage(plotID); ImageWindow win = plotImage!=null?plotImage.getWindow():null; if (win!=null) ((PlotWindow)win).drawPlot(plot); else { PlotWindow plotWindow = plot.show(); if (plotWindow!=null) plotID = plotWindow.getImagePlus().getID(); } } plot = null; interp.getParens(); return Double.NaN; }
coordinates.setBackground(new Color(220, 220, 220)); bottomPanel.add(coordinates); add(bottomPanel); data.add(getDataPopupMenu()); more.add(getMorePopupMenu()); plot.draw(); LayoutManager lm = getLayout(); if (lm instanceof ImageLayout) ((ImageLayout)lm).ignoreNonImageWidths(true); //don't expand size to make the panel fit pack(); imp.updateAndDraw(); if (listValues) showList(); else
Object b = e.getSource(); if (b==live) toggleLiveProfiling(); else if (b==list) showList(); else if (b==data) { enableDisableMenuItems(); dataPopupMenu.show((Component)b, 1, 1); } else if (b==more) { enableDisableMenuItems(); morePopupMenu.show((Component)b, 1, 1); } else if (b==menuItems[SAVE]) saveAsText(); else if (b==menuItems[COPY]) copyToClipboard(false); else if (b==menuItems[COPY_ALL]) copyToClipboard(true); else if (b==menuItems[ADD_FROM_TABLE]) new PlotContentsDialog(plot, PlotContentsDialog.ADD_FROM_TABLE).showDialog(this);
win = new StackWindow(this); else if (getProperty(Plot.PROPERTY_KEY) != null) win = new PlotWindow(this, (Plot)(getProperty(Plot.PROPERTY_KEY))); else win = new ImageWindow(this);
double showPlot() { if (plot!=null) { PlotWindow plotWindow = plot.show(); if (plotWindow!=null) plotID = plotWindow.getImagePlus().getID(); } plot = null; interp.getParens(); return Double.NaN; }
/** Saves the data of the plot in a text file */ void saveAsText() { if (plot.getXValues() == null) { IJ.error("Plot has no data"); return; } SaveDialog sd = new SaveDialog("Save as Text", "Values", Prefs.defaultResultsExtension()); String name = sd.getFileName(); if (name==null) return; String directory = sd.getDirectory(); IJ.wait(250); // give system time to redraw ImageJ window IJ.showStatus("Saving plot values..."); ResultsTable rt = getResultsTable(); try { rt.saveAs(directory+name); } catch (IOException e) { IJ.error("" + e); return; } if (autoClose) {imp.changes=false; close();} }
if (xValues == null) return; Clipboard systemClipboard = null; try {systemClipboard = getToolkit().getSystemClipboard();} catch (Exception e) {systemClipboard = null; } if (systemClipboard==null) IJ.showStatus(text.length() + " characters copied to Clipboard"); if (autoClose) {imp.changes=false; close();}