289 |
|
|
290 |
// Show visible owned windows. |
// Show visible owned windows. |
291 |
synchronized (getTreeLock()) |
synchronized (getTreeLock()) |
292 |
{ |
{ |
293 |
Iterator e = ownedWindows.iterator(); |
Iterator e = ownedWindows.iterator(); |
294 |
while(e.hasNext()) |
while(e.hasNext()) |
295 |
{ |
{ |
306 |
// synchronous access to ownedWindows there. |
// synchronous access to ownedWindows there. |
307 |
e.remove(); |
e.remove(); |
308 |
} |
} |
|
} |
|
309 |
validate(); |
validate(); |
310 |
super.show(); |
super.show(); |
311 |
toFront(); |
toFront(); |
312 |
|
|
313 |
KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); |
KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); |
314 |
manager.setGlobalFocusedWindow (this); |
manager.setGlobalFocusedWindow (this); |
315 |
|
|
316 |
if (!shown) |
if (!shown) |
317 |
{ |
{ |
318 |
FocusTraversalPolicy policy = getFocusTraversalPolicy (); |
FocusTraversalPolicy policy = getFocusTraversalPolicy (); |
326 |
|
|
327 |
shown = true; |
shown = true; |
328 |
} |
} |
329 |
|
} |
330 |
} |
} |
331 |
|
|
332 |
/** |
/** |
939 |
* |
* |
940 |
* @since 1.4 |
* @since 1.4 |
941 |
*/ |
*/ |
942 |
public void createBufferStrategy(int numBuffers, |
public void createBufferStrategy(int numBuffers, BufferCapabilities caps) |
943 |
BufferCapabilities caps) |
throws AWTException |
944 |
{ |
{ |
945 |
if (numBuffers < 1) |
if (numBuffers < 1) |
946 |
throw new IllegalArgumentException("Window.createBufferStrategy: number" |
throw new IllegalArgumentException("Window.createBufferStrategy: number" |
952 |
|
|
953 |
// a flipping strategy was requested |
// a flipping strategy was requested |
954 |
if (caps.isPageFlipping()) |
if (caps.isPageFlipping()) |
955 |
{ |
bufferStrategy = new WindowFlipBufferStrategy(numBuffers); |
|
try |
|
|
{ |
|
|
bufferStrategy = new WindowFlipBufferStrategy(numBuffers); |
|
|
} |
|
|
catch (AWTException e) |
|
|
{ |
|
|
} |
|
|
} |
|
956 |
else |
else |
957 |
bufferStrategy = new WindowBltBufferStrategy(numBuffers, true); |
bufferStrategy = new WindowBltBufferStrategy(numBuffers, true); |
958 |
} |
} |