X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTRadioGroup.java;h=8dcca3a4aa3a4901eec787ebaf3fd5536664eff3;hb=3649b9210ea425f398ba8c24f9509669cf72aa96;hp=c1b652352d1b4b36049be132fed9fa229d96382e;hpb=00d2622b0fff2411dc81ee2a0cc43a5f3f52564c;p=fanfix.git diff --git a/src/jexer/TRadioGroup.java b/src/jexer/TRadioGroup.java index c1b6523..8dcca3a 100644 --- a/src/jexer/TRadioGroup.java +++ b/src/jexer/TRadioGroup.java @@ -1,4 +1,4 @@ -/** +/* * Jexer - Java Text User Interface * * License: LGPLv3 or later @@ -65,7 +65,7 @@ public final class TRadioGroup extends TWidget { * @param button new button that became selected */ void setSelected(final TRadioButton button) { - assert (button.getSelected()); + assert (button.isSelected()); if (selectedButton != null) { selectedButton.setSelected(false); } @@ -84,13 +84,9 @@ public final class TRadioGroup extends TWidget { final String label) { // Set parent and window - super(parent); + super(parent, x, y, label.length() + 4, 2); - setX(x); - setY(y); - setHeight(2); this.label = label; - setWidth(label.length() + 4); } /** @@ -100,7 +96,7 @@ public final class TRadioGroup extends TWidget { public void draw() { CellAttributes radioGroupColor; - if (getAbsoluteActive()) { + if (isAbsoluteActive()) { radioGroupColor = getTheme().getColor("tradiogroup.active"); } else { radioGroupColor = getTheme().getColor("tradiogroup.inactive"); @@ -110,7 +106,7 @@ public final class TRadioGroup extends TWidget { radioGroupColor, radioGroupColor, 3, false); getScreen().hLineXY(1, 0, label.length() + 2, ' ', radioGroupColor); - getScreen().putStrXY(2, 0, label, radioGroupColor); + getScreen().putStringXY(2, 0, label, radioGroupColor); } /**