|
@@ -22,12 +22,12 @@
|
22
|
22
|
|
23
|
23
|
package com.dmdirc.addons.lagdisplay;
|
24
|
24
|
|
25
|
|
-import com.dmdirc.Server;
|
26
|
25
|
import com.dmdirc.ServerManager;
|
27
|
26
|
import com.dmdirc.ServerState;
|
28
|
27
|
import com.dmdirc.addons.ui_swing.MainFrame;
|
29
|
28
|
import com.dmdirc.addons.ui_swing.components.statusbar.StatusbarPanel;
|
30
|
29
|
import com.dmdirc.addons.ui_swing.components.statusbar.StatusbarPopupWindow;
|
|
30
|
+import com.dmdirc.interfaces.Connection;
|
31
|
31
|
|
32
|
32
|
import java.util.List;
|
33
|
33
|
|
|
@@ -72,9 +72,9 @@ public class ServerInfoDialog extends StatusbarPopupWindow {
|
72
|
72
|
|
73
|
73
|
@Override
|
74
|
74
|
protected void initContent(final JPanel panel) {
|
75
|
|
- final List<Server> servers = serverManager.getServers();
|
|
75
|
+ final List<Connection> connections = serverManager.getServers();
|
76
|
76
|
|
77
|
|
- if (servers.isEmpty()) {
|
|
77
|
+ if (connections.isEmpty()) {
|
78
|
78
|
panel.add(new JLabel("No open servers."));
|
79
|
79
|
} else {
|
80
|
80
|
if (manager.shouldShowGraph()) {
|
|
@@ -82,12 +82,14 @@ public class ServerInfoDialog extends StatusbarPopupWindow {
|
82
|
82
|
panel.add(new JSeparator(), "span, grow, wrap");
|
83
|
83
|
}
|
84
|
84
|
|
85
|
|
- for (final Server server : servers) {
|
86
|
|
- panel.add(new JLabel(server.getName()));
|
87
|
|
- panel.add(new JLabel(server.getState() == ServerState.CONNECTED
|
88
|
|
- ? server.getNetwork() : "---", SwingConstants.CENTER), "grow");
|
89
|
|
- panel.add(new JLabel(server.getState() == ServerState.CONNECTED
|
90
|
|
- ? manager.getTime(server) : "---", SwingConstants.RIGHT), "grow, wrap");
|
|
85
|
+ for (Connection connection : connections) {
|
|
86
|
+ panel.add(new JLabel(connection.getAddress()));
|
|
87
|
+ panel.add(new JLabel(
|
|
88
|
+ connection.getState() == ServerState.CONNECTED
|
|
89
|
+ ? connection.getNetwork() : "---",
|
|
90
|
+ SwingConstants.CENTER), "grow");
|
|
91
|
+ panel.add(new JLabel(connection.getState() == ServerState.CONNECTED
|
|
92
|
+ ? manager.getTime(connection) : "---", SwingConstants.RIGHT), "grow, wrap");
|
91
|
93
|
}
|
92
|
94
|
}
|
93
|
95
|
}
|