90 |
*/ |
*/ |
91 |
Window() |
Window() |
92 |
{ |
{ |
93 |
|
visible = false; |
94 |
setLayout(new BorderLayout()); |
setLayout(new BorderLayout()); |
95 |
} |
} |
96 |
|
|
728 |
{ |
{ |
729 |
this.focusableWindowState = focusableWindowState; |
this.focusableWindowState = focusableWindowState; |
730 |
} |
} |
731 |
|
|
732 |
|
// setBoundsCallback is needed so that when a user moves a window, |
733 |
|
// the Window's location can be updated without calling the peer's |
734 |
|
// setBounds method. When a user moves a window the peer window's |
735 |
|
// location is updated automatically and the windowing system sends |
736 |
|
// a message back to the application informing it of its updated |
737 |
|
// dimensions. We must update the AWT Window class with these new |
738 |
|
// dimensions. But we don't want to call the peer's setBounds |
739 |
|
// method, because the peer's dimensions have already been updated. |
740 |
|
// (Under X, having this method prevents Configure event loops when |
741 |
|
// moving windows: Component.setBounds -> peer.setBounds -> |
742 |
|
// postConfigureEvent -> Component.setBounds -> ... In some cases |
743 |
|
// Configure event loops cause windows to jitter back and forth |
744 |
|
// continuously). |
745 |
|
void setBoundsCallback (int x, int y, int w, int h) |
746 |
|
{ |
747 |
|
if (this.x == x && this.y == y && width == w && height == h) |
748 |
|
return; |
749 |
|
invalidate(); |
750 |
|
this.x = x; |
751 |
|
this.y = y; |
752 |
|
width = w; |
753 |
|
height = h; |
754 |
|
} |
755 |
} |
} |