private void addHyperlinkSegment(String text, HyperlinkSettings settings, String fontId) { TextHyperlinkSegment hs = new TextHyperlinkSegment(text, settings, fontId); hs.setWordWrapAllowed(false); hs.setHref(text); addSegment(hs); }
/** * Fully delegates the size computation to the internal layout manager. */ @Override public final Point computeSize(int wHint, int hHint, boolean changed) { return ((FormHeadingLayout) getLayout()).computeSize(this, wHint, hHint, changed); }
public IHyperlinkSegment findHyperlinkAt(int x, int y) { IFocusSelectable[] selectables = getFocusSelectableSegments(); for (IFocusSelectable segment : selectables) { if (segment instanceof IHyperlinkSegment) { IHyperlinkSegment link = (IHyperlinkSegment)segment; if (link.contains(x, y)) return link; } } return null; }
private void createMenuHyperlink() { menuHyperlink = new MenuHyperlink(this, SWT.NULL); menuHyperlink.setBackground(getColor(FormHeading.COLOR_BASE_BG)); menuHyperlink.setDecorationColor(getForeground()); menuHyperlink.setHoverDecorationColor(getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND)); HoverListener listener = new HoverListener(); menuHyperlink.addMouseTrackListener(listener); menuHyperlink.addMouseMoveListener(listener); if (dragSupport) addDragSupport(menuHyperlink, dragOperations, dragTransferTypes, dragListener); }
@Override public void getName(AccessibleEvent e) { if (e.childID == ACC.CHILDID_SELF) e.result = model.getAccessibleText(); else { int linkCount = model.getHyperlinkCount(); if (e.childID >= 0 && e.childID < linkCount) { IHyperlinkSegment link = model.getHyperlink(e.childID); e.result = link.getText(); } } }
@Override public void handleEvent(Event e) { if (gradientImage != null) { FormImages.getInstance().markFinished(gradientImage, getDisplay()); gradientImage = null; } } });
@Override public void layout(GC gc, int width, Locator loc, int lineHeight, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink) { computeRowHeights(gc, width, loc, lineHeight, resourceTable); layoutBullet(gc, loc, lineHeight, resourceTable); super.layout(gc, width, loc, lineHeight, resourceTable, selectedLink); }
public void computeSelection(GC gc, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink, SelectionData selData) { ParagraphSegment[] segments = getSegments(); for (ParagraphSegment segment : segments) { //boolean doSelect = false; //if (selectedLink != null && segment.equals(selectedLink)) //doSelect = true; segment.computeSelection(gc, resourceTable, selData); } }
@Override public Point computeSize(int wHint, int hHint, boolean changed) { return ((PageBookLayout) getLayout()).computeSize(this, wHint, hHint, changed); } }
/** * Fully delegates the size computation to the internal layout manager. */ @Override public final Point computeSize(int wHint, int hHint, boolean changed) { return ((TitleRegionLayout) getLayout()).computeSize(this, wHint, hHint, changed); }
public void addMessageHyperlinkListener(IHyperlinkListener listener) { ensureMessageRegionExists(); messageRegion.addMessageHyperlinkListener(listener); }
private ImageSegment processImageSegment(Node image) { ImageSegment segment = new ImageSegment(); processObjectSegment(segment, image, "i."); //$NON-NLS-1$ return segment; }
@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 getName(AccessibleEvent e) { if (e.childID == ACC.CHILDID_SELF) e.result = model.getAccessibleText(); else { int linkCount = model.getHyperlinkCount(); if (e.childID >= 0 && e.childID < linkCount) { IHyperlinkSegment link = model.getHyperlink(e.childID); e.result = link.getText(); } } }
@Override public void layout(GC gc, int width, Locator loc, int lineHeight, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink) { computeRowHeights(gc, width, loc, lineHeight, resourceTable); layoutBullet(gc, loc, lineHeight, resourceTable); super.layout(gc, width, loc, lineHeight, resourceTable, selectedLink); }
/** * Fully delegates the size computation to the internal layout manager. */ @Override public final Point computeSize(int wHint, int hHint, boolean changed) { return ((FormHeadingLayout) getLayout()).computeSize(this, wHint, hHint, changed); }
public IHyperlinkSegment findHyperlinkAt(int x, int y) { IFocusSelectable[] selectables = getFocusSelectableSegments(); for (IFocusSelectable segment : selectables) { if (segment instanceof IHyperlinkSegment) { IHyperlinkSegment link = (IHyperlinkSegment)segment; if (link.contains(x, y)) return link; } } return null; }
public void computeSelection(GC gc, Hashtable<String, Object> resourceTable, IHyperlinkSegment selectedLink, SelectionData selData) { ParagraphSegment[] segments = getSegments(); for (ParagraphSegment segment : segments) { //boolean doSelect = false; //if (selectedLink != null && segment.equals(selectedLink)) //doSelect = true; segment.computeSelection(gc, resourceTable, selData); } }
@Override public Point computeSize(int wHint, int hHint, boolean changed) { return ((PageBookLayout) getLayout()).computeSize(this, wHint, hHint, changed); } }