misc cleanup
[fanfix.git] / src / jexer / TLabel.java
index 15d6376d5313adff2010b8e5fd559f8a2b15fdd0..e57ad9b1de1dbe9e94844ca3e2a6ff85dd5de618 100644 (file)
@@ -42,6 +42,24 @@ public final class TLabel extends TWidget {
      */
     private String text = "";
 
+    /**
+     * Get label text.
+     *
+     * @return label text
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * Set label text.
+     *
+     * @param text new label text
+     */
+    public void setText(final String text) {
+        this.text = text;
+    }
+
     /**
      * Label color.
      */
@@ -74,13 +92,9 @@ public final class TLabel extends TWidget {
         final int y, final String colorKey) {
 
         // Set parent and window
-        super(parent, false);
+        super(parent, false, x, y, text.length(), 1);
 
         this.text = text;
-        setX(x);
-        setY(y);
-        setHeight(1);
-        setWidth(text.length());
         this.colorKey = colorKey;
     }