Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » removing all children of a IFigure
removing all children of a IFigure [message #241784] Fri, 14 March 2008 14:56 Go to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

Hi,

I'm trying to remove the children of a figure for a specific needs and I
do it like this way

private void removeChildren() {
List<IFigure> children = getChildren();
for (int i = 0; i < children.size(); i++) {
IFigure child = children.get(i);
children.remove(child);
}
}

Unfortunatly I got the following exception while attempting to remove a
child : java.lang.UnsupportedOperationException

What can I do ?

Thanks

Alexandre
Re: removing all children of a IFigure [message #241789 is a reply to message #241784] Fri, 14 March 2008 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

Got it ... by simply call remove on this

private void removeChildren() {
List<IFigure> children = getChildren();
for (int i = 0; i < children.size(); i++) {
IFigure child = children.get(i);
this.remove(child);
}
}
Re: removing all children of a IFigure [message #241807 is a reply to message #241789] Mon, 17 March 2008 18:55 Go to previous message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

ah haan you were removing children from children :)

nice you came out correctly..,
Previous Topic:Visualisation of crossing links (bridges!?)
Next Topic:Strange rendering order problem
Goto Forum:
  


Current Time: Thu Apr 25 16:59:04 GMT 2024

Powered by FUDForum. Page generated in 0.03175 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top