update node labels when connecting or disconnecting
[jSite2.git] / src / net / pterodactylus / jsite / gui / MainWindow.java
index 2e04224..654f548 100644 (file)
@@ -63,7 +63,6 @@ import net.pterodactylus.util.swing.SwingUtils;
  * Defines the main window of the application.
  * 
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
  */
 public class MainWindow extends JFrame implements WindowListener, I18nable, PropertyChangeListener {
 
@@ -216,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
        //