update node labels when connecting or disconnecting
[jSite2.git] / src / net / pterodactylus / jsite / gui / MainWindow.java
index d09c352..654f548 100644 (file)
@@ -215,6 +215,36 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop
                return null;
        }
 
+       /**
+        * Sets the given node to the “online” state.
+        * 
+        * @param node
+        *            The node to set online
+        */
+       public void setOnline(Node node) {
+               nodeLabels.get(node).setOnline();
+       }
+
+       /**
+        * Sets the given node to the “offline” state in the status bar.
+        * 
+        * @param node
+        *            The node to set offline
+        */
+       public void setOffline(Node node) {
+               nodeLabels.get(node).setOffline();
+       }
+
+       /**
+        * Sets the given node to the “error” state in the status bar.
+        * 
+        * @param node
+        *            The node to set the error state for
+        */
+       public void setError(Node node) {
+               nodeLabels.get(node).setError();
+       }
+
        //
        // ACTIONS
        //