: new HashMap(initialAttributes);
getAttributeMap
(ctx, nodeElement, textPath, bidiLevel, m);
asb.append(s, m);
int trefEnd = asb.length() - 1;
TextPaintInfo tpi;
tpi = (TextPaintInfo)elemTPI.get(nodeElement);
tpi.startChar = trefStart;
tpi.endChar = trefEnd;
initialAttributes = null;
}
} else if (ln.equals(SVG_A_TAG)) {
NodeEventTarget target = (NodeEventTarget)nodeElement;
UserAgent ua = ctx.getUserAgent();
SVGAElementBridge.CursorHolder ch;
ch = new SVGAElementBridge.CursorHolder
(CursorManager.DEFAULT_CURSOR);
EventListener l;
l = new SVGAElementBridge.AnchorListener(ua, ch);
target.addEventListenerNS
(XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_CLICK, l, false, null);
ctx.storeEventListenerNS
(target, XMLConstants.XML_EVENTS_NAMESPACE_URI,
SVG_EVENT_CLICK, l, false);
int before = asb.count;
fillAttributedStringBuffer(ctx,
nodeElement,
false,
textPath,
subBidiLevel,
initialAttributes,
asb);
if (asb.count != before) {
initialAttributes = null;
}
}
break;
case Node.TEXT_NODE: // fall-through is intended
case Node.CDATA_SECTION_NODE:
s = n.getNodeValue();
s = normalizeString(s, preserve, prevEndsWithSpace);
if (s.length() != 0) {
asb.append(s, map);
if (preserve) {
endLimit = asb.length();
}
initialAttributes = null;
}
}
}
if (top) {
boolean strippedSome = false;
while ((endLimit < asb.length()) && (asb.getLastChar() == ' ')) {
asb.stripLast();
strippedSome = true;
}
if (strippedSome) {
Iterator iter = elemTPI.values().iterator();
while (iter.hasNext()) {
TextPaintInfo tpi = (TextPaintInfo)iter.next();
if (tpi.endChar >= asb.length()) {
tpi.endChar = asb.length()-1;
if (tpi.startChar > tpi.endChar)
tpi.startChar = tpi.endChar;
}
}
}
}
int elementEndChar = asb.length()-1;
TextPaintInfo tpi = (TextPaintInfo)elemTPI.get(element);
tpi.startChar = elementStartChar;
tpi.endChar = elementEndChar;
}