equal
deleted
inserted
replaced
24 */ |
24 */ |
25 |
25 |
26 |
26 |
27 package javax.swing; |
27 package javax.swing; |
28 |
28 |
|
29 import com.sun.awt.AWTUtilities; |
|
30 import sun.awt.AWTAccessor; |
|
31 import sun.awt.SunToolkit; |
|
32 |
29 import java.awt.*; |
33 import java.awt.*; |
30 import java.beans.PropertyVetoException; |
34 import java.beans.PropertyVetoException; |
31 import java.beans.PropertyChangeEvent; |
|
32 import javax.swing.border.Border; |
|
33 import java.awt.event.ComponentListener; |
|
34 import java.awt.event.ComponentAdapter; |
|
35 import java.awt.event.ComponentEvent; |
|
36 |
|
37 import sun.awt.AWTAccessor; |
|
38 import sun.awt.SunToolkit; |
|
39 |
35 |
40 /** This is an implementation of the <code>DesktopManager</code>. |
36 /** This is an implementation of the <code>DesktopManager</code>. |
41 * It currently implements the basic behaviors for managing |
37 * It currently implements the basic behaviors for managing |
42 * <code>JInternalFrame</code>s in an arbitrary parent. |
38 * <code>JInternalFrame</code>s in an arbitrary parent. |
43 * <code>JInternalFrame</code>s that are not children of a |
39 * <code>JInternalFrame</code>s that are not children of a |
316 JDesktopPane p = getDesktopPane(f); |
312 JDesktopPane p = getDesktopPane(f); |
317 Container parent = f.getParent(); |
313 Container parent = f.getParent(); |
318 dragMode = DEFAULT_DRAG_MODE; |
314 dragMode = DEFAULT_DRAG_MODE; |
319 if (p != null) { |
315 if (p != null) { |
320 String mode = (String)p.getClientProperty("JDesktopPane.dragMode"); |
316 String mode = (String)p.getClientProperty("JDesktopPane.dragMode"); |
321 if (mode != null && mode.equals("outline")) { |
317 Window window = SwingUtilities.getWindowAncestor(f); |
|
318 if (window != null && !AWTUtilities.isWindowOpaque(window)) { |
|
319 dragMode = DEFAULT_DRAG_MODE; |
|
320 } else if (mode != null && mode.equals("outline")) { |
322 dragMode = OUTLINE_DRAG_MODE; |
321 dragMode = OUTLINE_DRAG_MODE; |
323 } else if (mode != null && mode.equals("faster") |
322 } else if (mode != null && mode.equals("faster") |
324 && f instanceof JInternalFrame |
323 && f instanceof JInternalFrame |
325 && ((JInternalFrame)f).isOpaque() && |
324 && ((JInternalFrame)f).isOpaque() && |
326 (parent == null || parent.isOpaque())) { |
325 (parent == null || parent.isOpaque())) { |