}
return minimumThumbSize;
}
protected JButton createDecreaseButton(int orientation) {
SeaGlassArrowButton synthArrowButton = new SeaGlassArrowButton(orientation) {
@Override
public boolean contains(int x, int y) {
// if there is an overlap between the track and button
if (decrGap < 0) {
// FIXME Need to take RtL orientation into account.
if (buttonsTogether.isInState(scrollbar)) {
int minX = 0;
int minY = 0;
if (scrollbar.getOrientation() == JScrollBar.VERTICAL) {
// adjust the height by decrGap
// Note: decrGap is negative!
minY -= decrGap;
} else {
// adjust the width by decrGap
// Note: decrGap is negative!
minX -= decrGap;
}
return (x >= minX) && (x < getWidth()) && (y >= minY) && (y < getHeight());
} else {
int width = getWidth();
int height = getHeight();
if (scrollbar.getOrientation() == JScrollBar.VERTICAL) {
// adjust the height by decrGap
// Note: decrGap is negative!
height += decrGap;
} else {
// adjust the width by decrGap
// Note: decrGap is negative!
width += decrGap;
}
return (x >= 0) && (x < width) && (y >= 0) && (y < height);
}
}
return super.contains(x, y);
}
};
synthArrowButton.setName("ScrollBar.button");
return synthArrowButton;
}