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

Method Fitter

ij/src/main/java/ij/plugin/frame/Fitter.java:41–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 static final int USER_DEFINED = -1;
40
41 public Fitter() {
42 super("Curve Fitter");
43 WindowManager.addWindow(this);
44 addKeyListener(this);
45 Panel panel = new Panel();
46 fit = new Choice();
47 for (int i=0; i<CurveFitter.fitList.length; i++)
48 fit.addItem(CurveFitter.fitList[CurveFitter.sortedTypes[i]]);
49 fit.addItem("*User-defined*");
50 fit.addItemListener(this);
51 panel.add(fit);
52 doIt = new Button(" Fit ");
53 doIt.addActionListener(this);
54 doIt.addKeyListener(this);
55 panel.add(doIt);
56 open = new Button("Open");
57 open.addActionListener(this);
58 panel.add(open);
59 apply = new Button("Apply");
60 apply.addActionListener(this);
61 panel.add(apply);
62 settings = new Checkbox("Show settings", false);
63 panel.add(settings);
64 add("North", panel);
65 String text = "";
66 for (int i=0; i<dx.length; i++)
67 text += IJ.d2s(dx[i],2)+" "+IJ.d2s(dy[i],2)+"\n";
68 textArea = new TextArea("",15,30,TextArea.SCROLLBARS_VERTICAL_ONLY);
69 textArea.setFont(new Font("Monospaced", Font.PLAIN, 12));
70 if (IJ.isLinux()) textArea.setBackground(Color.white);
71 textArea.append(text);
72 add("Center", textArea);
73 GUI.scale(this);
74 pack();
75 GUI.centerOnImageJScreen(this);
76 show();
77 IJ.register(Fitter.class);
78 }
79
80 /** Fit data in the textArea, show result in log and create plot.
81 * @param fitType as defined in CurveFitter constants

Callers

nothing calls this directly

Calls 14

addWindowMethod · 0.95
d2sMethod · 0.95
isLinuxMethod · 0.95
scaleMethod · 0.95
centerOnImageJScreenMethod · 0.95
registerMethod · 0.95
addActionListenerMethod · 0.80
setBackgroundMethod · 0.80
addMethod · 0.65
setFontMethod · 0.65
appendMethod · 0.65
addKeyListenerMethod · 0.45

Tested by

no test coverage detected