*
* The MIT License (MIT)
*
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
import static jexer.TKeypress.*;
/**
- * TSpinner implements a simple up/down spinner. Values can be numer
+ * TSpinner implements a simple up/down spinner.
*/
public class TSpinner extends TWidget {
*/
private boolean mouseOnUpArrow(final TMouseEvent mouse) {
if ((mouse.getY() == 0)
- && (mouse.getX() == getWidth() - 1)
+ && (mouse.getX() == getWidth() - 2)
) {
return true;
}
*/
private boolean mouseOnDownArrow(final TMouseEvent mouse) {
if ((mouse.getY() == 0)
- && (mouse.getX() == getWidth() - 2)
+ && (mouse.getX() == getWidth() - 1)
) {
return true;
}
spinnerColor = getTheme().getColor("tspinner.inactive");
}
- getScreen().putCharXY(getWidth() - 2, 0, GraphicsChars.UPARROW,
- spinnerColor);
- getScreen().putCharXY(getWidth() - 1, 0, GraphicsChars.DOWNARROW,
- spinnerColor);
+ putCharXY(getWidth() - 2, 0, GraphicsChars.UPARROW, spinnerColor);
+ putCharXY(getWidth() - 1, 0, GraphicsChars.DOWNARROW, spinnerColor);
}
// ------------------------------------------------------------------------