@Override public void paint(GC gc, Rectangle repaintRegion, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink, SelectionData selData) { paintBullet(gc, repaintRegion, resourceTable); super.paint(gc, repaintRegion, resourceTable, selectedLink, selData); }
@Override public void paint(GC gc, Rectangle repaintRegion, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink, SelectionData selData) { paintBullet(gc, repaintRegion, resourceTable); super.paint(gc, repaintRegion, resourceTable, selectedLink, selData); }
private void repaint(GC gc, int x, int y, int width, int height) { Image textBuffer = new Image(getDisplay(), width, height); Color bg = getBackground(); Color fg = getForeground(); if (!getEnabled()) { bg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); fg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); } GC textGC = new GC(textBuffer, gc.getStyle()); textGC.setForeground(fg); textGC.setBackground(bg); textGC.setFont(getFont()); textGC.fillRectangle(0, 0, width, height); Rectangle repaintRegion = new Rectangle(x, y, width, height); Paragraph[] paragraphs = model.getParagraphs(); IHyperlinkSegment selectedLink = getSelectedLink(); if (getDisplay().getFocusControl() != this) selectedLink = null; for (Paragraph p : paragraphs) { p .paint(textGC, repaintRegion, resourceTable, selectedLink, selData); } if (hasFocus && !model.hasFocusSegments()) textGC.drawFocus(x, y, width, height); textGC.dispose(); gc.drawImage(textBuffer, x, y); textBuffer.dispose(); }
private void repaint(GC gc, int x, int y, int width, int height) { Image textBuffer = new Image(getDisplay(), width, height); Color bg = getBackground(); Color fg = getForeground(); if (!getEnabled()) { bg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); fg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); } GC textGC = new GC(textBuffer, gc.getStyle()); textGC.setForeground(fg); textGC.setBackground(bg); textGC.setFont(getFont()); textGC.fillRectangle(0, 0, width, height); Rectangle repaintRegion = new Rectangle(x, y, width, height); Paragraph[] paragraphs = model.getParagraphs(); IHyperlinkSegment selectedLink = getSelectedLink(); if (getDisplay().getFocusControl() != this) selectedLink = null; for (Paragraph p : paragraphs) { p .paint(textGC, repaintRegion, resourceTable, selectedLink, selData); } if (hasFocus && !model.hasFocusSegments()) textGC.drawFocus(x, y, width, height); textGC.dispose(); gc.drawImage(textBuffer, x, y); textBuffer.dispose(); }