|
@@ -22,16 +22,11 @@
|
22
|
22
|
|
23
|
23
|
package com.dmdirc.addons.ui_swing.components.frames;
|
24
|
24
|
|
25
|
|
-import com.dmdirc.FrameContainer;
|
26
|
25
|
import com.dmdirc.addons.ui_swing.EdtHandlerInvocation;
|
27
|
|
-import com.dmdirc.addons.ui_swing.UIUtilities;
|
28
|
26
|
import com.dmdirc.events.FrameIconChangedEvent;
|
29
|
27
|
import com.dmdirc.events.FrameTitleChangedEvent;
|
30
|
|
-import com.dmdirc.interfaces.FrameCloseListener;
|
31
|
28
|
|
32
|
29
|
import java.awt.Point;
|
33
|
|
-import java.awt.event.WindowAdapter;
|
34
|
|
-import java.awt.event.WindowEvent;
|
35
|
30
|
|
36
|
31
|
import javax.swing.JFrame;
|
37
|
32
|
|
|
@@ -43,7 +38,7 @@ import net.engio.mbassy.listener.Invoke;
|
43
|
38
|
/**
|
44
|
39
|
* Frame that contains popped out windows
|
45
|
40
|
*/
|
46
|
|
-public class DesktopWindowFrame extends JFrame implements FrameCloseListener {
|
|
41
|
+public class DesktopWindowFrame extends JFrame {
|
47
|
42
|
|
48
|
43
|
/** A version number for this class. */
|
49
|
44
|
private static final long serialVersionUID = 1;
|
|
@@ -61,15 +56,6 @@ public class DesktopWindowFrame extends JFrame implements FrameCloseListener {
|
61
|
56
|
this.windowWindow = windowWindow;
|
62
|
57
|
initialLocation = windowWindow.getLocationOnScreen();
|
63
|
58
|
|
64
|
|
- addWindowListener(new WindowAdapter() {
|
65
|
|
-
|
66
|
|
- @Override
|
67
|
|
- public void windowClosing(final WindowEvent e) {
|
68
|
|
- windowWindow.setPopout(false);
|
69
|
|
- }
|
70
|
|
- });
|
71
|
|
- windowWindow.getContainer().addCloseListener(this);
|
72
|
|
-
|
73
|
59
|
setLayout(new MigLayout("fill, ins rel"));
|
74
|
60
|
add(windowWindow, "grow");
|
75
|
61
|
setPreferredSize(windowWindow.getSize());
|
|
@@ -87,17 +73,6 @@ public class DesktopWindowFrame extends JFrame implements FrameCloseListener {
|
87
|
73
|
setLocation(initialLocation);
|
88
|
74
|
}
|
89
|
75
|
|
90
|
|
- @Override
|
91
|
|
- public void windowClosing(final FrameContainer window) {
|
92
|
|
- UIUtilities.invokeLater(new Runnable() {
|
93
|
|
-
|
94
|
|
- @Override
|
95
|
|
- public void run() {
|
96
|
|
- windowWindow.setPopout(false);
|
97
|
|
- }
|
98
|
|
- });
|
99
|
|
- }
|
100
|
|
-
|
101
|
76
|
@Handler(invocation = EdtHandlerInvocation.class, delivery = Invoke.Asynchronously)
|
102
|
77
|
public void iconChanged(final FrameIconChangedEvent event) {
|
103
|
78
|
if (event.getContainer().equals(windowWindow.getContainer())) {
|