Making ScrollBar invisible when no need to scroll inside ScrollPane:
In ScrollBar.java the code of setSelection(int selection) method should be modified to include the following line:
this.setVisible(!barHidden);
So the whole code of setSelection(int selection) will be:
public void setSelection(int selection) {
int lastSelection = this.selection;
this.selection = Math.min(MathFP.ONE, Math.max(0, selection));
if (this.selection != lastSelection) {
if (horizontal) {
barLayoutData.width = this.selection;
barLayoutData.height = -1;
} else {
barLayoutData.width = -1;
barLayoutData.height = this.selection;
}
barHidden = this.selection == MathFP.ONE || this.selection == 0;
bar.invalidate();
this.setVisible(!barHidden);
}
}
ramezs@gmail.com