/** * Paints the control as a reaction to the provided paint event. * * @param e * the paint event */ protected void paint(PaintEvent e) { GC gc = e.gc; Rectangle clientArea = getClientArea(); if (clientArea.width == 0 || clientArea.height == 0) return; paintHyperlink(gc); if (paintFocus && hasFocus) { Rectangle carea = getClientArea(); gc.setForeground(getForeground()); gc.drawFocus(0, 0, carea.width, carea.height); } }
/** * Paints the control as a reaction to the provided paint event. * * @param e * the paint event */ protected void paint(PaintEvent e) { GC gc = e.gc; Rectangle clientArea = getClientArea(); if (clientArea.width == 0 || clientArea.height == 0) return; paintHyperlink(gc); if (paintFocus && hasFocus) { Rectangle carea = getClientArea(); gc.setForeground(getForeground()); gc.drawFocus(0, 0, carea.width, carea.height); } }