blob: e597d0249db0b9bc617a61fe961bc97b642b6c4a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package NET.worlds.console;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Point;
class PolledDialogSaver {
int x;
int y;
int w;
int h;
PolledDialogSaver(Dialog dbox) {
Point loc = dbox.location();
Dimension size = dbox.getSize();
this.x = loc.x;
this.y = loc.y;
this.w = size.width;
this.h = size.height;
}
static boolean restorePosAndSize(Object o, PolledDialog d) {
if (o != null) {
PolledDialogSaver t = (PolledDialogSaver)o;
d.reshape(t.x, t.y, t.w, t.h);
return true;
} else {
return false;
}
}
}
|