xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilo Behrmann" <T.behrm...@gmx.net>
Subject remove onClickListener
Date Wed, 04 Jan 2006 13:14:57 GMT
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: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message