X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWidget.java;h=5c93712084a9b6f90bd9728ed17d368de82dfaa4;hb=1e8647a978ba3c3966dbf8ae90eeae6612f403be;hp=012ed756c3a60adf4f40bf72e9c54954a3c28e98;hpb=51e46b3e9d457882e5dad35b79b0bd0d11654f04;p=fanfix.git diff --git a/src/jexer/TWidget.java b/src/jexer/TWidget.java index 012ed75..5c93712 100644 --- a/src/jexer/TWidget.java +++ b/src/jexer/TWidget.java @@ -1157,7 +1157,7 @@ public abstract class TWidget implements Comparable { * @return difference between this.tabOrder and that.tabOrder, or * difference between this.z and that.z, or String.compareTo(text) */ - public final int compareTo(final TWidget that) { + public int compareTo(final TWidget that) { if ((this instanceof TWindow) && (that instanceof TWindow) ) { @@ -1434,9 +1434,9 @@ public abstract class TWidget implements Comparable { if (activeChild != null) { activeChild.active = false; } - child.active = true; - activeChild = child; } + child.active = true; + activeChild = child; } } @@ -2163,6 +2163,21 @@ public abstract class TWidget implements Comparable { return new TRadioGroup(this, x, y, label); } + /** + * 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 width width of group + * @param label label to display on the group box + */ + public final TRadioGroup addRadioGroup(final int x, final int y, + final int width, final String label) { + + return new TRadioGroup(this, x, y, width, label); + } + /** * Convenience function to add a text field to this container/window. *