/** * Gets the link attribute of the StandardAttributeResolver object * * @param e PARAM * @return The link value */ public boolean isLink(Object e) { return nsh.getLinkUri((Element) e) != null; }
/** * Gets the visited attribute of the StandardAttributeResolver object * * @param e PARAM * @return The visited value */ public boolean isVisited(Object e) { return isLink(e) && uac.isVisited(nsh.getLinkUri((Element) e)); }
private void processLink(RenderingContext c, Box box, PDPage page, float pageHeight, AffineTransform transform) { Element elem = box.getElement(); if (elem != null) { NamespaceHandler handler = _sharedContext.getNamespaceHandler(); String uri = handler.getLinkUri(elem); if (uri != null) { addUriAsLink(c, box, page, pageHeight, transform, elem, handler, uri, null); } } if (box instanceof BlockBox) { ReplacedElement element = ((BlockBox) box).getReplacedElement(); if (element instanceof IPdfBoxElementWithShapedLinks) { Map<Shape, String> linkMap = ((IPdfBoxElementWithShapedLinks) element).getLinkMap(); if (linkMap != null) { for (Entry<Shape, String> shapeStringEntry : linkMap.entrySet()) { Shape shape = shapeStringEntry.getKey(); String shapeUri = shapeStringEntry.getValue(); NamespaceHandler handler = _sharedContext.getNamespaceHandler(); addUriAsLink(c, box, page, pageHeight, transform, elem, handler, shapeUri, shape); } } } } }
private void processLink(RenderingContext c, Box box, PDPage page, float pageHeight, AffineTransform transform) { Element elem = box.getElement(); if (elem != null) { NamespaceHandler handler = _sharedContext.getNamespaceHandler(); String uri = handler.getLinkUri(elem); if (uri != null) { addUriAsLink(c, box, page, pageHeight, transform, elem, handler, uri, null); } } if (box instanceof BlockBox) { ReplacedElement element = ((BlockBox) box).getReplacedElement(); if (element instanceof IPdfBoxElementWithShapedLinks) { Map<Shape, String> linkMap = ((IPdfBoxElementWithShapedLinks) element).getLinkMap(); if (linkMap != null) { for (Entry<Shape, String> shapeStringEntry : linkMap.entrySet()) { Shape shape = shapeStringEntry.getKey(); String shapeUri = shapeStringEntry.getValue(); NamespaceHandler handler = _sharedContext.getNamespaceHandler(); addUriAsLink(c, box, page, pageHeight, transform, elem, handler, shapeUri, shape); } } } } }
private void processLink(RenderingContext c, Box box, PDPage page, float pageHeight, AffineTransform transform) { Element elem = box.getElement(); if (elem != null) { NamespaceHandler handler = _sharedContext.getNamespaceHandler(); String uri = handler.getLinkUri(elem); if (uri != null) { addUriAsLink(c, box, page, pageHeight, transform, elem, handler, uri, null); } } if (box instanceof BlockBox) { ReplacedElement element = ((BlockBox) box).getReplacedElement(); if (element instanceof IPdfBoxElementWithShapedLinks) { Map<Shape, String> linkMap = ((IPdfBoxElementWithShapedLinks) element).getLinkMap(); if (linkMap != null) { for (Entry<Shape, String> shapeStringEntry : linkMap.entrySet()) { Shape shape = shapeStringEntry.getKey(); String shapeUri = shapeStringEntry.getValue(); NamespaceHandler handler = _sharedContext.getNamespaceHandler(); addUriAsLink(c, box, page, pageHeight, transform, elem, handler, shapeUri, shape); } } } } }