|
|
Re: [Zest] attach Listener to GraphNode [message #243457 is a reply to message #243427] |
Mon, 09 June 2008 04:50 |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
This seems like a reasonable request. Can you open a bug under Gef/Zest
for this.
Cheers,
ian
Kai Schlamp wrote:
> Hy.
> I recognized, that it is not possible to get events from a GraphNode.
> The below EventListener is never executed, when I move my mouse pointer
> over the node (for Graph it works as assumed):
>
> graphNode.addListener(SWT.MouseEnter, new Listener() {
> @Override
> public void handleEvent(Event event) {
> System.out.println("foo");
> }
> });
>
> Is this a known problem in Zest? This would be really handy to build a
> simple editor.
> The indirect way over a Graph listener is not very practical and also
> has some pitfalls (especially when there is more than one node selected).
>
> And another thing ... is there a way to allow only one selection in a
> graph?
> I thought about something like "new Graph(graphComposite, SWT.SINGLE);",
> but this doesn't work (Crashs with Exception).
>
> Other than that, I really love Zest. Not necessary anymore to learn the
> GEF framework for my very simple editor problem.
>
> Best regards,
> Kai
>
|
|
|
|
|
|
|
Re: [Zest] attach Listener to GraphNode [message #243650 is a reply to message #243530] |
Sat, 14 June 2008 16:58 |
Eclipse User |
|
|
|
Originally posted by: irbull.cs.uvic.ca
Exactly,
Zest is built on Draw2D, and Draw2D catches all these events. The goal
of Zest is to mimic the SWT API, so in a lot of cases we have to create
new events and put them back on the queue.
cheers,
ian
kentusha wrote:
> I think I understand the problem we are having a bit more and have
> perhaps have an idea.
>
> The Graph has inside of it an SWTEventDispatcher, which is effectively
> catching all events on all figures.
>
> The method getLightweightSystem() is public is one could set a new event
> dispatcher and handle all the events.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03452 seconds