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

Method setLocation

ij/src/main/java/ij/macro/Functions.java:3678–3697  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3676 }
3677
3678 void setLocation() {
3679 int x = (int)getFirstArg();
3680 int y = (int)getNextArg();
3681 int width=0, height=0;
3682 if (interp.nextToken()==',') {
3683 width = (int)getNextArg();
3684 height = (int)getNextArg();
3685 }
3686 interp.getRightParen();
3687 if (width==0 && height==0) {
3688 Window win = WindowManager.getActiveWindow();
3689 if (win!=null)
3690 win.setLocation(x, y);
3691 } else {
3692 ImagePlus imp = getImage();
3693 ImageWindow win = imp.getWindow();
3694 if (win!=null)
3695 win.setLocationAndSize(x, y, width, height);
3696 }
3697 }
3698
3699 void setSlice() {
3700 int n = (int)getArg();

Callers 4

doFunctionMethod · 0.95
FunctionFinderMethod · 0.45
doDialogMethod · 0.45
setTableLocAndSizeMethod · 0.45

Calls 9

getFirstArgMethod · 0.95
getNextArgMethod · 0.95
getActiveWindowMethod · 0.95
setLocationMethod · 0.95
getImageMethod · 0.95
getWindowMethod · 0.95
setLocationAndSizeMethod · 0.95
getRightParenMethod · 0.80
nextTokenMethod · 0.45

Tested by

no test coverage detected