Exemplo n.º 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;
 }
Exemplo n.º 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;
 }