git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of https://github.com/klamonte/jexer
[fanfix.git]
/
src
/
jexer
/
TRadioButton.java
diff --git
a/src/jexer/TRadioButton.java
b/src/jexer/TRadioButton.java
index 23663bb2c84d6ec0894d36bd033a3b47037711e8..94f1d19e1a0d507ca1931fe7abc873e58ef54fa1 100644
(file)
--- a/
src/jexer/TRadioButton.java
+++ b/
src/jexer/TRadioButton.java
@@
-1,4
+1,4
@@
-/*
*
+/*
* Jexer - Java Text User Interface
*
* License: LGPLv3 or later
* Jexer - Java Text User Interface
*
* License: LGPLv3 or later
@@
-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
*/
* @return if true then this is the one button in the group that is
* selected
*/
- public boolean
get
Selected() {
+ public boolean
is
Selected() {
return selected;
}
return selected;
}
@@
-101,16
+101,12
@@
public final class TRadioButton extends TWidget {
final String label, final int id) {
// Set parent and window
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;
this.label = label;
- setWidth(label.length() + 4);
this.id = id;
this.id = id;
- set
HasCursor
(true);
+ set
CursorVisible
(true);
setCursorX(1);
}
setCursorX(1);
}
@@
-137,7
+133,7
@@
public final class TRadioButton extends TWidget {
public void draw() {
CellAttributes radioButtonColor;
public void draw() {
CellAttributes radioButtonColor;
- if (
get
AbsoluteActive()) {
+ if (
is
AbsoluteActive()) {
radioButtonColor = getTheme().getColor("tradiobutton.active");
} else {
radioButtonColor = getTheme().getColor("tradiobutton.inactive");
radioButtonColor = getTheme().getColor("tradiobutton.active");
} else {
radioButtonColor = getTheme().getColor("tradiobutton.inactive");
@@
-151,7
+147,7
@@
public final class TRadioButton extends TWidget {
getScreen().putCharXY(1, 0, ' ', radioButtonColor);
}
getScreen().putCharXY(2, 0, ')', radioButtonColor);
getScreen().putCharXY(1, 0, ' ', radioButtonColor);
}
getScreen().putCharXY(2, 0, ')', radioButtonColor);
- getScreen().putStrXY(4, 0, label, radioButtonColor);
+ getScreen().putStr
ing
XY(4, 0, label, radioButtonColor);
}
/**
}
/**
@@
-161,7
+157,7
@@
public final class TRadioButton extends TWidget {
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
*/
@Override
public void onMouseDown(final TMouseEvent mouse) {
- if ((mouseOnRadioButton(mouse)) && (mouse.
get
Mouse1())) {
+ if ((mouseOnRadioButton(mouse)) && (mouse.
is
Mouse1())) {
// Switch state
selected = !selected;
if (selected) {
// Switch state
selected = !selected;
if (selected) {