|
@@ -23,11 +23,10 @@
|
23
|
23
|
package com.dmdirc.addons.ui_swing.components.frames;
|
24
|
24
|
|
25
|
25
|
import com.dmdirc.addons.ui_swing.EdtHandlerInvocation;
|
|
26
|
+import com.dmdirc.addons.ui_swing.components.IconManager;
|
26
|
27
|
import com.dmdirc.events.FrameIconChangedEvent;
|
27
|
28
|
import com.dmdirc.events.FrameTitleChangedEvent;
|
28
|
|
-import com.dmdirc.addons.ui_swing.components.IconManager;
|
29
|
|
-
|
30
|
|
-import java.awt.Point;
|
|
29
|
+import com.dmdirc.ui.CoreUIUtils;
|
31
|
30
|
|
32
|
31
|
import javax.swing.JFrame;
|
33
|
32
|
|
|
@@ -46,8 +45,6 @@ public class DesktopWindowFrame extends JFrame {
|
46
|
45
|
/** TextFrame associated with this popout window. */
|
47
|
46
|
private final TextFrame windowWindow;
|
48
|
47
|
private final IconManager iconManager;
|
49
|
|
- /** Initial location for popped out window. */
|
50
|
|
- private final Point initialLocation;
|
51
|
48
|
|
52
|
49
|
/**
|
53
|
50
|
* Creates a new instance of DesktopWindowFrame.
|
|
@@ -57,7 +54,6 @@ public class DesktopWindowFrame extends JFrame {
|
57
|
54
|
public DesktopWindowFrame(final TextFrame windowWindow, final IconManager iconManager) {
|
58
|
55
|
this.windowWindow = windowWindow;
|
59
|
56
|
this.iconManager = iconManager;
|
60
|
|
- initialLocation = windowWindow.getLocationOnScreen();
|
61
|
57
|
|
62
|
58
|
setLayout(new MigLayout("fill, ins rel"));
|
63
|
59
|
add(windowWindow, "grow");
|
|
@@ -71,8 +67,8 @@ public class DesktopWindowFrame extends JFrame {
|
71
|
67
|
*/
|
72
|
68
|
public void display() {
|
73
|
69
|
pack();
|
|
70
|
+ CoreUIUtils.centreWindow(this);
|
74
|
71
|
setVisible(true);
|
75
|
|
- setLocation(initialLocation);
|
76
|
72
|
}
|
77
|
73
|
|
78
|
74
|
@Handler(invocation = EdtHandlerInvocation.class, delivery = Invoke.Asynchronously)
|