radio buttons
[fanfix.git] / src / jexer / TWidget.java
index 6c03a9cccef8d85c4fb934022e88d545a2922d32..0f920ba976242b5d81240682dac7f8d18a1ff89e 100644 (file)
@@ -1016,4 +1016,35 @@ public abstract class TWidget implements Comparable<TWidget> {
         return new TCheckbox(this, x, y, label, checked);
     }
 
+    /**
+     * Convenience function to add a progress bar to this container/window.
+     *
+     * @param x column relative to parent
+     * @param y row relative to parent
+     * @param width width of progress bar
+     * @param value initial value of percent complete
+     * @return the new progress bar
+     */
+    public final TProgressBar addProgressBar(final int x, final int y,
+        final int width, final int value) {
+
+        return new TProgressBar(this, x, y, width, value);
+    }
+
+    /**
+     * Convenience function to add a radio button group to this
+     * container/window.
+     *
+     * @param x column relative to parent
+     * @param y row relative to parent
+     * @param label label to display on the group box
+     * @return the new radio button group
+     */
+    public final TRadioGroup addRadioGroup(final int x, final int y,
+        final String label) {
+
+        return new TRadioGroup(this, x, y, label);
+    }
+
+
 }