Mouse events in an IFigure [message #193417] |
Fri, 26 August 2005 07:47 |
Eclipse User |
|
|
|
Originally posted by: dan.nicolici.nexource.ro
This is a multi-part message in MIME format.
------=_NextPart_000_002E_01C5AA2B.86F3D6D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Is it possible for an IFigure of an EditPart to intercept Mouse Events? =
If I add a MouseListener to the figure, it does not work, instead the =
EditPart gets these events.
What I want to achieve with this is the abillity to move IFigures =
contained in the EditPart's main IFigure with the mouse.
Thank you!
------=_NextPart_000_002E_01C5AA2B.86F3D6D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Is it possible for an IFigure of an =
EditPart to=20
intercept Mouse Events? If I add a MouseListener to the figure, it =
does not=20
work, instead the EditPart gets these events.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What I want to achieve with this is the =
abillity to=20
move IFigures contained in the EditPart's main IFigure with the=20
mouse.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you!</FONT></DIV></BODY></HTML>
------=_NextPart_000_002E_01C5AA2B.86F3D6D0--
|
|
|
|
Re: Mouse events in an IFigure [message #193454 is a reply to message #193417] |
Fri, 26 August 2005 08:21 |
Eclipse User |
|
|
|
Originally posted by: sgplkrsh.uiuc.edu
This is a multi-part message in MIME format.
------=_NextPart_000_016F_01C5AA45.51F9ADF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I think it's easier than that.=20
In the container's editpart, install a XYLayoutPolicy and override =
createChangeConstraintCommand(). This will kick in each time a child's =
bounds are adjusted (figure is moved). I haven't tried this specific =
case, but I suspect it'll work.
Subhash
"Dan Nicolici" <dan.nicolici@nexource.ro> wrote in message =
news:demhe2$9ib$1@news.eclipse.org...
Is it possible for an IFigure of an EditPart to intercept Mouse =
Events? If I add a MouseListener to the figure, it does not work, =
instead the EditPart gets these events.
What I want to achieve with this is the abillity to move IFigures =
contained in the EditPart's main IFigure with the mouse.
Thank you!
------=_NextPart_000_016F_01C5AA45.51F9ADF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I think it's easier than that. =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>In the container's editpart, install a=20
XYLayoutPolicy and override createChangeConstraintCommand(). This will =
kick in=20
each time a child's bounds are adjusted (figure is moved). I haven't =
tried this=20
specific case, but I suspect it'll work.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Subhash</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan Nicolici" <<A=20
=
href=3D"mailto:dan.nicolici@nexource.ro">dan.nicolici@nexource.ro</A>>=
wrote=20
in message <A=20
=
href=3D"news:demhe2$9ib$1@news.eclipse.org">news:demhe2$9ib$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Is it possible for an IFigure of an =
EditPart to=20
intercept Mouse Events? If I add a MouseListener to the figure, =
it does=20
not work, instead the EditPart gets these events.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What I want to achieve with this is =
the abillity=20
to move IFigures contained in the EditPart's main IFigure with the=20
mouse.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank =
you!</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_016F_01C5AA45.51F9ADF0--
|
|
|
|
Re: Mouse events in an IFigure [message #193470 is a reply to message #193417] |
Fri, 26 August 2005 09:24 |
Eclipse User |
|
|
|
Originally posted by: dan.nicolici.nexource.ro
This is a multi-part message in MIME format.
------=_NextPart_000_0081_01C5AA39.21B2C930
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I may have (may!) been missunderstood. Martijn has spoted what I wanted.
I want to move "child" figures contained in a "parent" IFigure. The =
child figures do not have EditParts of their own, but are part of the =
parent figure wich is returned in the EditPart's createFigure() method.
Pretty confusing, huh... I hope I could provide some more information =
regarding my question. Still looking for solutions...
Thank you!
------=_NextPart_000_0081_01C5AA39.21B2C930
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I may have (may!) been missunderstood. =
Martijn has=20
spoted what I wanted.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I want to move <STRONG>"child"</STRONG> =
figures=20
contained in a <STRONG>"parent"</STRONG> IFigure. The child figures =
do not=20
have EditParts of their own, but are part of the parent figure wich is =
returned=20
in the EditPart's createFigure() method.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Pretty confusing, huh... I hope I =
could=20
provide some more information regarding my question. Still looking for=20
solutions...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you!</FONT></DIV></BODY></HTML>
------=_NextPart_000_0081_01C5AA39.21B2C930--
|
|
|
Re: Mouse events in an IFigure [message #193478 is a reply to message #193470] |
Fri, 26 August 2005 10:18 |
Eclipse User |
|
|
|
Originally posted by: sgplkrsh.uiuc.edu
This is a multi-part message in MIME format.
------=_NextPart_000_01C5_01C5AA55.996EE190
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
In my understanding, the edit parts are the UI elements that you can =
touch, feel and manipulate. The figures are only display structures =
which have no UI handling hooks. So, if the child figures do not have =
edit parts, what you are designing for is non-editable drawings within =
an editable drawing. Given that, you cannot move these non-editable =
drawings independant of the parent drawing. If you wanted that, you need =
to create edit-parts for them and install appropriate edit-policies in =
their parent's edit-part.
Subhash
"Dan Nicolici" <dan.nicolici@nexource.ro> wrote in message =
news:demn4l$h30$1@news.eclipse.org...
I may have (may!) been missunderstood. Martijn has spoted what I =
wanted.
I want to move "child" figures contained in a "parent" IFigure. The =
child figures do not have EditParts of their own, but are part of the =
parent figure wich is returned in the EditPart's createFigure() method.
Pretty confusing, huh... I hope I could provide some more information =
regarding my question. Still looking for solutions...
Thank you!
------=_NextPart_000_01C5_01C5AA55.996EE190
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>In my understanding, the edit parts are =
the UI=20
elements that you can touch, feel and manipulate. The figures are only =
display=20
structures which have no UI handling hooks. So, if the child figures do =
not have=20
edit parts, what you are designing for is non-editable drawings within =
an=20
editable drawing. Given that, you cannot move these non-editable =
drawings=20
independant of the parent drawing. If you wanted that, you need to =
create=20
edit-parts for them and install appropriate edit-policies in their =
parent's=20
edit-part.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Subhash</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan Nicolici" <<A=20
=
href=3D"mailto:dan.nicolici@nexource.ro">dan.nicolici@nexource.ro</A>>=
wrote=20
in message <A=20
=
href=3D"news:demn4l$h30$1@news.eclipse.org">news:demn4l$h30$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I may have (may!) been =
missunderstood. Martijn=20
has spoted what I wanted.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I want to move =
<STRONG>"child"</STRONG> figures=20
contained in a <STRONG>"parent"</STRONG> IFigure. The child =
figures do=20
not have EditParts of their own, but are part of the parent figure =
wich is=20
returned in the EditPart's createFigure() method.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Pretty confusing, huh... I hope =
I could=20
provide some more information regarding my question. Still looking for =
solutions...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank =
you!</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_01C5_01C5AA55.996EE190--
|
|
|
Re: Mouse events in an IFigure [message #193485 is a reply to message #193478] |
Fri, 26 August 2005 11:32 |
Eclipse User |
|
|
|
Originally posted by: dan.nicolici.nexource.ro
This is a multi-part message in MIME format.
------=_NextPart_000_0098_01C5AA4A.FD8D39C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I understand... Hmmm... I don't know why I am so cheap in implementing =
some corresponding EditParts, but it buzzes me that the child figures =
that I am talking about respond to Mouse Moving Events (i. e. =
mouseHover() ). Then why not to click events? Maybe I am trying to =
reinvent the wheel here and should stick to creating new EditParts. =
Please tell me if this is the case :)
Thanx!
------=_NextPart_000_0098_01C5AA4A.FD8D39C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I understand... Hmmm... I don't know =
why I am so=20
cheap in implementing some corresponding EditParts, but it buzzes me =
that the=20
child figures that I am talking about respond to Mouse Moving Events (i. =
e.=20
mouseHover() ). Then why not to click events? Maybe I am trying to =
reinvent the=20
wheel here and should stick to creating new EditParts. Please tell me if =
this is=20
the case :)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanx!</FONT></DIV></BODY></HTML>
------=_NextPart_000_0098_01C5AA4A.FD8D39C0--
|
|
|
Re: Mouse events in an IFigure [message #193545 is a reply to message #193417] |
Fri, 26 August 2005 13:50 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
This is a multi-part message in MIME format.
------=_NextPart_000_00F8_01C5AA23.87668F70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
After reading the other posts, it sounds like you need to do one of the =
following:
1) Return a custom drag tracker for this non-editpart child when the =
mouse clicks on that child. You have all of the info you need in the =
SelectionRequest when getDragTracker is called
2) Use figure listeners. I don't recommend this approach, but it is =
designed to work as well. You simply need to consume the Draw2d =
MouseEvent to prevent the GEF tool from also processing the mousedown.
The primary reason for a child not to be an editpart is that it can't be =
deleted. If this isn't true for your scenario you should reconsider =
making them parts.
"Dan Nicolici" <dan.nicolici@nexource.ro> wrote in message =
news:demhe2$9ib$1@news.eclipse.org...
Is it possible for an IFigure of an EditPart to intercept Mouse =
Events? If I add a MouseListener to the figure, it does not work, =
instead the EditPart gets these events.
What I want to achieve with this is the abillity to move IFigures =
contained in the EditPart's main IFigure with the mouse.
Thank you!
------=_NextPart_000_00F8_01C5AA23.87668F70
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>After reading the other posts, it =
sounds like you=20
need to do one of the following:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1) Return a custom drag tracker for =
this=20
non-editpart child when the mouse clicks on that child. You have all of =
the info=20
you need in the SelectionRequest when getDragTracker is =
called</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>2) Use figure listeners. I don't =
recommend this=20
approach, but it is designed to work as well. You simply need to consume =
the=20
Draw2d MouseEvent to prevent the GEF tool from also processing the=20
mousedown.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The primary reason for a child not to =
be an=20
editpart is that it can't be deleted. If this isn't true for your =
scenario you=20
should reconsider making them parts.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan Nicolici" <<A=20
=
href=3D"mailto:dan.nicolici@nexource.ro">dan.nicolici@nexource.ro</A>>=
wrote=20
in message <A=20
=
href=3D"news:demhe2$9ib$1@news.eclipse.org">news:demhe2$9ib$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Is it possible for an IFigure of an =
EditPart to=20
intercept Mouse Events? If I add a MouseListener to the figure, =
it does=20
not work, instead the EditPart gets these events.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What I want to achieve with this is =
the abillity=20
to move IFigures contained in the EditPart's main IFigure with the=20
mouse.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank =
you!</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_00F8_01C5AA23.87668F70--
|
|
|
Re: Mouse events in an IFigure [message #193567 is a reply to message #193545] |
Fri, 26 August 2005 14:27 |
Eclipse User |
|
|
|
Originally posted by: dan.nicolici.nexource.ro
This is a multi-part message in MIME format.
------=_NextPart_000_0063_01C5AA63.6B9B47F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thank you for the suggestion. I learned something from all this, but =
finally I decided to create parts for the children as well.
Dan
"Randy Hudson" <none@us.ibm.com> wrote in message =
news:den6m7$5oi$1@news.eclipse.org...
After reading the other posts, it sounds like you need to do one of =
the following:
1) Return a custom drag tracker for this non-editpart child when the =
mouse clicks on that child. You have all of the info you need in the =
SelectionRequest when getDragTracker is called
2) Use figure listeners. I don't recommend this approach, but it is =
designed to work as well. You simply need to consume the Draw2d =
MouseEvent to prevent the GEF tool from also processing the mousedown.
The primary reason for a child not to be an editpart is that it can't =
be deleted. If this isn't true for your scenario you should reconsider =
making them parts.
"Dan Nicolici" <dan.nicolici@nexource.ro> wrote in message =
news:demhe2$9ib$1@news.eclipse.org...
Is it possible for an IFigure of an EditPart to intercept Mouse =
Events? If I add a MouseListener to the figure, it does not work, =
instead the EditPart gets these events.
What I want to achieve with this is the abillity to move IFigures =
contained in the EditPart's main IFigure with the mouse.
Thank you!
------=_NextPart_000_0063_01C5AA63.6B9B47F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thank you for the suggestion. I learned =
something=20
from all this, but finally I decided to create parts for the children as =
well.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Dan</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Randy Hudson" <<A=20
href=3D"mailto:none@us.ibm.com">none@us.ibm.com</A>> wrote in =
message <A=20
=
href=3D"news:den6m7$5oi$1@news.eclipse.org">news:den6m7$5oi$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>After reading the other posts, it =
sounds like you=20
need to do one of the following:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1) Return a custom drag tracker for =
this=20
non-editpart child when the mouse clicks on that child. You have all =
of the=20
info you need in the SelectionRequest when getDragTracker is=20
called</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>2) Use figure listeners. I don't =
recommend this=20
approach, but it is designed to work as well. You simply need to =
consume the=20
Draw2d MouseEvent to prevent the GEF tool from also processing the=20
mousedown.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The primary reason for a child not to =
be an=20
editpart is that it can't be deleted. If this isn't true for your =
scenario you=20
should reconsider making them parts.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan Nicolici" <<A=20
=
href=3D"mailto:dan.nicolici@nexource.ro">dan.nicolici@nexource.ro</A>>=
=20
wrote in message <A=20
=
href=3D"news:demhe2$9ib$1@news.eclipse.org">news:demhe2$9ib$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Is it possible for an IFigure of an =
EditPart to=20
intercept Mouse Events? If I add a MouseListener to the figure, =
it does=20
not work, instead the EditPart gets these events.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What I want to achieve with this is =
the=20
abillity to move IFigures contained in the EditPart's main IFigure =
with the=20
mouse.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank=20
you!</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML >
------=_NextPart_000_0063_01C5AA63.6B9B47F0--
|
|
|
Powered by
FUDForum. Page generated in 0.05112 seconds