@Override
public void setWidth(final int width) {
super.setWidth(width);
- hScroller.setWidth(getWidth() - 1);
- vScroller.setX(getWidth() - 1);
+ if (hScroller != null) {
+ hScroller.setWidth(getWidth() - 1);
+ }
+ if (vScroller != null) {
+ vScroller.setX(getWidth() - 1);
+ }
}
/**
* Override TWidget's height: we need to set child widget heights.
- * time.
*
* @param height new widget height
*/
@Override
public void setHeight(final int height) {
super.setHeight(height);
- hScroller.setY(getHeight() - 1);
- vScroller.setHeight(getHeight() - 1);
+ if (hScroller != null) {
+ hScroller.setY(getHeight() - 1);
+ }
+ if (vScroller != null) {
+ vScroller.setHeight(getHeight() - 1);
+ }
}
/**
int topY = 0;
for (int i = begin; i < strings.size(); i++) {
String line = strings.get(i);
+ if (line == null) {
+ line = "";
+ }
if (getHorizontalValue() < line.length()) {
line = line.substring(getHorizontalValue());
} else {
assert (selectedString >= 0);
assert (selectedString < strings.size());
if (enterAction != null) {
- enterAction.DO();
+ enterAction.DO(this);
}
}
assert (selectedString >= 0);
assert (selectedString < strings.size());
if (moveAction != null) {
- moveAction.DO();
+ moveAction.DO(this);
}
}
assert (selectedString >= 0);
assert (selectedString < strings.size());
if (singleClickAction != null) {
- singleClickAction.DO();
+ singleClickAction.DO(this);
}
}