Posted by
CARL Philippe (LBP) on
URL: http://imagej.273.s1.nabble.com/Radial-profile-ext-to-work-with-Macros-tp5005598p5005956.html
Dear Michael,
> when recording, a GenericDialog records the values (including checkbox
settings, Choice menu settings) after the user has pressed the 'OK' button.
> When running the macro, it fills in the values and behaves as if the user
had pressed 'OK'.
> So it won't record pressing any other buttons, and when running the macro
it won't simulate pressing any buttons.
> If this is ok for you, you can add a Panel with an arbitrary number of
buttons to the GenericDialog.
This could actually be fine and work (= code already implemented and
working)....
> The actionPerformed methods may modify input fields of the GenericDialog,
e.g. change the numbers in the numeric fields (getText, setText).
This is actually my next problem: how am I doing this?
Let's say I have the following code defining the window:
NonBlockingGenericDialog gd = new NonBlockingGenericDialog("Radial Profile
Angle...");
gd.addStringField("Title: ", title);
gd.addNumericField("Width: ", width, 0);
gd.addNumericField("Height: ", height, 0);
How can I then upon an action performed with a button defined by an added
Panel change the value shown up in either the "Width: " or "Height: "
NumericField?
I thank you very much in advance for your answer and wish you a merry
Christmas and happy NEW Year!!!.
Best regards,
Philippe
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html