Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Hide Selection of EditPart Figures
Hide Selection of EditPart Figures [message #190190] Tue, 02 August 2005 20:29 Go to next message
Eclipse UserFriend
Originally posted by: jjefferies.acm.org

What I wish to do, is when zooming into a figure that contains children,
when I am at certain zoom levels, I do not want to be able to select the
children figures.

Basically, if I had 3 zoom levels, and a model heirarchy with 3 levels
(parent, child, grandchild), when zoom is at parent level I do not want to
be able to select any of the children or grandchildren. Right now (when
zoom level is at parent), then children are transparent, but I can still
select their figure (the outline of the figure representing the child).

I have experimented with setting the children visibility to false when the
zoom level is in a certain range (which seems to work for the time being),
but when the zoom level changes and setting their visibility to true, I
cannot get the figure to show.

How can I do this?

Thanks in advance.
Jim Jefferies
Re: Hide Selection of EditPart Figures [message #190258 is a reply to message #190190] Tue, 02 August 2005 22:25 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

"Jim Jefferies" <jjefferies@acm.org> wrote in message
news:868d836bb3bdf8677f97ef017d1c62dd$1@www.eclipse.org...
> What I wish to do, is when zooming into a figure that contains children,
> when I am at certain zoom levels, I do not want to be able to select the
> children figures.
>
> Basically, if I had 3 zoom levels, and a model heirarchy with 3 levels
> (parent, child, grandchild), when zoom is at parent level I do not want to
> be able to select any of the children or grandchildren. Right now (when
> zoom level is at parent), then children are transparent, but I can still
> select their figure (the outline of the figure representing the child).

Have the isSelectable() method for those editparts return false.

>
> I have experimented with setting the children visibility to false when the
> zoom level is in a certain range (which seems to work for the time being),
> but when the zoom level changes and setting their visibility to true, I
> cannot get the figure to show.

That should work. Perhaps they're not showing because they aren't being
properly laid out?

You might want to experiment with some other ways of achieving what you
want. For instance, if you want to hide certain editparts, invoke
refreshChildren() and just have your getModelChildren() method not return
those model objects that should be hidden. That will remove those
EditParts. Later, when the level changes again, new editparts will be
created for those model objects. If you have a lot of editparts and this
turns out to be too expensive, you might also consider having multiple
graphical viewers and silently replace one with the other when the level
changes in the combo box.

>
> How can I do this?
>
> Thanks in advance.
> Jim Jefferies
>
Previous Topic:How to show gef grid in rcp?
Next Topic:The CTRL+Z/CTRL+Y problem in GEF TreeViewer
Goto Forum:
  


Current Time: Fri Dec 13 03:02:20 GMT 2024

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

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

Back to the top