Return-Path: Delivered-To: apmail-xmlgraphics-batik-users-archive@www.apache.org Received: (qmail 23165 invoked from network); 14 Apr 2006 02:00:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Apr 2006 02:00:39 -0000 Received: (qmail 29684 invoked by uid 500); 14 Apr 2006 02:00:38 -0000 Delivered-To: apmail-xmlgraphics-batik-users-archive@xmlgraphics.apache.org Received: (qmail 29666 invoked by uid 500); 14 Apr 2006 02:00:38 -0000 Mailing-List: contact batik-users-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-users@xmlgraphics.apache.org Delivered-To: mailing list batik-users@xmlgraphics.apache.org Received: (qmail 29653 invoked by uid 99); 14 Apr 2006 02:00:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Apr 2006 19:00:37 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of thomas.deweese@kodak.com designates 192.232.121.200 as permitted sender) Received: from [192.232.121.200] (HELO smtp1.kodak.com) (192.232.121.200) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Apr 2006 19:00:37 -0700 Received: from roc-us-e1000-111.kodak.com (roc-us-e1000-111.kodak.com [192.232.121.191]) by smtp1.kodak.com (8.11.3/8.11.1) with SMTP id k3E20Gu08100 for ; Thu, 13 Apr 2006 22:00:16 -0400 (EDT) Received: from (150.221.122.53) by roc-us-e1000-111.kodak.com via smtp id 18a1_6ae5527e_cb5a_11da_9289_0002b3efa0be; Thu, 13 Apr 2006 22:00:15 -0400 In-Reply-To: To: batik-users@xmlgraphics.apache.org Cc: batik-users@xmlgraphics.apache.org Subject: RE: removing elements MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.4 March 27, 2005 Message-ID: From: thomas.deweese@kodak.com Date: Thu, 13 Apr 2006 22:00:15 -0400 X-MIMETrack: Serialize by Router on KNOTES2/ISBP/EKC(Release 6.5.4FP1|June 19, 2005) at 04/13/2006 10:00:16 PM, Serialize complete at 04/13/2006 10:00:16 PM Content-Type: text/plain; charset="US-ASCII" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Javid, Your code below will work, but in most cases it would be simpler (and faster) to simply remove the group, and create a new one... "Javid Alimohideen" wrote on 04/13/2006 03:55:43 PM: > Yasmin, > It will work, but the question is how you would like to do. In my > application, I remove all the elements from the circleGroup and add the new > set of circles. You could use the method below to remove all the child > elements > > void removeAllChild(Element elt) > { > while (elt.getFirstChild() != null) > { > elt.removeChild(elt.getFirstchild()); > } > } > > Say, if you call your circle group to be circleSet, the you would call the > above method passing the circleSet as an argument. > > Hope, it helps, > > Javid > > -----Original Message----- > From: rafiqy@blueyonder.co.uk [mailto:rafiqy@blueyonder.co.uk] > Sent: Thursday, April 13, 2006 2:36 PM > To: batik-users@xmlgraphics.apache.org > Subject: RE: removing elements > > > Avid, > > ...would it be better if I removed all the 'circle Group' and then add it > again with only the circles I want to display...? > > yasmin > > > > Yasmin, > > If you have some id information associated with the circles then you could > > remove it like this: > > > > Element circleGroup > > > > Element child = (Element) circleGroup.getFirstChild() > > while (child != null) { > > if child.getAttributeNS(SVG_NS, "id" ) == "your id" > > circleGroup.removeChild(child); > > } > > > > I think this would work but I haven't tested it. > > > > Javid > > > > -----Original Message----- > > From: rafiqy@blueyonder.co.uk [mailto:rafiqy@blueyonder.co.uk] > > Sent: Thursday, April 13, 2006 10:57 AM > > To: batik-users@xmlgraphics.apache.org > > Subject: removing elements > > > > > > Hi All, > > > > Can someone plz advice me how to remove elements from a group, to make > > myself clear, ...I have added a 'CircleGroup', to my svgDocument, now I > > want to remove some of the circles from this group???? > > > > Thanx > > > > yasmin > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org > > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org > > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org