set frame icon
[jSite2.git] / src / net / pterodactylus / jsite / gui / MainWindow.java
index d09c352..4ed06db 100644 (file)
@@ -137,6 +137,7 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop
                SwingUtils.center(this);
                I18n.registerI18nable(this);
                addWindowListener(this);
+               setIconImage(IconLoader.loadImage("/jSite-frame-icon.png"));
        }
 
        //
@@ -215,6 +216,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
        //