(Graphics g, int ofs, boolean sel)
| 63 | } |
| 64 | |
| 65 | public void drawItem(Graphics g, int ofs, boolean sel) { |
| 66 | colorItem=ColorTheme.getColor(ColorTheme.CONTROL_ITEM); |
| 67 | colorBorder=ColorTheme.getColor(ColorTheme.CURSOR_OUTLINE); |
| 68 | colorBGnd=ColorTheme.getColor(ColorTheme.LIST_BGND); |
| 69 | |
| 70 | int width=g.getClipWidth(); |
| 71 | int height=fontHeight; |
| 72 | |
| 73 | int oldColor=g.getColor(); |
| 74 | |
| 75 | int thisOfs=0; |
| 76 | |
| 77 | int y = 0; |
| 78 | thisOfs = (getCaptionLength() > width) ? -ofs : 2; |
| 79 | g.setFont(captionFont); |
| 80 | FontCache.drawString(g,caption, thisOfs, y, Graphics.TOP | Graphics.LEFT); |
| 81 | y = captionFontHeight; |
| 82 | |
| 83 | g.setColor(colorBGnd); |
| 84 | g.fillRect(0, y, width-1, height-1); |
| 85 | |
| 86 | g.setColor((sel)?colorBorder:colorItem); |
| 87 | g.drawRect(0, y, width-1, height-1); |
| 88 | |
| 89 | g.setColor(oldColor); |
| 90 | |
| 91 | if (getTextLength()>0) { |
| 92 | thisOfs=(getTextLength()>width)?-ofs+4:4; |
| 93 | g.setFont(font); |
| 94 | FontCache.drawString(g,toString(), thisOfs, y, Graphics.TOP|Graphics.LEFT); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | public int getVHeight() { |
| 99 | return captionFontHeight+fontHeight; |
nothing calls this directly
no test coverage detected