[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.gef] Re: Dispatching Event from Figure to EditPart

I did not solve the problem yet tho I tried two workarounds to react on the label click inside a figure:

1) install a SelectionEditPolicy on the EditPart - add a MouseListener to the figure's label which will toggle a boolean value - from the SelectionEditPolicy's ShowSelection methode read that boolean value of the figure and execute a command

2) Add the MouseListener as in 1) - also add a ProperyChangeListener to the figure - firePropertyChange when the label is clicked - handle that Event in the corresponding EditPart

I prefer the 2. workaround but neither is very clean and follows the philosophy - "models should only be modified by commands"

So if someone has a nice and clean solution please feel free to answer!