Community
Participate
Working Groups
}
clearItemsTextWidths();
updateScrollBars();
adjustTopIndex();
showSelection();
return topItemIndex;
final int getVisibleItemCount( boolean includePartlyVisible ) {
int clientHeight = getBounds().height - getHeaderHeight() - getHScrollBarHeight();
int result = 0;
if( clientHeight >= 0 ) {
int itemHeight = getItemHeight();
result = clientHeight / itemHeight;
if( includePartlyVisible && clientHeight % itemHeight != 0 ) {
result++;
return result;
/**
* Shows the column. If the column is already showing in the receiver,
* this method simply returns. Otherwise, the columns are scrolled until
private void adjustTopIndex() {
int visibleItemCount = getVisibleItemCount( false );
if( topItemIndex > itemCount - visibleItemCount - 1 ) {
topItemIndex = Math.max( 0, itemCount - visibleItemCount - 1 );
///////////////////
// Skinning support
private static final class ResizeListener extends ControlAdapter {
private final class ResizeListener extends ControlAdapter {
@Override
public void controlResized( ControlEvent event ) {
Tree tree = ( Tree )event.widget;
updateAllItems();
tree.updateAllItems();
tree.updateScrollBars();