(Graphics g)
| 26 | } |
| 27 | |
| 28 | @Override |
| 29 | protected void drawOverlay(Graphics g) { |
| 30 | float w = getWidth(); |
| 31 | float h = getHeight(); |
| 32 | float x = 2 * PADDING; |
| 33 | float y = FONT.getCapHeight() / 2; |
| 34 | |
| 35 | g.drawLine(BORDER_THICKNESS, getForeColor(), 0, y, 0, h); //draw left border |
| 36 | g.drawLine(BORDER_THICKNESS, getForeColor(), 0, h, w, h); //draw bottom border |
| 37 | g.drawLine(BORDER_THICKNESS, getForeColor(), w, h, w, y); //draw right border |
| 38 | |
| 39 | //draw caption |
| 40 | g.drawText(caption, FONT, getForeColor(), x, 0, w - x - PADDING, h, false, Align.left, false); |
| 41 | |
| 42 | //draw border left of caption |
| 43 | g.drawLine(BORDER_THICKNESS, getForeColor(), 0, y, x, y); |
| 44 | |
| 45 | //draw border right of caption if needed |
| 46 | float captionEnd = x + FONT.getBounds(caption).width; |
| 47 | if (captionEnd < w) { |
| 48 | g.drawLine(BORDER_THICKNESS, getForeColor(), captionEnd, y, w, y); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | @Override |
| 53 | protected void doLayout(float width, float height) { |
nothing calls this directly
no test coverage detected