Hi anybody,
can anybode tell me how i can remove a onClickListener from a circle
element?
I have try this but the Listener was not removed.
public void renameLocation(RenameLocationEvent e)
{
if (this.districtName.equals(e.getLocation().getDistrict().getName())) {
double x = e.getLocation().getPosition().getX();
double y = e.getLocation().getPosition().getY();
int length =
this.doc.getDocumentElement().getElementsByTagNameNS(this.
svgNS, "circle").getLength();
for (int i = 0; i < length; i++) {
Element elm2 = (Element)this.doc.getDocumentElement().
getElementsByTagNameNS(this.
svgNS, "circle").item(i);
double cx = new Double(elm2.getAttribute("cx")).doubleValue();
double cy = new Double(elm2.getAttribute("cy")).doubleValue();
if (x == cx && y == cy) {
EventTarget t = (EventTarget) elm2;
t.removeEventListener("click",
new OnClickLocationAction(e.getLocation().
getDistrict().getName(), e.getLocationOldName(), disTree),
false);
System.out.println(e.getLocationOldName() + " " +
e.getLocation().getName());
}
}
}
}
Mit freundlichen Grüßen,
Tilo Behrmann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]