Creates a new instance of SmilePicker @param caretPos @param me
(int caretPos, MessageEdit me)
| 75 | * @param me |
| 76 | */ |
| 77 | public SmilePicker(int caretPos, MessageEdit me) { |
| 78 | super(SR.MS_SELECT); |
| 79 | this.caretPos=caretPos; |
| 80 | |
| 81 | this.me = me; |
| 82 | |
| 83 | il = SmilesIcons.getInstance(); |
| 84 | //#ifdef SMILES |
| 85 | smileTable=MessageParser.getInstance().getSmileTable(); |
| 86 | //#endif |
| 87 | |
| 88 | imgCnt=smileTable.size(); |
| 89 | |
| 90 | realWidth=VirtualCanvas.getInstance().getWidth()-scrollbar.getScrollWidth(); |
| 91 | |
| 92 | imgWidth=Math.max(il.getWidth()+(CURSOR_HOFFSET*2), cf.minItemHeight); |
| 93 | lineHeight = il.getHeight()+(CURSOR_VOFFSET*2); |
| 94 | |
| 95 | xCnt= realWidth / imgWidth; |
| 96 | |
| 97 | lines=imgCnt/xCnt; |
| 98 | xLastCnt=imgCnt-lines*xCnt; |
| 99 | if (xLastCnt>0) lines++; else xLastCnt=xCnt; |
| 100 | |
| 101 | xBorder=(realWidth-(xCnt*imgWidth))/2; |
| 102 | enableListWrapping(true); |
| 103 | } |
| 104 | |
| 105 | int lineIndex; |
| 106 |
nothing calls this directly
no test coverage detected