public void layout(GC gc, int width, Locator loc, int lineHeight, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink) { ParagraphSegment[] segments = getSegments(); //int height; if (segments.length > 0) { /* if (segments[0] instanceof TextSegment && ((TextSegment) segments[0]).isSelectable()) loc.x += 1; */ // compute heights if (loc.heights == null) computeRowHeights(gc, width, loc, lineHeight, resourceTable); for (ParagraphSegment segment : segments) { boolean doSelect = false; if (selectedLink != null && segment.equals(selectedLink)) doSelect = true; segment.layout(gc, width, loc, resourceTable, doSelect); } loc.heights = null; loc.y += loc.rowHeight; } else { loc.y += lineHeight; } }
public void layout(GC gc, int width, Locator loc, int lineHeight, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink) { ParagraphSegment[] segments = getSegments(); //int height; if (segments.length > 0) { /* if (segments[0] instanceof TextSegment && ((TextSegment) segments[0]).isSelectable()) loc.x += 1; */ // compute heights if (loc.heights == null) computeRowHeights(gc, width, loc, lineHeight, resourceTable); for (ParagraphSegment segment : segments) { boolean doSelect = false; if (selectedLink != null && segment.equals(selectedLink)) doSelect = true; segment.layout(gc, width, loc, resourceTable, doSelect); } loc.heights = null; loc.y += loc.rowHeight; } else { loc.y += lineHeight; } }