Пример #1
0
 private int getHeight(final int index) {
   int result = 0;
   int columnCount = parent.getColumnCount();
   boolean singleColumn = index == 0 && columnCount == 0;
   boolean columnInRange = index >= 0 && index < columnCount;
   if (singleColumn || columnInRange) {
     result = parent.getItemHeight();
   }
   return result;
 }
Пример #2
0
 private int getTop(final int itemIndex) {
   int relativeItemIndex = itemIndex - parent.getTopIndex();
   int headerHeight = parent.getHeaderHeight();
   int itemHeight = parent.getItemHeight();
   return headerHeight + relativeItemIndex * itemHeight;
 }