Home » Eclipse Projects » GEF » having problem with mouselistener...
having problem with mouselistener... [message #44840] |
Fri, 22 November 2002 08:59  |
Eclipse User |
|
|
|
hi all,
I have an edit part, which of course has a figure associated. I call
Figure.addMouseListener, and my method for public void
mouseDoubleClicked(MouseEvent me) is not called, only
mousePressed is called, i don't know why?
is this correct approach to add editpart as a listener to figure, if so why
it's not
fired?
thanx,
ozgur
|
|
|
Re: having problem with mouselistener... [message #45042 is a reply to message #44840] |
Fri, 22 November 2002 13:59   |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
If you want a figure to receive mouse buttons, then the GEF Tool will NOT
receive it, and you will not be able to use a DragTracker from that figure.
The reason you don't receive double-click is that mouseDown comes first, and
the DragTracker says: "I'm handling the mouse starting now, until the User
releases the button". So your figure will not get the mouse down.
So, in a CircuitEditPart, the Scrollbars receive mouse buttons, and it is
impossible to drag the Circuit when clicking on the scrollbar. Is this what
you want?
"Ozgur Kurt" <ozgurkurt@hotmail.com> wrote in message
news:arlb2j$im3$1@rogue.oti.com...
> hi all,
>
> I have an edit part, which of course has a figure associated. I call
> Figure.addMouseListener, and my method for public void
> mouseDoubleClicked(MouseEvent me) is not called, only
> mousePressed is called, i don't know why?
>
> is this correct approach to add editpart as a listener to figure, if so
why
> it's not
> fired?
>
> thanx,
> ozgur
>
>
|
|
|
Re: having problem with mouselistener... [message #45184 is a reply to message #45042] |
Mon, 25 November 2002 03:37   |
Eclipse User |
|
|
|
thanx for answering,
what i want is, there is a component on the screen, and when user
double-clicks it will open the file that defines this component.
what i need is handling double-click event. and bad news is i need this bad.
this was a feature of previous version(that's running on swt with custom
controls), users used this and liked this verymuch. i don't want to tell
them to select it from popup...
thanx again,
ozgur
"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:arlsl5$tob$1@rogue.oti.com...
> If you want a figure to receive mouse buttons, then the GEF Tool will NOT
> receive it, and you will not be able to use a DragTracker from that
figure.
>
> The reason you don't receive double-click is that mouseDown comes first,
and
> the DragTracker says: "I'm handling the mouse starting now, until the User
> releases the button". So your figure will not get the mouse down.
>
> So, in a CircuitEditPart, the Scrollbars receive mouse buttons, and it is
> impossible to drag the Circuit when clicking on the scrollbar. Is this
what
> you want?
>
> "Ozgur Kurt" <ozgurkurt@hotmail.com> wrote in message
> news:arlb2j$im3$1@rogue.oti.com...
> > hi all,
> >
> > I have an edit part, which of course has a figure associated. I call
> > Figure.addMouseListener, and my method for public void
> > mouseDoubleClicked(MouseEvent me) is not called, only
> > mousePressed is called, i don't know why?
> >
> > is this correct approach to add editpart as a listener to figure, if so
> why
> > it's not
> > fired?
> >
> > thanx,
> > ozgur
> >
> >
>
>
|
|
|
Re: having problem with mouselistener... [message #45448 is a reply to message #45184] |
Mon, 25 November 2002 12:15   |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
So do it in the DragTracker that get's returned from the EditPart, not in
the Figure.
"Ozgur Kurt" <ozgurkurt@hotmail.com> wrote in message
news:arsni2$dev$1@rogue.oti.com...
> thanx for answering,
>
> what i want is, there is a component on the screen, and when user
> double-clicks it will open the file that defines this component.
>
> what i need is handling double-click event. and bad news is i need this
bad.
> this was a feature of previous version(that's running on swt with custom
> controls), users used this and liked this verymuch. i don't want to tell
> them to select it from popup...
>
>
> thanx again,
> ozgur
>
>
>
>
> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:arlsl5$tob$1@rogue.oti.com...
> > If you want a figure to receive mouse buttons, then the GEF Tool will
NOT
> > receive it, and you will not be able to use a DragTracker from that
> figure.
> >
> > The reason you don't receive double-click is that mouseDown comes first,
> and
> > the DragTracker says: "I'm handling the mouse starting now, until the
User
> > releases the button". So your figure will not get the mouse down.
> >
> > So, in a CircuitEditPart, the Scrollbars receive mouse buttons, and it
is
> > impossible to drag the Circuit when clicking on the scrollbar. Is this
> what
> > you want?
> >
> > "Ozgur Kurt" <ozgurkurt@hotmail.com> wrote in message
> > news:arlb2j$im3$1@rogue.oti.com...
> > > hi all,
> > >
> > > I have an edit part, which of course has a figure associated. I call
> > > Figure.addMouseListener, and my method for public void
> > > mouseDoubleClicked(MouseEvent me) is not called, only
> > > mousePressed is called, i don't know why?
> > >
> > > is this correct approach to add editpart as a listener to figure, if
so
> > why
> > > it's not
> > > fired?
> > >
> > > thanx,
> > > ozgur
> > >
> > >
> >
> >
>
>
|
|
| |
Goto Forum:
Current Time: Wed Jul 16 21:45:53 EDT 2025
Powered by FUDForum. Page generated in 0.07702 seconds
|