Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Disallow certain Edit Part to be drop to a Contanier
Disallow certain Edit Part to be drop to a Contanier [message #69004] Mon, 10 March 2003 16:50 Go to next message
yinglcs is currently offline yinglcsFriend
Messages: 64
Registered: July 2009
Member
Hi,
Is it possible to disallow certain Edit Part to be drop to a Container? If
yes, could you please tell me how to achieve that?

e.g. I would like to change the Circuit to allow user to drop a AND gate
figure, but NOT a OR gate figure. It will show a Stop sign icon when I
select a OR GATE figure and move it over to Circuit and when I move the
cursor to a other container (e.g. Flow Container), it should a Drop icon and
I can add the OR gate to the Flow Container?

Thanks
Re: Disallow certain Edit Part to be drop to a Contanier [message #69071 is a reply to message #69004] Mon, 10 March 2003 18:29 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> Hi,
> Is it possible to disallow certain Edit Part to be drop to a Container? If
> yes, could you please tell me how to achieve that?

Yes, your layout editpolicy would override either getTarget(Request), if you
want that container to not be targeted, or getCommand(Request), if you want
the container to be targeted, but you want to return an UnexecutableCommand
to get the NOT sign..

> e.g. I would like to change the Circuit to allow user to drop a AND gate
> figure, but NOT a OR gate figure. It will show a Stop sign icon when I
> select a OR GATE figure and move it over to Circuit and when I move the
> cursor to a other container (e.g. Flow Container), it should a Drop icon
and
> I can add the OR gate to the Flow Container?
>
> Thanks
Previous Topic:How to Update GEF build
Next Topic:question on draw2d translateToAbsolute() and translateToRelative()
Goto Forum:
  


Current Time: Sat Jul 27 17:20:43 GMT 2024

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

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

Back to the top