X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTRadioButton.java;h=ddeec0911711b6621be41e4854b459826f93537f;hb=7c870d89433346ccb5505f8f9ba62d3fc18fe996;hp=23663bb2c84d6ec0894d36bd033a3b47037711e8;hpb=00d2622b0fff2411dc81ee2a0cc43a5f3f52564c;p=fanfix.git diff --git a/src/jexer/TRadioButton.java b/src/jexer/TRadioButton.java index 23663bb..ddeec09 100644 --- a/src/jexer/TRadioButton.java +++ b/src/jexer/TRadioButton.java @@ -52,7 +52,7 @@ public final class TRadioButton extends TWidget { * @return if true then this is the one button in the group that is * selected */ - public boolean getSelected() { + public boolean isSelected() { return selected; } @@ -101,16 +101,12 @@ public final class TRadioButton extends TWidget { final String label, final int id) { // Set parent and window - super(parent); + super(parent, x, y, label.length() + 4, 1); - setX(x); - setY(y); - setHeight(1); this.label = label; - setWidth(label.length() + 4); this.id = id; - setHasCursor(true); + setCursorVisible(true); setCursorX(1); } @@ -137,7 +133,7 @@ public final class TRadioButton extends TWidget { public void draw() { CellAttributes radioButtonColor; - if (getAbsoluteActive()) { + if (isAbsoluteActive()) { radioButtonColor = getTheme().getColor("tradiobutton.active"); } else { radioButtonColor = getTheme().getColor("tradiobutton.inactive"); @@ -161,7 +157,7 @@ public final class TRadioButton extends TWidget { */ @Override public void onMouseDown(final TMouseEvent mouse) { - if ((mouseOnRadioButton(mouse)) && (mouse.getMouse1())) { + if ((mouseOnRadioButton(mouse)) && (mouse.isMouse1())) { // Switch state selected = !selected; if (selected) {