*/
public void shift(final int shiftAmount) {
if (centerIndex <= 0 && shiftAmount > 0) return;
if (centerIndex >= items.size() - 1 && shiftAmount < 0) return;
centerIndex -= shiftAmount;
IndexRange newItemRange = null;
if (files != null && centerIndex < (files.length - 1) && centerIndex > (items.size() - 3)) {
final int startIndex = items.size();
for (int i=startIndex; i<(startIndex + imagesPerLoad); i++) {
if (i >= files.length) {
break;
}
addItem(files[i], null, items.size() - 1);
}
if (startIndex < (items.size() - 1)) {
newItemRange = new IndexRange(startIndex, items.size() - 1);
}
}
update(newItemRange);
selectedImageIndexProperty.set(centerIndex);
}