#40 twidget API updates
[fanfix.git] / src / jexer / TStatusBar.java
index 72a0ec6662163740385f887ecd701fcf5ae4c73f..98565d0f8c8c7d50c29ea86218156dbaa991049b 100644 (file)
@@ -125,24 +125,26 @@ public class TStatusBar extends TWidget {
     /**
      * Public constructor.
      *
-     * @param parent parent widget
+     * @param window the window associated with this status bar
      * @param text text for the bar on the bottom row
      */
-    public TStatusBar(final TWidget parent, final String text) {
+    public TStatusBar(final TWindow window, final String text) {
 
-        // Set parent and window
-        super(parent, false, 0, 0, text.length(), 1);
+        // TStatusBar is a parentless widget, because TApplication handles
+        // its drawing and event routing directly.
+        super(null, false, 0, 0, text.length(), 1);
 
         this.text = text;
+        setWindow(window);
     }
 
     /**
      * Public constructor.
      *
-     * @param parent parent widget
+     * @param window the window associated with this status bar
      */
-    public TStatusBar(final TWidget parent) {
-        this(parent, "");
+    public TStatusBar(final TWindow window) {
+        this(window, "");
     }
 
     // ------------------------------------------------------------------------