/[classpath]/classpath/javax/swing/plaf/basic/BasicListUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicListUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by rabbit78, Tue Nov 15 20:32:46 2005 UTC revision 1.41 by rabbit78, Wed Nov 16 15:32:22 2005 UTC
# Line 703  public class BasicListUI extends ListUI Line 703  public class BasicListUI extends ListUI
703     */     */
704    protected int getRowHeight(int row)    protected int getRowHeight(int row)
705    {    {
706      if (row < 0 || row >= cellHeights.length)      int height;
707        return -1;      if (cellHeights == null)
708      else if (cellHeight != -1)        height = cellHeight;
       return cellHeight;  
709      else      else
710        return cellHeights[row];        {
711            if (row < 0 || row >= cellHeights.length)
712              height = -1;
713            else
714              height = cellHeights[row];
715          }
716        return height;
717    }    }
718    
719    /**    /**
# Line 803  public class BasicListUI extends ListUI Line 808  public class BasicListUI extends ListUI
808    
809      // If a fixed cell height is set, then we can work more efficient.      // If a fixed cell height is set, then we can work more efficient.
810      if (cellHeight > 0)      if (cellHeight > 0)
811        {        index = Math.min(y0 / cellHeight, index);
         index = Math.max(y0 / cellHeight, index);  
       }  
812      // If we have no fixed cell height, we must add up each cell height up      // If we have no fixed cell height, we must add up each cell height up
813      // to y0.      // to y0.
814      else      else

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26