How to use the Zoom class in a plugin

Dear all!

I need to automatically zoom a result image, it is tedious to do this manually Image>Zoom>Set… then put 400% then apply. I want that my plugin do this automatically. My plugin is in java and the class Zoom is already available, BUT I cant use it!! it has no public static procedure to be used. so I need an alternative for this. Is there something I am missing??

Regards
Alex

You can do this with an Imagej macro:

run("Set... ", "zoom=400 x=128 y=127");

Or call it with Java:

IJ.run("Set... ", "zoom=400 x=128 y=127");

(Adjust the x,y center coordinates!)

Apropos the macro recorder can display the Java commands, too.

The last works, thanks! but i wonder why the imageplus class does not have a display zoom argument??

Well, here is the source: