| 123 | } |
| 124 | |
| 125 | public void drawItem(Graphics g, int ofs, boolean selected){ |
| 126 | int max=(lineIndex==lines-1)? xLastCnt:xCnt; |
| 127 | int x, iwidth; |
| 128 | |
| 129 | //#ifdef ANI_SMILES |
| 130 | AniIcon item; |
| 131 | //#endif |
| 132 | for (int i=0;i<max;i++) { |
| 133 | x = xBorder+(i*imgWidth+CURSOR_HOFFSET); |
| 134 | //#ifdef ANI_SMILES |
| 135 | if (il instanceof AniImageList) { |
| 136 | item = ((AniImageList)il).iconAt(lineIndex*xCnt + i); |
| 137 | iwidth = (item == null)? 0 : item.getWidth(); |
| 138 | x += (imgWidth - iwidth) >> 1; |
| 139 | } |
| 140 | //#endif |
| 141 | il.drawImage(g, lineIndex*xCnt + i, x, CURSOR_VOFFSET); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | protected synchronized int updateLayout() { |
| 146 | int res = super.updateLayout(); |