JButtonOperator boper = findAButton(oper, adj.getScrollDirection());
DriverManager.getButtonDriver(boper).push(boper);
}
protected void jump(final ComponentOperator oper, final ScrollAdjuster adj) {
final JButtonOperator lessButton = findAButton(oper, adj.DECREASE_SCROLL_DIRECTION);
final JButtonOperator moreButton = findAButton(oper, adj.INCREASE_SCROLL_DIRECTION);
queueTool.invokeSmoothly(new QueueTool.QueueAction("Choise expanding") {
public Object launch() {
if(adj.getScrollDirection() != ScrollAdjuster.DO_NOT_TOUCH_SCROLL_DIRECTION) {
int x, y;
if (((JScrollBarOperator)oper).getOrientation() == JScrollBar.HORIZONTAL) {
if (adj.getScrollDirection() == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) {
x = moreButton.getX() - 1;
} else if(adj.getScrollDirection() == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) {
x = lessButton .getX() + lessButton.getWidth();
} else {
return(null);
}
y = lessButton.getHeight() / 2;
} else if(((JScrollBarOperator)oper).getOrientation() == JScrollBar.VERTICAL) {
if (adj.getScrollDirection() == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) {
y = moreButton.getY() - 1;
} else if(adj.getScrollDirection() == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) {
y = lessButton .getY() + lessButton.getHeight();
} else {
return(null);
}