/** * Gets the attributeValue attribute of the StandardAttributeResolver object * * @param e PARAM * @param attrName PARAM * @return The attributeValue value */ public String getAttributeValue(Object e, String attrName) { return nsh.getAttributeValue((Element) e, attrName); }
/** * 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 class attribute of the StandardAttributeResolver object * * @param e PARAM * @return The class value */ public String getClass(Object e) { return nsh.getClass((Element) e); }
private void addBoxID(LayoutContext c) { if (! isAnonymous()) { String name = c.getNamespaceHandler().getAnchorName(getElement()); if (name != null) { c.addBoxId(name, this); } String id = c.getNamespaceHandler().getID(getElement()); if (id != null) { c.addBoxId(id, this); } } }
long st = System.currentTimeMillis(); StylesheetInfo defaultStylesheet = _nsh.getDefaultStylesheet(_stylesheetFactory); if (defaultStylesheet != null) { infos.add(defaultStylesheet); StylesheetInfo[] refs = _nsh.getStylesheets(_doc); int inlineStyleCount = 0; if (refs != null) {
if (re == null) { Image im = null; String imageSrc = context.getNamespaceHandler().getImageSourceURI(elem); if (imageSrc == null || imageSrc.length() == 0) { XRLog.layout(Level.WARNING, "No source provided for img element.");
/** * Gets the iD attribute of the StandardAttributeResolver object * * @param e PARAM * @return The iD value */ public String getID(Object e) { return nsh.getID((Element) e); }
/** * Gets the elementStyling attribute of the StandardAttributeResolver object * * @param e PARAM * @return The elementStyling value */ public String getElementStyling(Object e) { return nsh.getElementStyling((Element) e); }
/** * Gets the lang attribute of the StandardAttributeResolver object * * @param e PARAM * @return The lang value */ public String getLang(Object e) { return nsh.getLang((Element) e); }
public String getNonCssStyling(Object e) { return nsh.getNonCssStyling((Element) e); }
public void reset(LayoutContext c) { resetChildren(c); if (_layer != null) { _layer.detach(); _layer = null; } setContainingLayer(null); setLayer(null); setPaintingInfo(null); setContentWidth(0); _workingMargin = null; String anchorName = c.getNamespaceHandler().getAnchorName(getElement()); if (anchorName != null) { c.removeBoxId(anchorName); } Element e = getElement(); if (e != null) { String id = c.getNamespaceHandler().getID(e); if (id != null) { c.removeBoxId(id); } } }
String imageSrc = context.getNamespaceHandler().getImageSourceURI(elem);
public String getAttributeValue(Object e, String namespaceURI, String attrName) { return nsh.getAttributeValue((Element)e, namespaceURI, attrName); }
/** * 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)); }
String name = c.getNamespaceHandler().getAnchorName(currentIB.getElement()); if (name != null) { c.addBoxId(name, currentIB); String id = c.getNamespaceHandler().getID(currentIB.getElement()); if (id != null) { c.addBoxId(id, currentIB);
if (handler.getAttributeValue(elem, "onclick") != null && !"".equals(handler.getAttributeValue(elem, "onclick"))) { action = new PDActionJavaScript(handler.getAttributeValue(elem, "onclick")); } else { PDActionGoTo go = new PDActionGoTo();
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); } } } } }
if (handler.getAttributeValue(elem, "onclick") != null && !"".equals(handler.getAttributeValue(elem, "onclick"))) { action = new PDActionJavaScript(handler.getAttributeValue(elem, "onclick")); } else { PDActionGoTo go = new PDActionGoTo();
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); } } } } }
if (handler.getAttributeValue(elem, "onclick") != null && !"".equals(handler.getAttributeValue(elem, "onclick"))) { action = new PDActionJavaScript(handler.getAttributeValue(elem, "onclick")); } else { PDActionGoTo go = new PDActionGoTo();