Skip to main content



      Home
Home » Eclipse Projects » GEF » Change cursor when moving tree item to different parent not allowed
Change cursor when moving tree item to different parent not allowed [message #148020] Wed, 18 August 2004 19:15 Go to next message
Eclipse UserFriend
I want to display the "no/not allowed" cursor when moving a tree item from
one parent to another is not allowed (ie. the new parent does not allow a
child of a certain type). I have an edit policy (extends
TreeContainerEditPolicy) that returns an UnexecutableCommand for the
getAddCommand(ChangeBoundsRequest request), however I would like to
graphically represent that the operation is not allowed by changing the
cursor.

How can this be done from the edit policy?

Thanks,
Erik

(note: this is Eclipse/GEF 3.0)
Re: Change cursor when moving tree item to different parent not allowed [message #148227 is a reply to message #148020] Thu, 19 August 2004 17:33 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Drop listeners in general don't attempt to create the command because the
drag data is not set until the mouse is released on some platforms. The
drop listener used internally by the treeviewer is no exception, although it
could be. You may be able to add an additional DropListener to the
DropTarget created by the treeviewer, and set the drop detail to DROP_NONE.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=39133

"Erik Johnson" <ejohnson@avaya.com> wrote in message
news:cg0npc$n5m$1@eclipse.org...
> I want to display the "no/not allowed" cursor when moving a tree item from
> one parent to another is not allowed (ie. the new parent does not allow a
> child of a certain type). I have an edit policy (extends
> TreeContainerEditPolicy) that returns an UnexecutableCommand for the
> getAddCommand(ChangeBoundsRequest request), however I would like to
> graphically represent that the operation is not allowed by changing the
> cursor.
>
> How can this be done from the edit policy?
>
> Thanks,
> Erik
>
> (note: this is Eclipse/GEF 3.0)
>
>
Previous Topic:Is it possible to create a semi-transparent figure?
Next Topic:about Zorder
Goto Forum:
  


Current Time: Fri May 02 04:48:58 EDT 2025

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

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

Back to the top