content.setVisible(visible);
if (visible && oldIndex >= 0) {
Object layoutDataObject = content.getLayoutData();
if (layoutDataObject instanceof LayoutData) {
LayoutData layoutData = (LayoutData) layoutDataObject;
if (index > oldIndex) {
layoutData.setSourceTop(content.getOffsetHeight());
} else {
layoutData.setSourceTop(-content.getOffsetHeight());
}
}
}
}