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
/
TVScroller.java
diff --git
a/src/jexer/TVScroller.java
b/src/jexer/TVScroller.java
index 459ef4fbe25986af4984cca3284eef368ad47ea9..fd806e712b9b8e7883cd79cc276bb9f175f53fb1 100644
(file)
--- a/
src/jexer/TVScroller.java
+++ b/
src/jexer/TVScroller.java
@@
-152,24
+152,19
@@
public final class TVScroller extends TWidget {
* @param parent parent widget
* @param x column relative to parent
* @param y row relative to parent
* @param parent parent widget
* @param x column relative to parent
* @param y row relative to parent
- * @param
width
height of scroll bar
+ * @param
height
height of scroll bar
*/
public TVScroller(final TWidget parent, final int x, final int y,
final int height) {
// Set parent and window
*/
public TVScroller(final TWidget parent, final int x, final int y,
final int height) {
// Set parent and window
- super(parent);
-
- setX(x);
- setY(y);
- setHeight(height);
- setWidth(1);
+ super(parent, x, y, 1, height);
}
/**
* Compute the position of the scroll box (a.k.a. grip, thumb).
*
}
/**
* Compute the position of the scroll box (a.k.a. grip, thumb).
*
- * @
param
Y position of the box, between 1 and height - 2
+ * @
return
Y position of the box, between 1 and height - 2
*/
private int boxPosition() {
return (getHeight() - 3) * (value - topValue) / (bottomValue - topValue) + 1;
*/
private int boxPosition() {
return (getHeight() - 3) * (value - topValue) / (bottomValue - topValue) + 1;
@@
-333,7
+328,7
@@
public final class TVScroller extends TWidget {
return;
}
return;
}
- if ((mouse.
get
Mouse1()) &&
+ if ((mouse.
is
Mouse1()) &&
(inScroll) &&
(mouse.getY() > 0) &&
(mouse.getY() < getHeight() - 1)
(inScroll) &&
(mouse.getY() > 0) &&
(mouse.getY() < getHeight() - 1)