JScrollBarOperator scroll = (JScrollBarOperator)oper;
setValue(oper, scroll.getMaximum() - scroll.getVisibleAmount());
}
protected void step(ComponentOperator oper, ScrollAdjuster adj) {
JScrollBarOperator scroll = (JScrollBarOperator)oper;
int newValue = -1;
if(adj.getScrollDirection() == adj.DECREASE_SCROLL_DIRECTION) {
newValue = (scroll.getValue() > scroll.getMinimum() +
scroll.getUnitIncrement()) ?
scroll.getValue() - scroll.getUnitIncrement() :
scroll.getMinimum();
} else if(adj.getScrollDirection() == adj.INCREASE_SCROLL_DIRECTION) {
newValue = (scroll.getValue() < scroll.getMaximum() -
scroll.getVisibleAmount() - scroll.getUnitIncrement()) ?
scroll.getValue() + scroll.getUnitIncrement() :
scroll.getMaximum();
}
setValue(oper, newValue);
}