Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Figure blocking EditPart
Figure blocking EditPart [message #196788] Tue, 27 September 2005 08:10 Go to next message
Eclipse UserFriend
Originally posted by: dan.nicolici.nexource.ro

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C5C354.21008AC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello!

I have a 2 EditParts. One is a container for the other. I have overriden =
the container's "getDragTracker()" method to obtain a =
"move-to-click-location" behavior for the child part. All works well, =
the child part moves where I click on the parent, I can select the child =
part, everything is ok.
Now I want to do some improvement to the container's figure, so I add a =
Label to it's figure and surprise: I still have the =
"move-to-click-location" behavior but I can't select the child part as =
if the Label is blocking access to it. Why is this happening and how =
should I get arround it?

Thank you!
------=_NextPart_000_000C_01C5C354.21008AC0
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.1515" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have a 2 EditParts. One is a =
container for the=20
other. I have overriden the container's "getDragTracker()" method to =
obtain a=20
"move-to-click-location" behavior for the child part. All works well, =
the child=20
part moves where I click on the parent, I can select the child part, =
everything=20
is ok.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Now I want to&nbsp;do some improvement =
to the=20
container's figure, so I add a Label to it's figure and surprise: I =
still have=20
the "move-to-click-location" behavior but I can't select the child part =
as if=20
the Label is blocking access to it. Why is this happening and how should =
I get=20
arround it?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank you!</FONT></DIV></BODY></HTML>

------=_NextPart_000_000C_01C5C354.21008AC0--
Re: Figure blocking EditPart [message #196796 is a reply to message #196788] Tue, 27 September 2005 08:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dan.nicolici.nexource.ro

This is a multi-part message in MIME format.

------=_NextPart_000_001A_01C5C356.AEAB68C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I tried to override the container's figure paint() method and painted an =
image there (instead on a label added to the figure), but the image does =
not show...
------=_NextPart_000_001A_01C5C356.AEAB68C0
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.1515" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I tried to override the container's =
figure paint()=20
method and painted an image there (instead on a label added to the =
figure), but=20
the image does not show...</FONT></DIV></BODY></HTML>

------=_NextPart_000_001A_01C5C356.AEAB68C0--
Re: Figure blocking EditPart [message #197489 is a reply to message #196788] Tue, 04 October 2005 06:44 Go to previous message
hanys is currently offline hanysFriend
Messages: 188
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_004D_01C5C8BF.D06277B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,
it seems that you have not have installed the appropriate Policy at =
container's or childs EditPart, which should return something like =
ChangeBoundsCommand.

if you are extending for example =
org.eclipse.gef.editpolicies.XYLayoutEditPolicy.

protected Command createChangeConstraintCommand(EditPart child,
Object constraint) {
// HERE CREATE COMMAND.
// This command have to do in execute method change model bounds, =
and than it is refreshed by notification mechanism.
return CMD;
}

Best Regards,

John Cage

------=_NextPart_000_004D_01C5C8BF.D06277B0
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>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it seems that you have not have =
installed the=20
appropriate Policy at container's or childs EditPart, which should =
return=20
something like ChangeBoundsCommand.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>if you are extending for example=20
org.eclipse.gef.editpolicies.XYLayoutEditPolicy.</FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;protected Command=20
createChangeConstraintCommand(EditPart =
child,<BR>&nbsp;&nbsp;&nbsp;Object=20
constraint) {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; // HERE CREATE=20
COMMAND.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; // This command have =
to do in=20
execute method change model bounds, and than it is refreshed by =
notification=20
mechanism.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; return=20
CMD;<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>John Cage</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_004D_01C5C8BF.D06277B0--
Previous Topic:coordinate system mismatch?
Next Topic:Recompiling examples
Goto Forum:
  


Current Time: Fri Apr 26 09:46:35 GMT 2024

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

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

Back to the top