/** * Returns the line in the source code of the specified element or * -1 if not found. * * @param e the element * @return -1 the document has been removed from the cache or has not * been loaded by this document loader. */ public int getLineNumber(Element e) { String uri = ((SVGDocument)e.getOwnerDocument()).getURL(); DocumentState state; synchronized (cacheMap) { state = (DocumentState)cacheMap.get(uri); } if (state == null) { return -1; } else { return state.desc.getLocationLine(e); } }
/** * Returns the line in the source code of the specified element or * -1 if not found. * * @param e the element * @return -1 the document has been removed from the cache or has not * been loaded by this document loader. */ public int getLineNumber(Element e) { String uri = ((SVGDocument)e.getOwnerDocument()).getURL(); DocumentState state; synchronized (cacheMap) { state = (DocumentState)cacheMap.get(uri); } if (state == null) { return -1; } else { return state.desc.getLocationLine(e); } }
/** * Returns the line in the source code of the specified element or * -1 if not found. * * @param e the element * @return -1 the document has been removed from the cache or has not * been loaded by this document loader. */ public int getLineNumber(Element e) { String uri = ((SVGDocument)e.getOwnerDocument()).getURL(); DocumentState state; synchronized (cacheMap) { state = (DocumentState)cacheMap.get(uri); } if (state == null) { return -1; } else { return state.desc.getLocationLine(e); } }